Excel YEAR Function (Year Number) – Examples & Practice
Practice the Excel YEAR function online with an interactive grid, instant feedback, and clear formula help.
Instruction
Extract the year number from date in A2.
Formula Syntax
=YEAR(serial_number)
- serial_number: The date whose year you want.
What it does
YEAR extracts the four-digit year from a date serial. It is commonly used for YoY keys and cohort labeling.
Excel YEAR Function Examples
Extract year
=YEAR(A2)
Returns the four-digit year from a date serial.
date-calendar.xlsx
| A | B | |
|---|---|---|
| 1 | Date | Offset Months |
| 2 | 2026-01-15 | 0 |
| 3 | 2026-02-28 | 1 |
| 4 | 2026-03-31 | -1 |
| 5 | 2026-07-04 | 2 |
| 6 | 2026-12-20 | 3 |
| 7 | Output |
Input Formula
Need Help?
Tips
- Keep a calendar table for fiscal mapping when rules are complex.
- Validate imports so YEAR never runs on blank text.
- Pair with MONTH/DAY for full splits.
YEAR Function Use Cases
- YoY reporting keys
- Cohort analysis
- Rolling year filters in SUMIFS
- Audit trails with year stamps
- Cleaning multi-year datasets
Common mistakes - YEAR function not working
- Using YEAR on text years without coercion
- Confusing fiscal year with calendar year
- Expecting YEAR to format output as text automatically
- Mixing serial dates from different systems
- Forgetting leap day edge cases in multi-year spans
FAQ
Does YEAR return a two-digit year?
YEAR returns the full numeric year (e.g., 2026).
YEAR vs TEXT?
Use TEXT if you need a formatted string like "FY2026".
Can YEAR be used in model segmentation?
Yes, for YoY filters and cohort keys.
Does YEAR work on time-only values?
Be careful: time-only cells may anchor to an unexpected base date.
Why is YEAR wrong after import?
Often caused by text dates or wrong locale parsing upstream.
Comparison
| Function | Output |
|---|---|
| YEAR | Numeric year |
| TEXT | Custom string |
| DATE | Builds a date |
Example
=YEAR(A2)
Advanced examples
Fiscal year label
Combine YEAR with month thresholds in IF/IFS to tag fiscal years consistently.