How to calculate age from a date of birth
Working out an exact age is easy once you know the order: years, then months, then days. Here is the method behind the age calculator and the formulas for spreadsheets.
By hand
- Subtract the birth year from this year.
- If this year's birthday is still ahead, subtract 1.
- Count the whole months since the last birthday.
- Count the days since the last monthly date.
Worked example
Born August 20, 1995, age on March 5, 2026: 2026 − 1995 = 31, but the birthday in August has not come yet, so 30 years. From August 20, 2025 to February 20, 2026 is 6 months; February 20 to March 5 is 13 days. The age is 30 years, 6 months and 13 days.
In Excel and Google Sheets
=DATEDIF(A1,TODAY(),"Y") gives the age in whole years. Add "YM" for the remaining months and "MD" for the days, although Microsoft warns that "MD" can be wrong at the end of months. =TODAY()-A1 gives the age in days.