Skip to content
Google Sheets

YEAR function in Google Sheets

Returns the year specified by a given date.

=YEAR(date)

YEAR syntax and parameters

One argument, one required.

  • dateanyRequired

    The date from which to calculate the year. Must be a cell reference to a cell containing a date, a function returning a date type, or a number.

YEAR examples

Formulas you'll actually reuse.

  1. The year of an invoice date, for a yearly SUMIFS:

    =YEAR(B2)

    Result2026

  2. Split rows into current-year and prior-year buckets:

    =IF(YEAR(B2) = YEAR(TODAY()), "This year", "Prior")

YEAR in Excel

Same name — your formula ports as-is.

Try YEAR in the playground

Edit the example — nothing to install.

Preloaded with the YEAR formula from Example 1 — change anything and watch it respond.

Loading the editor…