Excel YEAR function


The Excel YEAR function extracts the year from a given date as a four-digit number. This function is useful for converting a date into a year number, which can then be used in various date-related calculations or for categorizing data by year.
  • serial_number: The date from which you want to extract the year.
Return value

A four-digit number representing the year.

How to use

The YEAR function requires a valid Excel date as input. This date can be a cell reference containing a date, a date returned by another function, or a date typed directly into the function in a recognized Excel date format. The function then returns the year component of that date as a four-digit number.


Simple YEAR
Basic Year Extraction: To extract the year from a specific date:

This formula extracts the year from the given date, July 15, 2022, and returns 2022.
YEAR for Age Calculation
Calculating Age: To calculate a person’s age in years using their birthdate:
					=YEAR(TODAY()) - YEAR("2000-05-20")
This formula calculates the age of a person born on May 20, 2000, as of today’s date.

Additional Notes

  • The YEAR function will return a #VALUE! error if the input is not a recognized date.
  • The function is particularly useful in financial analysis, project planning, and data organization where the year component of a date is a critical factor.

Related Functions

Excel DATE function

The Excel DATE function creates dates from year, month, and day components, ensuring dynamically constructed dates are valid.

Excel MONTH function

The Excel MONTH function extracts the month from a date, returning a number from 1 to 12, ideal for calculations and scheduling.

Excel DAY function

The Excel DAY function extracts the day of the month from a date, returning a number between 1 and 31, useful for date breakdowns.

Content Navigation