Calculate Years Between Two Dates
You have a start date — a birthdate, hire date, contract start, account creation — and need how many full years have passed since.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
DATEDIF measures the gap between two dates in the unit you pick: "Y" for completed years, "M" for completed months, "D" for days. It counts anniversaries, not calendar years — someone who started 15 March 2019 has 7 completed years on 8 July 2026, but someone who started 1 September 2020 has 5, because their sixth anniversary hasn't arrived yet. Excel accepts DATEDIF in every version but hides it from the function autocomplete — it's a documented leftover from Lotus 1-2-3, and it works.
When to use it
Use it for age from a birthdate, employee tenure, customer lifetime, equipment age, or contract duration — anywhere "how many full years" is the question.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveLast reviewed 2026-07-08