How to Calculate Ages in Year in Excel

There are a couple of ways to calculate the age in years when you have the date of birth and the time for the age.

1. INT Function

The first method is to count the days between the two dates and divided by 365 for the years, then use the INT Function to extract the integer as the age in year.

=INT((B2-A2)/365)

where "B2-A2" is to count the days between the two dates.

If you have the date of birth and want to calculate the ages as of today, you can use the Today Function to get today's date.

=INT((TODAY()-A2)/365)

This method will have you the ages in year, however, since not all years are 365 days, the method theoretically could have you one day off.

2. YEARFRAC Function

YEARFRAC Function returns the fraction of the year between the start date and the end date.

=ROUNDDOWN(YEARFRAC(A2,B2,0),0)

Where 0 is the type of day count basis to use, and have you the actual difference between the two dates.

A2 is the start date and B2 is the end date.

3. DATEDIF Function

DATEDIF function counts the number of days, months, or years between two dates.

=DATEDIF(A2, B2, "Y")

Where A2 is the start date and B2 is the end date. If you need to count the age as of today, you will need to combine the Today() Function.

"Y" is the type of calculations, please see the full list of the types and explanations.

"Y"The number of years
"M"The number of months
"D"The number of days
"MD"The difference when ignoring the years and months
"YM"The difference when ignoring the years and days
"YD"The difference when ignoring the year

Leave a Reply