Excel Age Calculator from Date of Birth
Enter a date of birth below to instantly generate the Excel DATEDIF formula to calculate age in years, months, and days.
Generate Your Age Formula
Age in complete years
=DATEDIF(A2, TODAY(), "Y")Remaining months (after full years)
=DATEDIF(A2, TODAY(), "YM")Remaining days (after full months)
=DATEDIF(A2, TODAY(), "MD")Full age as text
=DATEDIF(A2, TODAY(), "Y") & " years, " & DATEDIF(A2, TODAY(), "YM") & " months, " & DATEDIF(A2, TODAY(), "MD") & " days"Age in decimal years
=DATEDIF(A2, TODAY(), "Y") + DATEDIF(A2, TODAY(), "YM")/12How to Use the DATEDIF Formula in Excel
Excel's DATEDIF function calculates the difference between two dates. It's a hidden function — it works but doesn't appear in Excel's autocomplete.
Syntax
=DATEDIF(start_date, end_date, unit)| Unit | Returns |
|---|---|
| "Y" | Complete years |
| "M" | Complete months |
| "D" | Complete days |
| "YM" | Months, ignoring years |
| "YD" | Days, ignoring years |
| "MD" | Days, ignoring months and years |
Step-by-Step: Age from Date of Birth
- Put the date of birth in cell A2 (formatted as a date)
- In B2, enter:
=DATEDIF(A2, TODAY(), "Y") - The result is the person's current age in complete years
Calculate Age on a Specific Date
Replace TODAY() with any date to calculate age as of a specific date:
=DATEDIF(A2, "2026-01-01", "Y")Frequently Asked Questions
What is the Excel formula to calculate age from date of birth?
=DATEDIF(A2, TODAY(), "Y") where A2 contains the date of birth.
Why doesn't DATEDIF appear in Excel's formula list?
DATEDIF is an undocumented legacy function inherited from Lotus 1-2-3. It works in all modern Excel versions but won't appear in autocomplete suggestions.
How do I calculate someone's age including months?
Use: =DATEDIF(A2,TODAY(),"Y")&" years, "&DATEDIF(A2,TODAY(),"YM")&" months"