Excel can calculate someone's exact age โ in complete years, or broken into years, months, and days โ from a birth date using the DATEDIF function. It's a single formula, and it updates automatically every day since it compares the birth date to today's date.
This guide from Anchor AI Tools covers the exact DATEDIF formula, how to get years/months/days together, a worked example with three birth dates, and the mistakes that trip people up most.
Quick Answer: To calculate age in Excel, use =DATEDIF(B2,TODAY(),"Y"), where B2 holds the birth date. This returns the person's age in complete years as of today. For a full breakdown, combine three DATEDIF calls to get years, months, and days.
=DATEDIF(birth_date, TODAY(), "Y")
Returns age in complete years as of todayDATEDIF stands for "date difference." It takes a start date, an end date, and a unit code, then returns the difference between the two dates in that unit. For age, the start date is the birth date, the end date is TODAY() (or a fixed date, if you want the age as of a specific point in time), and "Y" means complete years.
DATEDIF is one of the few Excel functions that doesn't show up in the formula autocomplete list โ it's undocumented in the Excel interface, but it works fully and reliably when typed manually, and it's the standard way to calculate age in Excel.
=DATEDIF(B2,TODAY(),"Y").Three birth dates, with age calculated as of August 25, 2026:
| Name | Birth Date | Age (Years) | Full Breakdown |
|---|---|---|---|
| Person A | June 8, 1994 | 32 | 32 yrs, 2 mo, 17 days |
| Person B | Jan 15, 2000 | 26 | 26 yrs, 7 mo, 10 days |
| Person C | Dec 1, 1988 | 37 | 37 yrs, 8 mo, 24 days |
๐ Formula Used
With birth date in B2, calculated as of today:
Notice Person C's birthday (December 1) hasn't happened yet this year as of August 25 โ so DATEDIF correctly counts from their most recent birthday (December 1, 2025), not from January 1 of the current year. This is exactly what makes DATEDIF more reliable than simply subtracting birth year from the current year.
To break age down fully โ the way a form or ID document often asks for it โ combine three DATEDIF calls with different unit codes into one text string:
| Unit Code | What It Returns |
|---|---|
"Y" | Complete years between the two dates |
"YM" | Remaining complete months, ignoring years |
"MD" | Remaining days, ignoring both years and months |
For Person A (born June 8, 1994, calculated as of August 25, 2026), this returns "32 years, 2 months, 17 days" โ the same result shown in the worked example table above.
If DATEDIF isn't available or you only need an approximate decimal age (for example, 32.2 years), YEARFRAC is a documented alternative:
Wrap it in INT() โ =INT(YEARFRAC(B2,TODAY())) โ to round down to complete years, similar to DATEDIF's "Y" unit. In practice, most spreadsheets use DATEDIF because it's simpler to read and gives clean years/months/days components without extra rounding.
Putting the dates in the wrong order. The birth date (start date) must come before the end date. Reversing them returns a #NUM! error.
Storing the birth date as text instead of a real date. If the cell is left-aligned by default, it may be text โ DATEDIF needs an actual date value to work correctly.
Typing "DATEDIF" and expecting autocomplete to help. Since it's undocumented, Excel won't show argument hints as you type โ double-check your commas and quotation marks manually.
Forgetting that TODAY() changes daily. A DATEDIF formula using TODAY() recalculates every time the file is opened. If you need the age frozen at a specific point in time, replace TODAY() with a fixed date instead.
This comes up constantly for HR teams checking eligibility or retirement dates, schools and enrollment offices verifying student age, healthcare and insurance forms, event and membership sign-ups, and anyone maintaining a customer or contact list with birth dates.
Working with payroll hours instead of dates? See our guide on how to calculate median in Excel for typical values in a dataset, or try our time to decimal calculator for quick conversions.
Need more free calculators and formula guides?
Explore Free Tools โ=DATEDIF(B2,TODAY(),"Y"), where B2 holds the birth date and "Y" returns the age in complete years.=DATEDIF(B2,TODAY(),"Y")&" years, "&DATEDIF(B2,TODAY(),"YM")&" months, "&DATEDIF(B2,TODAY(),"MD")&" days".=DATEDIF(B2,C2,"Y") where C2 holds the reference date.Percentage Calculator
Calculate percentage increase, decrease, and discounts.
Time to Decimal Calculator
Convert hours and minutes into decimal time for payroll.
Median in Excel
Find the typical value in a dataset with outliers.
Margin in Excel
Calculate profit margin with one formula.
Excel Ran Out of Resources
7 fixes for this common calculation error.
We build free, fast, and accurate online tools and guides that explain the answer โ not just show a number. Used by small business owners, analysts, and freelancers every day.
Published by Anchor AI Tools ยท ยฉ 2026 Anchor AI Tools