Excel function

YEARfunction

Returns the year (1900–9999) of a date as a number.

All versions
=YEAR(DATE(2026,5,4))

May 2026

Sun
Mon
Tue
Wed
Thu
Fri
Sat

Click a date on the calendar to change serial_number. Use the ◀ ▶ buttons to move a day at a time past the end of a month or year. Try breaking it on purpose to see the errors.

Result

2026

serial_number
May 4, 2026 (Mon)

The date to take the year from. In a real sheet this is usually a cell with a date (A2 and so on).

What is the YEAR function?

=YEAR(serial_number)

YEAR returns only the year of a date as a number: an integer from 1900 to 9999.

Inside Excel a date is a serial number (January 1, 1900 is 1), so it is hard to calculate with the year, month and day directly. Taking them apart with YEAR, MONTH and DAY lets you test conditions or build other dates.

YEAR is usually the first step in yearly reporting: add a Year column to a list of transactions and a PivotTable or SUMIFS can total by year. If your fiscal year starts in April or July, shift the date back a few months with EDATE before taking the year.

Arguments

serial_number
The date to take the year from: a cell with a date, the DATE function or the result of another date function.

YEAR examples

  1. Example 1. Take the year from a date

    =YEAR(A2)

    If A2 is 2026-05-04, the result is 2026.

  2. Example 2. With DATE

    =DATE(YEAR(A2), MONTH(A2)+1, DAY(A2))

    Take the parts of A2 and add 1 to the month for the same day next month. If that day does not exist (as with January 31), it rolls into the following month; use EDATE for exactly one month later.

  3. Example 3. Fiscal year starting in April

    =YEAR(EDATE(A2, -3))

    Moving the date back three months puts April through the next March in one year. The result is the year the fiscal year began.

    A2=YEAR(A2)Fiscal year
    2026-03-3120262025
    2026-04-0120262026
    2027-02-2820272026
  4. Example 4. Year and quarter label

    =YEAR(A2)&"-Q"&ROUNDUP(MONTH(A2)/3, 0)

    For 2026-05-04 the result is "2026-Q2".

  5. Example 5. Sales for one year

    =SUMIFS(D:D, A:A, ">="&DATE(F2,1,1), A:A, "<"&DATE(F2+1,1,1))

    Put 2026 in F2 to add the 2026 sales. It filters by a date range instead of converting the column with YEAR.

Common mistakes

FAQ

Can YEAR take a text date?
Text Excel recognizes as a date, such as "2026-05-04", usually works, but it can depend on the computer's settings. A date cell or the DATE function is safer.
How do I get the day of the week?
Use WEEKDAY for a number, or TEXT(A2,"ddd") for the name.
How do I build January 1 of that year?
=DATE(YEAR(A2), 1, 1). December 31 is =DATE(YEAR(A2), 12, 31).