Spreadsheet formulas explained, side by side

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

AppSupportSyntax & notes
Excel✔ Built inYEAR(serial_number)
Google Sheets✔ Built inYEAR(date)
Airtable✔ Built inYEAR(date)
Notion✔ Built inyear(date)
Try YEAR with your own values
Result (as Excel & Google Sheets return it)
2,024
Your formula, ready to paste
Excel=YEAR(DATE(2024, 3, 15)) open excel.new ↗
Google Sheets=YEAR(DATE(2024, 3, 15)) open sheets.new ↗
AirtableYEAR(DATETIME_PARSE("2024-03-15", "YYYY-MM-DD"))
Notionyear(parseDate("2024-03-15"))

Arguments

ArgumentWhat it means
dateA 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

FormulaResultWhyCopy
=YEAR(DATE(2024, 3, 15))2024
=YEAR(TODAY()) - YEAR(A2)Rough ageIgnores whether the birthday has passed — use DATEDIF for an exact age.
=YEAR(45366)2024A 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 or formatDate(prop("Date"), "YYYY") in Notion.

Part of the Date & Time functions. Results in the tester follow Excel and Google Sheets behaviour; always double-check important work in your own file.