Arte SheetsLearn. Try. Understand.

Date & Time

Calculate age from birthdate: exact years and months as of any date

Compute completed age in whole years and remaining months from a date of birth without off-by-one rounding errors.

Why dividing days by 365.25 gets birthdays wrong

Approximating age with INT((AsOfDate - BirthDate) / 365.25) can misstate a person's age by a year right on or near their birthday because leap years do not fall every 0.25 years.

DATEDIF(BirthDate, AsOfDate, "Y") checks actual calendar month and day boundaries, advancing the age count strictly on the birthday itself.

For February 29 births, define the non-leap-year anniversary rule separately if your application needs one. This example demonstrates ordinary calendar dates rather than every legal or administrative age convention.

BirthDate (A)AsOfDate (B)Completed Years ("Y")Extra Months ("YM")
1994-08-202026-04-15317
1994-08-202026-08-20320

Combine years and months into a readable age label

On April 15, 2026, someone born August 20, 1994 is 31 years and 7 completed months old. Combine "Y" and "YM" to display "31y 7m".

=DATEDIF(A2, B2, "Y")

Guard future birthdates (#NUM!)

If BirthDate is later than AsOfDate, DATEDIF returns #NUM!.

=DATEDIF(A2, B2, "Y") & "y " & DATEDIF(A2, B2, "YM") & "m"

Try the example

Use the original values or change them to test your understanding.

Further reading