SheetsLessons
Date & Time function

YEAR function in Google Sheets

YEAR returns the four-digit year of a date. It's the usual first step for yearly reports, such as counting or summing everything that happened in 2026.

Syntax

=YEAR(date)
date
The date to read: a cell with a date, a DATE formula, or date-like text.

Practice YEAR

Task 1 of 1

Which year was the first order placed? Answer in C2.

C2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

YEAR examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABCD
1TaskStartDueHolidays
2Kickoff1/5/20261/9/20261/19/2026
3Design1/12/20262/13/20262/16/2026
4Build2/16/20264/30/20265/25/2026
5Launch5/4/20265/29/2026
Project schedule (column D lists public holidays)
FormulaResultWhat it shows
=YEAR(B2)2026The year the Kickoff started.
=YEAR(TODAY())The current yearThe current year.
=ARRAYFORMULA(YEAR(C2:C5))
2026
2026
2026
2026
The year of every due date at once.
=COUNTIFS(C2:C5, ">="&DATE(2026,1,1), C2:C5, "<"&DATE(2027,1,1))4Tasks due in 2026.
=YEAR("2026-03-15")2026Date-like text is converted first.

Tips and common mistakes

  • YEAR returns a plain number, so don't give it a date format or it will show as a date in 1905.
  • To group by year inside a formula over a whole column, use ARRAYFORMULA(YEAR(B2:B)).

Related functions