Age Calculator in Excel: How to Calculate Exact Age
A few formulas turn a spreadsheet into an age calculator. Here is how to calculate age in Excel in whole years or in years, months and days, how to check the answer by hand, and the few dates where spreadsheets and age calculators disagree.
By the BdayChecker team · Published October 21, 2026 · Updated October 21, 2026 · 4 min read

Quick answer: with the birth date in cell A2, type =DATEDIF(A2,TODAY(),"Y") to get the age in complete years. It updates every day. The same formula works in Google Sheets.
Build an age calculator in Excel with DATEDIF
DATEDIF counts the time between two dates in a unit you choose. Its form is =DATEDIF(start_date, end_date, unit), and for age in years the unit is "Y":
- Type the birth date in cell A2, for example 3/21/1996.
- In B2, type
=DATEDIF(A2,TODAY(),"Y")and press Enter.
On October 5, 2026, this gives 30. According to Microsoft, "Y" is the number of complete years in the period, so the age goes up only once the birthday has arrived. TODAY() makes the sheet recalculate each day.
Calculate exact age in years, months and days
For an exact age, work out each part in its own cell, with the birth date in A2:
| Part | Formula | Result |
|---|---|---|
| Years | =DATEDIF(A2,TODAY(),"Y") | 30 |
| Months | =DATEDIF(A2,TODAY(),"YM") | 6 |
| Days | =TODAY()-EDATE(A2,DATEDIF(A2,TODAY(),"M")) | 14 |
Results are for a birth date of March 21, 1996, on October 5, 2026: 30 years, 6 months and 14 days. "YM" gives the months left over after the complete years. Format the days cell as a number, or Excel shows it as a date.
To show it all in one cell, join the parts with text:
=DATEDIF(A2,TODAY(),"Y")&" years, "&DATEDIF(A2,TODAY(),"YM")&" months, "&TODAY()-EDATE(A2,DATEDIF(A2,TODAY(),"M"))&" days"
Why not use DATEDIF with "MD" for the days?
DATEDIF has an "MD" unit for the days left after whole months, and many guides use it. Microsoft advises against it: it says "MD" has known limitations and may give a negative number, a zero or a wrong result.
We saw this in testing. From January 31, 2000 to March 1, 2026, "MD" returned -2 days in LibreOffice Calc. The EDATE formula above counts the days from the last complete month instead, and returned 1, the right answer.
Other ways to calculate age in Excel
You will see these formulas too. Each has a catch.
=YEAR(TODAY())-YEAR(A2)subtracts the years only, so it is a year too high until the birthday comes round. For a December 15, 1985 birthday it gave 41 on October 5, 2026; the person was 40.=INT(YEARFRAC(A2,TODAY(),1))gives complete years using an actual day count (basis 1). Leave the basis out and YEARFRAC uses a 30-day-month method, which Microsoft says can go wrong when the start date is the last day of February.=INT((TODAY()-A2)/365.25)divides the days lived by an average year. It is often a year short on the birthday itself: for someone born January 1, 1990, it gives 17 on their 18th birthday, January 1, 2008.
For age in whole years, DATEDIF with "Y" is the simplest choice that is always right on the birthday itself.
How to calculate your exact age by hand
You can check any spreadsheet with pen and paper. Write today's date above the birth date and subtract the days, then the months, then the years. When a column comes out negative, borrow from the column to its left.
Example: born March 21, 1996, on October 5, 2026.
- Days: 5 minus 21 is negative, so borrow a month. September, the month before October, has 30 days: 5 + 30 = 35, and 35 minus 21 = 14 days.
- Months: October is now 9 after the borrow. 9 minus 3 = 6 months.
- Years: 2026 minus 1996 = 30 years.
The answer is 30 years, 6 months and 14 days, the same as the formulas. If the months come out negative, borrow a year and add 12.
Where spreadsheets and age calculators disagree
For most dates every method agrees. Two cases are worth knowing.
- Birthdays at the end of a month. Someone born August 31 has no September 31. From August 31, 1990 to October 5, 2026, counting by hand with a borrowed month gives 36 years, 1 month and 4 days. The EDATE formula above treats September 30 as the end of the month and gives 1 month and 5 days, and so does our Age Calculator. Both follow a consistent rule; they just pick a different day for the missing date.
- February 29 birthdays. In common years most people born on a leap day celebrate on February 28. DATEDIF waits for March 1: on February 28, 2026 it gave 25 years for a February 29, 2000 birth date. Our calculator gives 26, following the February 28 custom.
If a date lands on one of these edges, say which rule you used. For school, medical or test forms, the Chronological Age Calculator shows its rule with the answer.
Conclusion
For an age calculator in Excel, use =DATEDIF(A2,TODAY(),"Y") for whole years, add "YM" for months, and count the days with EDATE rather than "MD". The same formulas work in Google Sheets. For a quick answer without a spreadsheet, the Age Calculator gives the exact age to the second, and How Many Days Old Am I counts every day you have lived.