Cellwise Try it free

Dates function

Excel YEAR function

YEAR returns the four-digit year from a date. Use it to group orders by year, filter a report to one year, or build a new date with DATE.

=YEAR(date)

Arguments

date
The date to read, usually a cell that holds a date.

YEAR examples

Every result below was calculated from this sample sheet by the same spreadsheet engine the Cellwise app uses.

ABC
1EmployeeDepartmentHire date
2Priya NairFinance2019-04-08
3Tom BeckerSales2023-09-18
4Lena OrtizSupport2025-01-06
5Sam OkaforSales2021-06-14
  1. =YEAR(C2)

    Result: 2019

    Returns 2019, the year Priya was hired.

  2. =YEAR(TODAY())

    Result: today’s date-based value (it changes every day)

    The current year, handy for a report header.

  3. =YEAR(TODAY())-YEAR(C5)

    Result: today’s date-based value (it changes every day)

    A rough count of calendar years since Sam joined.

  4. =IF(YEAR(C4)=2025,"New hire","")

    Result: New hire

    Labels anyone hired in 2025.

How to use YEAR

  1. Click the cell for the result.
  2. Type =YEAR(
  3. Click the cell with the date.
  4. Close the bracket and press Enter.

Common YEAR mistakes

The result shows as a date in 1905

The cell kept a date format. Change it to General so 2019 shows as a number.

Subtracting years to get an exact age

YEAR minus YEAR ignores the month and day. Use DATEDIF with "Y" for completed years.

The date is really text

Dates pasted from other systems can be text, which gives #VALUE!. Convert them to real dates first.

YEAR FAQ

How do I extract the year from a date in Excel?

Use =YEAR(A2). It returns a number like 2026 that you can compare, sum by, or use in other formulas.

How do I count dates in a specific year in Excel?

Use COUNTIFS with a start and end date, like =COUNTIFS(C2:C9,">="&DATE(2025,1,1),C2:C9,"<"&DATE(2026,1,1)).

Why does YEAR return 1900?

The cell is empty or holds 0, which Excel treats as the start of its calendar. Check that the date cell has a value.

Practice YEAR in these lessons

Guides that use YEAR

Related functions

Updated