
The Excel YEAR function returns the year from a valid date as a whole number. For example, if a cell contains 2026-04-06, YEAR returns 2026.
YEAR is useful when you want to group data by year, build year-based reports, compare dates at a year level, or pull the year out of timestamps and transaction records.
Pulls the year part from a valid Excel date value.
Returns an integer from 1900 to 9999.
=YEAR(serial_number)
The argument is called serial_number because Excel stores dates as serial values behind the scenes. In practice, you can use a cell reference, a date formula, or a valid date value. Microsoft recommends using real Excel dates or DATE(...) instead of relying on ambiguous text dates.
YEAR usually works alongside other date functions rather than replacing them.
| Function | Returns | Use When | Example |
|---|---|---|---|
YEAR |
Year number | You need the calendar year only | =YEAR(A1) |
MONTH |
Month number | You need the month part | =MONTH(A1) |
DAY |
Day of month | You need the day part | =DAY(A1) |
DATE |
A full date | You want to build a date from year, month, and day values | =DATE(2026,4,6) |
YEAR is for extracting. DATE is for constructing. MONTH and DAY work the same way as YEAR, but return different parts of the same date.
YEAR is straightforward: pass in a valid date, and Excel returns the year portion. It does not care how the date is formatted on the worksheet. Even if the date is displayed in another calendar format, Microsoft notes that YEAR still returns the Gregorian year value for the underlying date.
One common use is grouping rows by year in helper columns, pivot tables, and charts. Another is building quick comparisons such as YEAR(TODAY())-YEAR(B2). That kind of subtraction is useful for rough year-level analysis, but it is not a precise age formula because it ignores whether the birthday or anniversary has already happened this year.
It is also worth being careful with two-digit years in text dates. Microsoft documents that Excel commonly interprets years 00 through 29 as 2000 through 2029, and 30 through 99 as 1930 through 1999. However, that upper limit can be changed in Windows, so four-digit years are the safer choice.
The most basic use of YEAR is to pull the calendar year out of a complete date.
=YEAR("2026-04-06") // Returns 2026
This is useful when the original cell contains a full date but your report only needs the year for grouping or filtering.
In cell F1, extract the current year with =YEAR(TODAY()).
YEAR is often used on existing dates in tables such as hire dates, birth dates, invoice dates, or transaction dates.
=YEAR(B2)
If B2 contains 1995-05-18, the result is 1995. This makes the function useful for building cohorts or year-based categories from raw records.
In cell F2, extract the year from the date in B2.
You can subtract one extracted year from another to get a quick year difference.
=YEAR(TODAY()) - YEAR(B2)
This is fast and often good enough for rough analysis, but it is only an approximation. If the birthday or anniversary has not happened yet this year, the true age or service length is one year lower.
In cell F3, subtract the birth year in B2 from the current year.
Two-digit year inputs can be ambiguous, especially when they are entered as text dates.
=YEAR("1/1/30")
On the default Windows setting, this is interpreted as the year 1930. But because the two-digit year cutoff can be changed at the system level, the broader lesson is to avoid ambiguous year inputs and use four-digit years instead.
In cell F4, use YEAR on the value in A4 to see how Excel interprets a two-digit year under the current date settings.
YEAR extracts the year from a valid date.2026.DATE(...) and prefer four-digit years.MONTH and DAY to extract other date parts.Tell your friends about this post