YEAR Function

Returns the year from a date.

Category

Date & Time

Available in

All versions, Microsoft 365

Returns

A four-digit year

Taught hands-on in Level 3: Intermediate Lookups & Data Summaries · Dates & Times module

Overview

YEAR returns the year of a date as a four-digit number from 1900 to 9999.

Use it to group by year, to compare a date with the current year, or with DATE to build dates in the same year.

Syntax

=YEAR(serial_number) Explain

Arguments

ArgumentRequired?What it does
serial_numberYesThe date to read.

Examples

Example 1 — Year of each invoice

Northstar's invoices span three years.

B2fx=YEAR(A2)
AB
1Invoice dateYear
211/2/20252025
33/15/20262026
41/9/20272027
=YEAR(A2) Explain

Example 2 — Is this date in the current year?

Compare with the year of TODAY.

=IF(YEAR(A2)=YEAR(TODAY()), "This year", "Other year") Explain

Common mistakes

  • YEAR returns 1900. The cell is empty or holds a small number rather than a date.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.