# YEAR in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/year/

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

- `date` (date, required: 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 2026-11-29.

```
=YEAR(B2)-YEAR(A2)
```

Result: `6`

Whole calendar years between two dates. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=YEAR(DATE(2024, 2, 29))
```

Result: `2024`

Year of a leap day built with DATE. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=YEAR("2026-03-15")
```

Result: `2026`

A text date in year-month-day form. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=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 2026-11-29.

## 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.

## Related functions

- [MONTH](https://goingstellar.ro/reference/sheets/month/)
- [DAY](https://goingstellar.ro/reference/sheets/day/)
- [DATE](https://goingstellar.ro/reference/sheets/date/)
- [EDATE](https://goingstellar.ro/reference/sheets/edate/)
- [DATEDIF](https://goingstellar.ro/reference/sheets/datedif/)
- [TODAY](https://goingstellar.ro/reference/sheets/today/)

## Sources

- [YEAR (Docs Editors Help)](https://support.google.com/docs/answer/3093061)

