How to calculate age in Excel from a date of birth

Someone born on March 15, 1990 is 36 years, 7 months, and 27 days old on November 11, 2026. This is the sample on the age LAMBDA page. The 36th birthday is March 15, 2026, and November 11 is after that birthday, so the year count is 36. The month anniversaries then run March 15, April 15, May 15, June 15, July 15, August 15, September 15, and October 15. That is 7 completed months. November 15 has not arrived. October 15 plus 16 days is October 31, and November 11 is 11 days after that. 16 + 11 = 27.

DATEDIF
=DATEDIF(DATE(1990,3,15),DATE(2026,11,11),"Y")
=DATEDIF(B1,B2,"Y")B3
Age on November 11, 2026
AB
1Born3/15/1990
2As of11/11/2026
3Years36
4Months7
5Days27
A picture of the sheet, not a live calculator. The 36th birthday is March 15, 2026. Seven months later is October 15. November 11 is 27 days after October 15.

DATEDIF is the function that returns those three pieces. Excel calculates it and leaves it out of the Insert Function list, so type the name. "Y" is completed years. "YM" is the completed months after those years are removed. "MD" is the completed days after those months are removed.

=DATEDIF(DATE(1990,3,15), DATE(2026,11,11), "Y")
=DATEDIF(DATE(1990,3,15), DATE(2026,11,11), "YM")
=DATEDIF(DATE(1990,3,15), DATE(2026,11,11), "MD")

Those return 36, 7, and 27. "D" returns the whole span in days, 13,390. =DAYS(DATE(2026,11,11), DATE(1990,3,15)) returns the same 13,390. Put the birth date first. An as-of date earlier than the birth date returns #NUM!.

The 15th exists in every month, so this 27 is a count you can check on a calendar. "MD" has long-standing wrong results when the day of the month does not exist in the previous month, especially around the 31st. For a day count you want to audit, use "D".

One name for the three numbers

xl.age.ymd spills years, months, and days across three cells:

=xl.age.ymd(DATE(1990,3,15), DATE(2026,11,11))

The spill is 36, 7, and 27. Save the name from that page the way the LAMBDA how-to describes. The name needs Microsoft 365, Excel 2024, or Excel for the web. Excel 2021 returns #NAME?. The three DATEDIF formulas work without it.

A fraction of a year is a different number

YEARFRAC divides a span by a year and returns one decimal. Start it at the last birthday so the day count stays inside 2026, which has 365 days. March 15 to November 11 is 241 days. You can check that with =DAYS(DATE(2026,11,11), DATE(2026,3,15)). DAYS takes the later date first. YEARFRAC takes the start date first.

YEARFRAC
=YEARFRAC(DATE(2026,3,15),DATE(2026,11,11),1)
=YEARFRAC(B1,B2,1)B3
Fraction since the birthday
AB
1Birthday3/15/2026
2As of11/11/2026
3Actual/actual0.660274
430/3600.655556
A picture of the sheet. March 15, 2026 to November 11, 2026 is 241 days, and 2026 has 365 days. Basis 1 shows six decimals of 241/365. Basis 0 is the 30/360 count, 236/360.

Basis 1 is actual days divided by the actual length of the year. 241 / 365 = 0.6602739726…, which displays as 0.660274 to six decimal places. The full value is 0.660273973. Completed years plus that fraction:

=DATEDIF(DATE(1990,3,15), DATE(2026,11,11), "Y")+YEARFRAC(DATE(2026,3,15), DATE(2026,11,11), 1)

To nine decimal places, the sum is 36.660273973.

Leave the basis off and Excel uses the US 30/360 count. From the 15th to the 11th is 8 months of 30 days, minus 4 days: 240 − 4 = 236. 236 / 360 = 0.655555…, which displays as 0.655556. Pass 1 when you want 241/365.


More from the blog