Contact

YEAR Function in Google Sheets: Formula, Examples & Troubleshooting

Date & time Beginner Google Sheets

Learn the YEAR formula in Google Sheets: extract the calendar year from a date value, with reproducible examples, expected answers and compatibility cautions.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: YEAR(date) extracts the numeric year from a date value. =YEAR(DATE(2026,10,11)) returns 2026. Keep the output as a plain number; formatting the extracted integer as a date would reinterpret it as a different serial value.

Availability and version history

  • Introduced: Introduction version not established by the official history reviewed.
  • Availability: Documented in the rolling Google Sheets service; examples use the web spreadsheet workflow.
  • Checked: October 14, 2026; official YEAR reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Syntax and reliable inputs

=YEAR(date)

The argument is a date-valued cell, a function such as DATE returning a date, or an appropriate numeric serial. Use DATE-generated controls before relying on imported date-looking text.

This worksheet guide uses comma separators and English names. Inspect the spreadsheet locale in File → Settings; changing that setting affects collaborators too. It does not turn every string inside a function into a validated date.

Two original worked controls

=YEAR(DATE(2026,10,11))
=YEAR(DATE(2024,2,29))

Expected results are 2026 and 2024. The second input is a leap-day date, but YEAR still returns only its year component. Display these outputs with a numeric format rather than a calendar-date format.

The output 2024 contains neither February nor day 29. If those components matter, keep the original date rather than replacing the source column with YEAR alone.

Advanced example: use a July-start fiscal-year label

Suppose each July-through-June period is named for the year in which it ends. Put the following DATE expressions in A2:A5:

Date expression Expected label
=DATE(2026,6,30) 2026
=DATE(2026,7,1) 2027
=DATE(2027,1,15) 2027
=DATE(2027,6,30) 2027

In B2 enter and fill down:

=YEAR(A2)+IF(MONTH(A2)>=7,1,0)

This is a stated reporting convention. A period named for its starting year or beginning in another month needs a different rule. Test both June 30 and July 1 so the classification boundary is explicit.

Advanced example: total one calendar year

Create A1:B5 with these independent rows:

Row A · Date formula B · Amount
2 =DATE(2025,12,31) 10
3 =DATE(2026,1,1) 20
4 =DATE(2026,12,31) 30
5 =DATE(2027,1,1) 40

A helper =YEAR(A2) filled down shows 2025, 2026, 2026, 2027. For the annual total:

=SUMIFS(B2:B5,A2:A5,">="&DATE(2026,1,1),A2:A5,"<"&DATE(2027,1,1))

Expected result: 50, from 20+30. The date-boundary formula expresses the annual interval without converting dates to text. It is a SUMIFS selection, while YEAR provides an inspectable grouping label.

Advanced check: calendar labels are not elapsed years

=YEAR(DATE(2026,1,1))-YEAR(DATE(2025,12,31))
=DATE(2026,1,1)-DATE(2025,12,31)

Both expected results are 1, but one counts a year-label change and the other measures a day. For June 14, 2026 versus June 15, 2025, the year-label difference remains 1 while the date difference is 364 days.

Neither subtraction of YEAR results establishes one completed anniversary. Specify the intended age or elapsed-period rule before selecting a date-difference calculation.

Advanced example: reconstruct a date-only value

With A8 containing =DATE(2024,2,29):

=DATE(YEAR(A8),MONTH(A8),DAY(A8))

Expected calendar result: 2024-02-29. Reconstruction needs all three components; YEAR alone cannot recover the original date. A time-bearing value would require separate treatment of the time portion rather than assuming this date-only reconstruction retains it.

Literal dates, source arithmetic and errors

An expression such as YEAR(10/10/2000) contains division operators. It does not mean October 10, 2000. Google’s warning is correct in purpose, but its displayed quotient is 0.005; direct arithmetic gives 0.0005. This guide does not adopt that typo or assign an untested historical YEAR result to the quotient.

Use YEAR(DATE(2000,10,10)) when the intended year is 2000. A date typed into a cell may undergo Sheets’ entry-time conversion; that is different from evaluating arithmetic inside a formula. General text, blank, Boolean and historical-serial error behavior remains outside these numeric date controls.

Related guides already published for this function: Microsoft Excel | LibreOffice Calc | Apache OpenOffice Calc | Gnumeric | ONLYOFFICE Spreadsheet Editor

A guide in another program is a separate documented reference, not a guarantee of identical parsing, historical serials or native error displays. Use the function comparison tool to inspect guide coverage.

The complete guide and original examples were reviewed on October 14, 2026 against direct Google documentation. Expected calendar and numeric outputs were independently calculated; no native Google Sheets execution, mobile-client certification or complete input-conversion test was performed.