YEAR Function
YEAR Function

YEAR Function

Extracts the year number from a valid Excel date.

ExcelClash Team
PUBLISHED

Summary

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.

YEAR is often used for grouping and reporting logic. It helps pull a date up to a higher time level, which is useful for annual summaries, trend comparisons, and formulas that need the year as a standalone numeric label while the original full date stays available elsewhere in the model.

Purpose

Extract a year number

Pulls the year part from a valid Excel date value.

Return Value

A whole number

Returns an integer from 1900 to 9999.

Syntax

=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.

Arguments

  • serial_number - A valid Excel date from which you want to extract the year.

YEAR vs Related Date Functions

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.

Using YEAR

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.

Example 1 - Extract the Year from a Date

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.

Check Answer
Challenge #1
Target: Sheet1!C2

In cell C2, extract the current year with YEAR(TODAY()).

Example 2 - Extract a Year from a Stored Record

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.

Check Answer
Challenge #2
Target: Sheet1!C3

In cell C3, extract the year from the date in B3.

Example 3 - Calculate an Approximate Age or Year Gap

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.

Check Answer
Challenge #3
Target: Sheet1!C4

In cell C4, subtract the birth year in B4 from the current year.

Example 4 - Check How Excel Interprets a Two-Digit 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.

Check Answer
Challenge #4
Target: Sheet1!C5

In cell C5, use YEAR on the value in B5 to see how Excel interprets a two-digit year.

Conclusion Recap

YEAR is useful when a full date contains more detail than you need. This lesson showed the common cases: pulling a year from stored dates, grouping records by year, checking the current year, and doing rough year-based comparisons like an approximate age or service gap.

The main caution is that YEAR only gives the calendar year number. That is perfect for grouping and filtering, but it is not enough for exact age or anniversary logic by itself. For that kind of result, you still need a fuller date comparison.

  • Summary: YEAR extracts the year from a valid date.
  • Output: It returns a whole-number year such as 2026.
  • Common uses: Grouping data, filtering by year, helper columns, and rough year comparisons.
  • Important caution: Year subtraction is approximate, not a full age calculation.
  • Input best practice: Use real dates or DATE(...) and prefer four-digit years.
  • Related functions: Use MONTH and DAY to extract other date parts.
Tactical Arena
Share YEAR Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.