Calculate Age in Excel Using TODAY()
This tool mimics Excel’s functionality to calculate the precise age in years, months, and days from a given birth date.
Age component breakdown chart
What is ‘Calculate Age in Excel Using Today’?
To calculate age in Excel using today means using a formula to determine the current age of a person or the duration of an item based on a start date (like a date of birth) and the current date. The most common and accurate way to do this in Excel is by using the DATEDIF and TODAY functions. The TODAY() function automatically provides the current date, ensuring the calculation is always up-to-date, while DATEDIF calculates the difference between the two dates in specified units like years, months, or days.
This method is widely used by HR professionals for tracking employee service duration, by analysts for demographic studies, and for anyone needing to manage date-based records efficiently. Our Excel DATEDIF function guide provides more in-depth information.
Excel Age Calculation Formula and Explanation
The core of calculating age in Excel lies in the DATEDIF function. While there are other methods, such as dividing the day difference by 365.25, they are less accurate because they don’t fully account for leap years. The DATEDIF function is specifically designed for this task.
To get a complete age breakdown, you use three separate formulas:
- For full years:
=DATEDIF(start_date, TODAY(), "Y") - For months after full years:
=DATEDIF(start_date, TODAY(), "YM") - For days after full months:
=DATEDIF(start_date, TODAY(), "MD")
You can combine these into a single cell for a clean display: =DATEDIF(A2, TODAY(), "Y") & " Years, " & DATEDIF(A2, TODAY(), "YM") & " Months, " & DATEDIF(A2, TODAY(), "MD") & " Days", assuming the birth date is in cell A2.
| Variable | Meaning | Unit (in Formula) | Typical Value |
|---|---|---|---|
start_date |
The beginning date (e.g., date of birth). | Excel Date Serial | A valid date like A2 or "1/15/1990". |
end_date |
The ending date for the calculation. | Excel Date Serial | Usually TODAY() for current age. |
"Y" |
Calculates the number of complete years. | Text Unit | Returns an integer (e.g., 34). |
"YM" |
Calculates months remaining after subtracting full years. | Text Unit | An integer from 0 to 11. |
"MD" |
Calculates days remaining after subtracting full years and months. | Text Unit | An integer from 0 to 30. Caution: This unit can have bugs in some edge cases. |
For more examples, see our tutorial on the Excel date difference calculation.
Practical Examples
Example 1: Standard Age Calculation
Let’s say a person’s date of birth is August 17, 1985, and today is January 26, 2026.
- Inputs: Start Date = 1985-08-17, End Date = 2026-01-26
- Excel Formulas:
- Years:
=DATEDIF("1985-08-17", "2026-01-26", "Y")-> Result: 40 - Months:
=DATEDIF("1985-08-17", "2026-01-26", "YM")-> Result: 5 - Days:
=DATEDIF("1985-08-17", "2026-01-26", "MD")-> Result: 9
- Years:
- Final Result: 40 Years, 5 Months, 9 Days.
Example 2: Calculating Years of Service
An employee started working on October 30, 2015. You want to calculate their total years of service as of today (January 26, 2026).
- Inputs: Start Date = 2015-10-30, End Date = 2026-01-26
- Excel Formula:
=DATEDIF("2015-10-30", "2026-01-26", "Y") - Result: 10 completed years of service. A related article is our guide on how to calculate years of service in Excel.
How to Use This Age in Excel Calculator
- Enter the Birth Date: Click on the input field labeled “Enter Birth Date” and select a date from the calendar popup, or type it in YYYY-MM-DD format.
- View Real-Time Results: The calculator automatically updates as you select the date. No “calculate” button is needed.
- Interpret the Primary Result: The main display shows the age in the standard “Years, Months, Days” format. This mirrors the combined
DATEDIFformula output. - Check Intermediate Values: The boxes below show the same duration but converted into total years (with decimals), total months, total weeks, and total days for different perspectives.
- Reset the Calculator: Click the “Reset” button to clear the input and results, ready for a new calculation.
- Copy Results: Use the “Copy Results” button to easily paste the detailed age information elsewhere.
Key Factors That Affect Age Calculation in Excel
- Leap Years: Simple formulas that divide by 365 will be inaccurate over time.
DATEDIFandYEARFRACare better as they account for the extra day in leap years. - Date Formatting: Excel must recognize the cell content as a date, not as text. An entry like “Oct 15 2020” might be text, while “10/15/2020” is a date. Incorrect formatting will cause a
#VALUE!error. - Start Date vs. End Date: The start date must be earlier than the end date. If you use
DATEDIFwith a start date that is later than the end date, it will return a#NUM!error. - The TODAY() Function: Using
TODAY()makes the formula dynamic. The calculated age will automatically update each time you open the workbook. If you need a static age as of a specific date, you must hardcode that date instead of usingTODAY(). - The “MD” Unit Bug: The “MD” unit in
DATEDIFis known to produce incorrect results in certain situations, particularly in months with fewer than 31 days. Be cautious when needing day-level precision. - Excel’s Base Date System: Excel for Windows defaults to a 1900 date system, meaning dates before 1/1/1900 cannot be used in calculations, which can be a problem for historical data. For more on this, check out our article on the age formula in Excel.
Understanding the usage of TODAY() in Excel is fundamental for dynamic date calculations.
Frequently Asked Questions (FAQ)
1. What is the most accurate formula to calculate age in Excel?
The most accurate method is using the DATEDIF function, as in =DATEDIF(birth_date, TODAY(), "Y") for years. This is superior to simply dividing by 365 because it correctly handles leap years.
2. How can I show age as Years, Months, and Days in one cell?
You can concatenate three DATEDIF functions: =DATEDIF(A2, TODAY(), "Y") & " Y, " & DATEDIF(A2, TODAY(), "YM") & " M, " & DATEDIF(A2, TODAY(), "MD") & " D".
3. Why does my age formula show a #NUM! error?
A #NUM! error typically occurs if the start_date in your DATEDIF formula is later than the end_date. Ensure the birth date is in the past.
4. Can I calculate age as of a specific date instead of today?
Yes, simply replace TODAY() in the formula with the specific date in quotes (e.g., "12/31/2030") or a cell reference containing that date.
5. Is DATEDIF available in all versions of Excel?
Yes, but it’s a “compatibility” function from Lotus 1-2-3, so Excel doesn’t list it or provide formula help for it. You have to type it in manually.
6. What is the difference between YEARFRAC and DATEDIF?
DATEDIF(..., "Y") returns the number of *complete* years. YEARFRAC returns a decimal value representing the fraction of a year between two dates, which can be more precise for some financial calculations but requires using the INT function to get complete years.
7. How do I handle dates before 1900 in Excel?
Excel’s standard date system does not support dates before 1/1/1900. Calculating ages for these dates requires custom formulas or VBA macros and cannot be done with standard functions like DATEDIF.
8. My formula is returning a #VALUE! error. What’s wrong?
This error usually means one of the dates is not a valid date format recognized by Excel; it’s likely stored as text. Check your date cells and ensure they are formatted as dates.