Google Sheets function · Date
YEAR in Google Sheets: syntax and examples
YEAR extracts the year from a date as a four-digit number. It works on real dates, serial numbers and text that Sheets can read as a date, and it pairs with MONTH and DAY to split a date apart.
Syntax
YEAR(date)
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
date | date | yes | A date, a serial number or text that Sheets reads as a date. |
Examples
The examples use this table, starting in A1:
| Start | End |
| 43831 | 46096 |
=YEAR(B2)Result: 2026
Year of a date stored as a serial number.
Run in a Google Sheet (English US locale) on .
=YEAR(B2)-YEAR(A2)Result: 6
Whole calendar years between two dates.
Run in a Google Sheet (English US locale) on .
=YEAR(DATE(2024, 2, 29))Result: 2024
Year of a leap day built with DATE.
Run in a Google Sheet (English US locale) on .
=YEAR("2026-03-15")Result: 2026
A text date in year-month-day form.
Run in a Google Sheet (English US locale) on .
=ARRAYFORMULA(YEAR(A2:B2))Result:
| 2020 | 2026 |
ARRAYFORMULA applies YEAR to every cell of the range.
Run in a Google Sheet (English US locale) on .
Common errors
- A string that cannot be read as a date, for example "abc", returns #VALUE!.
- A range of several cells returns #VALUE! unless you wrap it in ARRAYFORMULA.
- A text date depends on the locale. "15.03.2026" returns #VALUE! in en_US. The form "2026-03-15" is safe in both locales.
Compared with Excel
Same syntax in Excel.