Excel Calculate Age on a Specific Future Date
In this article
Yes, Excel can calculate a person's age on any specific future date using the DATEDIF function or a simple arithmetic formula with the INT function. You provide a birth date and a target date (future or past), and Excel returns the completed years, months, or days between them. This is useful for planning retirement dates, eligibility checks, or milestone anniversaries.
in bd | Birth date | - | 1985-06-15 | 0 in td | Target date | - | 2030-01-01 | 0 out age_y | Age in years | years | DATEDIF(bd, td, "Y") | 0 out age_ym | Years and months | - | DATEDIF(bd, td, "Y") & "y " & DATEDIF(bd, td, "YM") & "m" | 0 out age_m | Total months | months | DATEDIF(bd, td, "M") | 0 out age_d | Total days | days | DATEDIF(bd, td, "D") | 0
Formula
The core formula is Excel's DATEDIF function, which calculates the difference between two dates in various units.
- =DATEDIF(start_date, end_date, "Y") – completed years
- =DATEDIF(start_date, end_date, "YM") – remaining months after full years
- =DATEDIF(start_date, end_date, "MD") – remaining days after full months
- =DATEDIF(start_date, end_date, "M") – total completed months
- =DATEDIF(start_date, end_date, "D") – total days
Alternatively, the formula =INT((end_date - start_date)/365.25) gives a rough age in years, but DATEDIF is more precise because it accounts for month boundaries and leap years correctly.
Worked Example
Using the default values from the calculator: birth date 1985-06-15 and target date 2030-01-01.
- Calculate full years: DATEDIF(1985-06-15, 2030-01-01, "Y") = 44 (because 1985+44=2029, and the 45th birthday in June 2030 hasn't occurred yet).
- Calculate remaining months: DATEDIF(..., "YM") = 6 (from June to December).
- Calculate remaining days: DATEDIF(..., "MD") = 17 (from Dec 15 to Jan 1, but since the target is Jan 1, the days are 0? Actually, let's compute: from 2029-06-15 to 2030-01-01 is 6 months and 17 days? Let's verify: 2029-06-15 + 6 months = 2029-12-15, plus 17 days = 2030-01-01. So YM=6, MD=17.
- So the age is 44 years, 6 months, and 17 days.
The calculator's first output shows 44 years, matching the DATEDIF "Y" result.
When to Use This Calculation
Calculating age on a future date is common in many real-world scenarios:
- Retirement planning: Determine when someone reaches a specific age like 65.
- Eligibility checks: For contests, scholarships, or programs with age cutoffs on a given date.
- Insurance or legal documents: Age as of a policy start date or contract date.
- Projecting milestones: When will a child turn 18, or when will an employee reach 10 years of service?
The formula works for any two dates – past, present, or future – as long as the target date is after the birth date. If the target date is earlier, DATEDIF returns an error (#NUM!).
Common Mistakes and How to Avoid Them
- Using the wrong unit code: "Y" gives years, "M" gives months, "D" gives days. Mixing them up is the most frequent error.
- Not formatting dates correctly: If your cells contain text that looks like dates, DATEDIF may misinterpret them. Ensure they are actual date values (right-aligned in the cell).
- Assuming 365.25 days per year: The INT((end-start)/365.25) method gives approximate years but can be off by a day due to leap years. DATEDIF is exact.
- Forgetting that DATEDIF is not in Excel's function list: It's a hidden function – you must type it manually. It works in all modern Excel versions, but it doesn't appear in the formula autocomplete.
How to Read the Result
The DATEDIF "Y" result gives the number of complete years. For example, if someone was born on 2000-02-29 (a leap day) and the target date is 2024-02-28, DATEDIF returns 23 because the 24th birthday hasn't occurred yet (2024-02-29 doesn't exist, so Excel treats it as March 1). This is the standard legal interpretation of age.
If you need the exact age in years, months, and days, combine multiple DATEDIF calls as shown in the calculator's second output. The "YM" and "MD" codes give the remaining months and days after the full years.
Limitations of the Formula
DATEDIF handles all dates from 1900 to 9999 (Excel's date range). However, there are a few limitations to keep in mind:
- It does not account for time of day – only the date portion matters.
- It cannot calculate negative differences (target date before birth date).
- For very large date ranges, the result may exceed Excel's row limits but still works correctly.
- If you need age in decimal years (e.g., 44.5), you can use =YEARFRAC(start_date, end_date) which gives a decimal age.
For most practical purposes, DATEDIF is the most accurate and straightforward method.
Frequently Asked Questions
Why doesn't DATEDIF appear in my Excel formula list?
DATEDIF is a hidden function that Excel includes for compatibility with Lotus 1-2-3. It works perfectly when typed manually, but it won't show up in the function wizard or autocomplete. Just type =DATEDIF( and Excel will recognize it.
Can I use this to calculate age in years and months only?
Yes. Use =DATEDIF(birth, target, "Y") for years and =DATEDIF(birth, target, "YM") for months. Combine them in a text string like =DATEDIF(birth, target, "Y") & " years, " & DATEDIF(birth, target, "YM") & " months".
What if the birth date is after the target date?
DATEDIF will return a #NUM! error. To handle this, you can wrap the formula in an IFERROR function, like =IFERROR(DATEDIF(birth, target, "Y"), "Not born yet").
Does this work with dates entered as text?
No. If your dates are text strings like "June 15, 1985", Excel may not recognize them as dates. Use the DATEVALUE function to convert them, or ensure the cells are formatted as dates.
How is this different from just subtracting dates?
Subtracting two dates gives the number of days between them. Dividing by 365.25 gives an approximate age in years, but it can be off by a day due to leap years. DATEDIF gives the exact completed years, months, and days based on calendar month lengths.
Can I calculate age as of today's date automatically?
Yes. Use =DATEDIF(birth, TODAY(), "Y") to get the current age. This updates automatically every time the worksheet recalculates.