Excel is one of the most powerful tools for calculating age. Whether you're managing employee data, student records, or customer databases, these 3 methods will help you calculate age accurately.
The DATEDIF function calculates the difference between two dates in years, months, or days.
Result: 31 Years, 1 Months, 7 Days
Result: 31
"Y" — Complete years"M" — Complete months"D" — Complete days"YM" — Months after subtracting years"MD" — Days after subtracting months"YD" — Days after subtracting yearsNote: Replace A1 with the cell containing the date of birth.
The YEARFRAC function gives age as a decimal number. Use INT to get the whole number.
Result: 31
Advantage: Simpler formula. Disadvantage: May have small rounding differences.
For rough age calculation, just subtract birth year from current year:
Result: 31
Warning: This doesn't account for whether the birthday has passed this year. Use only for estimates.
Instead of TODAY(), use any date cell:
Where A1 is the DOB and B1 is the cut-off date (like 1 August 2027).
A: Microsoft has never added a dedicated AGE function. DATEDIF is the closest alternative — it's undocumented but works in all versions.
A: Yes — enter the formula in the first cell, then drag the fill handle down to apply it to all rows.
A: Convert them to actual dates first using DATEVALUE() or by changing the cell format to Date.
A: Yes — Google Sheets supports DATEDIF with the same syntax.