Category: FUNCTION | Updated: 2026-11-22

How to Use the YEAR Function in Google Sheets | Extract Only the Year from a Date

How to Use the YEAR Function in Google Sheets

The YEAR function extracts only the 4-digit year as a number from a date cell. It is frequently used to aggregate sales data by year or determine fiscal years (such as an April-start fiscal year).

Syntax

=YEAR(date)
  • date: The date value or cell containing the date from which to extract the year.

Examples

Here are examples of extracting the calendar year or fiscal year in Column B from dates in Column A.

Row A (Date) B (Formula) Result Description
1 2026/11/22 =YEAR(A1) 2026 Extracts the year 2026 from the date
2 2026/11/22 15:30 =YEAR(A2) 2026 Also works on date-time values with timestamps
3 2026/03/15 =YEAR(EDATE(A3, -3)) 2025 Shifts back 3 months to calculate an April-start fiscal year
4 (None) =YEAR(TODAY()) 2026 Gets the current year

Common Errors and Tips

  • Entering a date directly inside the formula
    • Writing =YEAR(2026/11/22) treats 2026 / 11 / 22 as division and returns 1900. Always enclose literal dates in double quotes (=YEAR("2026/11/22")) or use the DATE function.
  • When #VALUE! errors occur
    • If the referenced cell contains an invalid date string (like "2026/11/31") or unrecognized text, #VALUE! is returned.
  • Referencing a blank cell
    • Referencing an empty cell does not throw an error; instead, it returns 1899 (the year of the base date). To leave blank rows empty, use =IF(A1="", "", YEAR(A1)).

Frequently Asked Questions

Q. Can I append text to the extracted year, like "2026 Year"?

A. Yes. You can concatenate text with "=YEAR(A1)&" Year"", or keep it numeric for calculations by applying a custom number format such as 0" Year".

Q. Can I use YEAR to calculate someone's current age from their birth date?

A. While "=YEAR(TODAY())-YEAR(A1)" gives an approximate age, it doesn't check whether this year's birthday has passed. Use the DATEDIF function for an exact age.