Excel
YEAR function in Excel
Converts a serial number to a year
=YEAR(serial_number)YEAR syntax and parameters
One argument, one required.
- serial_numbernumberRequired
The date of the year you want to find. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2025,5,23) for the 23rd day of May, 2025. Problems can occur if dates are entered as text.
YEAR examples
Formulas you'll actually reuse.
The year of an invoice date, for a yearly SUMIFS:
=YEAR(B2)Result
2026Split rows into current-year and prior-year buckets:
=IF(YEAR(B2) = YEAR(TODAY()), "This year", "Prior")
YEAR in Google Sheets
Same name — your formula ports as-is.
Try YEAR in the playground
Edit the example — nothing to install.
Preloaded with the YEAR formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- DATEReturns the serial number of a particular dateDateGoogle Sheets
- DATEDIFCalculates the number of days, months, or years between two dates. This function is useful in formulas where you need to calculate an age.DateGoogle Sheets
- DATEVALUEConverts a date in the form of text to a serial numberDateGoogle Sheets
- DAYConverts a serial number to a day of the monthDateGoogle Sheets
- DAYSReturns the number of days between two datesDateGoogle Sheets
- DAYS360Calculates the number of days between two dates based on a 360-day yearDateGoogle Sheets