YEAR Function in Excel, Google Sheets, Airtable & Notion
YEAR returns the year of a date as a four-digit number, such as 2024.
Syntax in each app
| App | Support | Syntax & notes |
|---|---|---|
| Excel | ✔ Built in | YEAR(serial_number) |
| Google Sheets | ✔ Built in | YEAR(date) |
| Airtable | ✔ Built in | YEAR(date) |
| Notion | ✔ Built in | year(date) |
| Excel | =YEAR(DATE(2024, 3, 15)) | open excel.new ↗ |
|---|---|---|
| Google Sheets | =YEAR(DATE(2024, 3, 15)) | open sheets.new ↗ |
| Airtable | YEAR(DATETIME_PARSE("2024-03-15", "YYYY-MM-DD")) | |
| Notion | year(parseDate("2024-03-15")) |
Excel & Sheets use cell ranges. Paste this sample data into cell A1 of a blank sheet, then paste the formula into any empty cell.
Arguments
| Argument | What it means |
|---|---|
date | A date, a cell containing a date, or a formula that returns one. Text such as "2024-03-15" is converted in Excel and Google Sheets. |
Examples
| Formula | Result | Why | Copy |
|---|---|---|---|
=YEAR(DATE(2024, 3, 15)) | 2024 | ||
=YEAR(TODAY()) - YEAR(A2) | Rough age | Ignores whether the birthday has passed — use DATEDIF for an exact age. | |
=YEAR(45366) | 2024 | A serial number works too. |
Examples use Excel / Google Sheets syntax unless noted.
How YEAR works
YEAR, MONTH and DAY pull the parts out of a date so you can group, filter or rebuild it. A classic use is a helper column =YEAR(A2) for a pivot table or SUMIFS by year, or =DATE(YEAR(A2) + 1, MONTH(A2), DAY(A2)) for the same date next year.
If YEAR returns #VALUE!, the cell holds text that the spreadsheet cannot read as a date (for example a US-style date in a UK-locale sheet). Subtracting years is only an approximate age; for an exact age in whole years use =DATEDIF(A2, TODAY(), "Y").
Airtable and Notion work the same way on date fields: YEAR({Due}) and year(prop("Due")).
Frequently Asked Questions
- How do I get the year as text instead of a number?
- Use
=TEXT(A2, "yyyy")in Excel/Sheets,DATETIME_FORMAT({Date}, "YYYY")in Airtable orformatDate(prop("Date"), "YYYY")in Notion.