MS Excel: YEAR function for extracting the year from a date
- Fakhriddinbek
- 2 days ago
- 2 min read
Dates are critical in managing data across industries—whether you're tracking financial performance, organizing historical records, or scheduling future events. Excel’s YEAR function plays a key role in date manipulation by extracting the year from a given date. It's simple but powerful when used in financial models, time-series analysis, and reports requiring year-based grouping or filtering.

Syntax
=YEAR(serial_number)
Arguments:
Argument | Required | Description |
serial_number | ✅ Yes | A valid Excel date from which you want to extract the year. This can be a cell reference, a date string, or a formula result that returns a date. |
Examples
Example 1: Basic Usage
=YEAR(DATE(2025, 5, 2))
Result: 2025
Example 2: Extract Year from a Cell
Assume cell A2 contains 15/08/2023:
=YEAR(A2)
Result: 2023
Example 3: Use with TODAY()
=YEAR(TODAY())
Result: Returns the current year dynamically, e.g., 2025.
Example 4: Calculate Age Based on Birth Year
Assume cell B2 contains a birthdate (e.g., 1990-04-25):
=YEAR(TODAY()) - YEAR(B2)
Result: 35 (as of 2025)
Excel stores dates as serial numbers. For example:
January 1, 1900 = 1
May 2, 2025 = 45070
The YEAR function extracts the year portion from these serial values using Excel’s internal calendar system.
Sample Table
Date | Formula | Result |
2023-06-01 | =YEAR(A2) | 2023 |
01/01/2000 | =YEAR(A3) | 2000 |
TODAY() | =YEAR(TODAY()) | 2025 |
Common Errors
Error | Cause |
Non-date text passed as argument | |
Incorrect Result | Date is stored as text and not properly converted |
Fix Tip: Ensure dates are in valid date format, or wrap text dates with DATEVALUE:
=YEAR(DATEVALUE("01-Jan-2022"))
Related Functions
Function | Description |
MONTH() | Returns the month (1–12) from a date |
DAY() | Returns the day (1–31) from a date |
TODAY() | Returns the current date |
YEARFRAC() | Returns the fraction of a year between two dates |
Summary Table
Feature | Details |
Function Name | YEAR |
Purpose | Extract year from a date |
Returns | Integer (e.g., 2025) |
Input Type | Date serial or date-formatted cell |
Excel Version | Available in all versions |
Common Uses | Age calculation, year filtering, reports by year |
Conclusion
The YEAR function is a foundational date function in Excel, enabling year-based calculations, sorting, and filtering. Whether used in dashboards, formulas, or conditional logic, it's a handy tool for any Excel user working with time data.
Comments