Exact Age in Years, Months & Days

Excel Formulas › Date & Time

All versionsDATEDIF

“42 years, 3 months, 18 days.” DATEDIF breaks an age (or any duration) into whole years, leftover months, and leftover days — with three different unit codes doing the work.


Quick formula: for a birth date in B1 (to today):
=DATEDIF(B1, TODAY(), "y") & " yrs, " & DATEDIF(B1, TODAY(), "ym") & " mo, " & DATEDIF(B1, TODAY(), "md") & " days"
The codes: "y" = whole years, "ym" = months past the last full year, "md" = days past the last full month.

Functions used (tap for the full reference guide):

The example

Born March 1, 1983, measured to June 17, 2026.

AB
1Birth date3/1/1983
2Years43
3+ Months3
4+ Days16

The formula

The three components, combined into one label:

=DATEDIF(B1,TODAY(),"y")&" y, "&DATEDIF(B1,TODAY(),"ym")&" m, "&DATEDIF(B1,TODAY(),"md")&" d" // → 43 y, 3 m, 16 d

How it works

DATEDIF returns a different slice for each unit code:

  1. "y" gives complete years between the dates — the age in years.
  2. "ym" gives the months remaining after those whole years (0–11).
  3. "md" gives the days remaining after the whole months.
  4. Concatenate all three with & for a human-readable string, or keep them in separate cells for sorting and math.

DATEDIF is hidden but works everywhere. Excel doesn’t show it in autocomplete or document it in the function list, but it’s supported in every version. Just type it in full.

Try it: interactive demo

Live demo

Enter a birth (or start) date.

Variations

Just whole years

Age in years only:

=DATEDIF(B1, TODAY(), "y")

Total months

Whole months across the whole span:

=DATEDIF(B1, TODAY(), "m")

Total days

Or simply subtract:

=TODAY() - B1

Pitfalls & errors

"md" can misbehave. The day-only code occasionally returns odd results across month boundaries with very different month lengths. For critical calcs, verify against a manual check.

Order matters. The earlier date goes first. A start date after the end date returns a #NUM! error.

No autocomplete. Excel won’t suggest DATEDIF as you type — that’s expected. Type the whole name and the quoted unit code.

Practice workbook

📊
Download the free Exact Age in Years, Months & Days practice workbook
An age calculator with the y/ym/md breakdown, whole-years and total-months variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I calculate exact age in years, months, and days in Excel?
Combine three DATEDIF calls: =DATEDIF(birth,TODAY(),"y") for years, "ym" for leftover months, and "md" for leftover days.
Why doesn't Excel show DATEDIF in autocomplete?
DATEDIF is an undocumented legacy function. It works in every version, but you must type the full name yourself; Excel won't suggest it.
How do I get just the age in years?
Use =DATEDIF(birth, TODAY(), "y"), which returns the number of complete years.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Calculate age · Days until a date · Add months to a date

Function references: DATEDIF · TODAY