Calculate Age from a Birthdate

Excel Formulas › Date & Time

All versionsDATEDIFAuto-updating

To turn a date of birth into an age in completed years, use DATEDIF with TODAY(). It counts whole years and rolls over only on the actual birthday — and because it’s built on TODAY(), every age recalculates itself each day the file is opened.


Quick formula: for a birthdate in B2, age in whole years:
=DATEDIF(B2, TODAY(), "Y")
The "Y" unit returns completed years. Use "YM" and "MD" for the leftover months and days.

Functions used (tap for the full reference guide):

The example

A short roster of birthdates. We want each person’s current age in years (calculated as of today).

ABC
1NameBirthdateAge
2Maria3/14/199036
3Devon11/02/200124
4Priya7/30/198540

The formula

The age formula in C2, copied down:

=DATEDIF(B2, TODAY(), "Y") // completed years as of today

How it works

DATEDIF measures the gap between two dates in the unit you ask for:

  1. The start date is the birthdate in B2; the end date is TODAY(), which always returns the current date.
  2. The unit "Y" tells DATEDIF to return only the number of complete years between them — it does not round up.
  3. Because the end date is TODAY(), the age updates automatically; you never have to edit it.
  4. For a full breakdown, combine units: =DATEDIF(B2,TODAY(),"Y")&"y "&DATEDIF(B2,TODAY(),"YM")&"m".

DATEDIF is the hidden function. It doesn’t appear in Excel’s formula AutoComplete and isn’t documented in the function list, but it works in every version. Type it in full and it calculates.

Try it: interactive demo

Live demo

Pick a birthdate and see the age DATEDIF would return today.

Age today:

Variations

Years, months, and days together

A friendly "36y 4m 12d" string:

=DATEDIF(B2,TODAY(),"Y")&"y "&DATEDIF(B2,TODAY(),"YM")&"m "&DATEDIF(B2,TODAY(),"MD")&"d"

Age at a specific date (not today)

Swap TODAY() for any end date, e.g. age on an event date in C2:

=DATEDIF(B2, C2, "Y")

Decimal age with YEARFRAC

When you need a fractional age (e.g. 35.7 years):

=YEARFRAC(B2, TODAY(), 1) // basis 1 = actual/actual

Pitfalls & errors

#NUM! error. DATEDIF returns #NUM! if the start date is after the end date. Make sure the birthdate is the first argument and is in the past.

Don’t use (TODAY()-B2)/365. Dividing days by 365 ignores leap years and drifts off by a day or more over a lifetime. DATEDIF with "Y" is exact.

The "MD" unit has known quirks around month-end and can occasionally miscount days. For the day component most people never notice, but if precision matters, verify edge cases.

Practice workbook

📊
Download the free Calculate Age from a Birthdate practice workbook
The roster with live DATEDIF ages, the y/m/d breakdown, and the YEARFRAC decimal version, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

What's the best formula to calculate age in Excel?
=DATEDIF(birthdate, TODAY(), "Y") for completed years. It updates automatically each day and counts whole years correctly, rolling over only on the actual birthday.
Why doesn't DATEDIF show up when I type it?
DATEDIF is an undocumented legacy function kept for Lotus 1-2-3 compatibility. It has no AutoComplete entry and no argument tooltip, but it works in every version of Excel if you type the whole formula.
How do I calculate age in years and months?
Combine units: =DATEDIF(B2,TODAY(),"Y")&"y "&DATEDIF(B2,TODAY(),"YM")&"m". "Y" gives whole years and "YM" gives the leftover months.
How do I get a decimal age like 35.7?
Use =YEARFRAC(B2, TODAY(), 1), which returns the fraction of years between the dates using the actual/actual day-count basis.

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: Working days between dates · First & last day of month · Sum by month

Function references: DATEDIF · TODAY · YEARFRAC