Quick Navigation
YEAR Function
Summary
The Excel YEAR function extracts the year from any date value, returning it as an integer between 1900 and 9999. It's essential for date analysis, grouping data by year, and creating dynamic reports based on date components.
Syntax
YEAR(serial_number)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| serial_number | Date |
Yes | The date containing the year you want to extract. Enter using DATE function or as result of other formulas. |
Using the YEAR Function
YEAR is a fundamental date function used to isolate the year portion from any date for analysis, filtering, grouping, and calculations. It converts Excel's date serial numbers back to readable year values for reporting and dashboard creation.
Common YEAR Examples
Extract Year from Cell Date
=YEAR(A2)
Returns 2023 when A2 contains 7/5/2023.
Using with DATE Function
=YEAR(DATE(2025,12,31))
Extracts 2025 from December 31, 2025 date.
Year from TODAY Function
=YEAR(TODAY())
Returns current year from today's date.
Frequently Asked Questions
Common Errors and Solutions
#VALUE!
Cause: serial_number is not a valid date (text, invalid format)
Solution: Use DATE function or DATEVALUE to convert text to date
#NUM!
Cause: serial_number is negative or invalid serial number
Solution: Ensure date is within valid Excel date range (1900-9999)
Notes
- Excel stores dates as serial numbers starting January 1, 1900 = 1
- YEAR always returns Gregorian values even if date displays in other calendars (Hijri, etc.)
- Use in combination with MONTH and DAY for complete date decomposition
- Ideal for PivotTable row grouping by year
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365
Not available in:
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+