Summary

If you need to extract the year from a date, you can use the YEAR function. In the generic form of the formula above, the date must be in a form that Excel recognizes as a valid date.

Generic formula

=YEAR(date)

Explanation 

The YEAR function takes just one argument, the date from which you want to extract the year. In the example, the formula is:

=YEAR(B4)

B4 contains a date value for January 5, 2016. The YEAR function returns the number 2016 representing the year of the date.

Note that you can use YEAR to extract the year from a day entered as text:

=YEAR("1/5/2016")

However, using text for dates can cause unpredictable results on computers using different regional date settings. In general it's better (and more flexible) to supply an address to a cell that already contains a valid date.

Display only year

If you want to enter a date and only display the year, you can apply a custom number format like "yyyy" or "yy".

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.