Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
=DATEDIF(DATE(A2,B2,C2),DATE(D2,E2,F2),"Y")Computed by a real spreadsheet engine on the sample data below.
| Birth year | Birth month | Birth day | As-of year | As-of month | As-of day |
| 2000 | 9 | 17 | 2026 | 9 | 16 |
=DATEDIF(DATE(A2,B2,C2),DATE(D2,E2,F2),"Y")→25
Both expressions are checked against an independently calculated expected result in HyperFormula. This is a sample execution check, not native Excel or Google Sheets certification.
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.
That overstates age before the birthday. DATEDIF counts completed years.
Change the output cell to Number or General; the result is a count of years.
Work with the current date and measure the gap between two dates.
How-toSubtract one date from another to get the number of days, or count working days with NETWORKDAYS. Works in both apps.
ReferenceCalculates the difference between two dates in years, months, or days using a unit code string.
How-toShift a date forward or back by a number of months with EDATE — it handles month lengths correctly. Works in both apps.
How-toMark rows whose due date has passed by comparing it to TODAY() with IF. Works the same in Excel and Google Sheets.
How-toUse DATEDIF with TODAY() to calculate a person's exact age in years from a birth date cell in Excel and Google Sheets.
Reviewed 2026-09-16
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: