Calculate Age Using Birth Date in Excel | Formula & Tool


Calculate Age Using Birth Date in Excel: The Ultimate Guide & Tool

An interactive tool to calculate age and a complete guide to doing it yourself in any Excel spreadsheet.

Age Calculator Tool

Use this calculator to instantly find the age between two dates. The results mirror the output of Excel’s DATEDIF function.



Enter the starting date (date of birth).


Defaults to today’s date. This is the end date for the calculation.

What Does it Mean to Calculate Age Using Birth Date in Excel?

To calculate age using birth date in Excel is the process of finding the chronological age of a person or the duration of a project by using a start date (like a date of birth) and an end date (usually the current day). This is a fundamental task in data management, especially in fields like human resources, demographics, and project tracking. Instead of manually counting years, you can use powerful Excel functions to get precise results instantly.

While simple subtraction might seem intuitive, Excel’s date functions are necessary to correctly handle complexities like leap years. The most reliable tool for this job is the DATEDIF function, a versatile but “hidden” function that provides accurate results in years, months, or days. Understanding how to use it is key to mastering age-related calculations in your spreadsheets.

The DATEDIF Formula to Calculate Age in Excel

The most accurate and flexible way to calculate age using birth date in Excel is with the DATEDIF function. [1] Though it doesn’t auto-populate like other functions, it is highly effective. [14] The syntax is:

=DATEDIF(start_date, end_date, unit)

This function calculates the difference between two dates based on the unit you specify. [11] To find someone’s age, your start_date would be their birth date, and the end_date would typically be the current date, which you can get using the TODAY() function.

Formula Variables Explained

Variables used in the DATEDIF function
Variable Meaning Unit (in Excel) Typical Range
start_date The beginning of the period, e.g., a birth date. A valid Excel date (e.g., cell reference like A2) Any date before end_date.
end_date The end of the period. Use TODAY() for current age. A valid Excel date (e.g., TODAY() or a cell reference) Any date after start_date.
unit The type of interval to return (Years, Months, Days). Text string (e.g., “Y”, “M”, “D”, “YM”, “MD”) See unit table below.

DATEDIF Unit Codes

Unit codes for the DATEDIF function’s third argument
Unit Code Returns the number of…
"Y" Complete years between the two dates. [5]
"M" Complete months between the two dates.
"D" Total days between the two dates.
"YM" Complete months, ignoring the year part of the dates. [4]
"MD" Complete days, ignoring the month and year part of the dates. (Note: This unit has a known bug). [2]
"YD" Complete days, ignoring the year part of the dates.

Practical Examples in Excel

Here’s how you can apply these formulas in a real spreadsheet. For these examples, assume the birth date is in cell A2 and the current date is referenced using TODAY().

Example 1: Calculate Complete Years (Common Age)

To get the age in whole years, which is the most common requirement.

  • Input (Cell A2): 10/15/1990
  • Formula: =DATEDIF(A2, TODAY(), "Y")
  • Result: An integer representing the person’s current age in years. [2]

Example 2: Calculate Exact Age in Years, Months, and Days

To get a detailed breakdown, similar to our calculator above, you can combine multiple DATEDIF calls using concatenation (&).

  • Input (Cell A2): 05/20/1985
  • Formula: =DATEDIF(A2, TODAY(), "Y") & " Years, " & DATEDIF(A2, TODAY(), "YM") & " Months, " & DATEDIF(A2, TODAY(), "MD") & " Days"
  • Result: A text string like “38 Years, 8 Months, 6 Days”. [3]
  • Internal Link: For more complex formulas, see our guide on top 10 Excel formulas.

How to Use This Age Calculator

Our web calculator simplifies the process of finding an age, giving you the same result as the Excel formulas without the manual work.

  1. Enter the Birth Date: Use the date picker to select the start date.
  2. Select the ‘As Of’ Date: This defaults to the current day. You can change it to any other date to calculate an age at a specific point in time.
  3. Click ‘Calculate Age’: The results will appear instantly below.
  4. Interpret the Results: You will see the primary result as a string (e.g., 30 years, 5 months, 10 days) and separate values for total years, months, and days. The chart provides a quick visual comparison.

The calculation performed here is an exact replica of combining the DATEDIF function with “Y”, “YM”, and “MD” units, providing a perfect demonstration of the excel age formula in action.

Key Factors That Affect Age Calculation in Excel

  • Leap Years: A key reason to use DATEDIF over simpler math like /365.25 is that it accurately accounts for leap years. [5]
  • Date Formatting: Excel must recognize your dates as dates, not text. Ensure cells are formatted correctly (e.g., “Short Date”).
  • End Date vs. Start Date: The end_date must be later than the start_date, or DATEDIF will return a #NUM! error. [6]
  • The TODAY() Function: Using TODAY() makes your sheet dynamic. [15] The calculated age will automatically update each day you open the workbook.
  • The DATEDIF “MD” Bug: The “MD” unit is known to sometimes produce incorrect or negative results, especially around month-end dates. [2] Be cautious when using it for critical calculations.
  • Excel’s Date System: Excel stores dates as sequential serial numbers starting from January 1, 1900. This allows it to perform calculations, but also means dates before 1900 cannot be used in formulas without special workarounds. [2]

Understanding these factors will help you troubleshoot issues when you calculate age from date of birth in excel. A great companion tool for this is a date difference calculator.

Frequently Asked Questions (FAQ)

1. How do I calculate age in just years in Excel?

Use the formula =DATEDIF(A2, TODAY(), "Y"), where A2 holds the birth date. This will return the number of full years that have passed. [1]

2. Why is my DATEDIF formula returning a #NUM! error?

This usually happens when the start_date is later than the end_date. [9] Double-check that your birth date is before the “as of” date.

3. Can I calculate the age of a list of people at once?

Yes. Enter the formula in the first cell of your “Age” column, then click and drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to all other rows.

4. What’s the difference between DATEDIF and just subtracting the dates?

Subtracting dates (e.g., =B2-A2) gives you the total number of days between them. To get years, you’d have to divide, which is less accurate than DATEDIF due to leap years. [6]

5. Why can’t I find DATEDIF in Excel’s function list?

DATEDIF is a “compatibility” function included for legacy support with Lotus 1-2-3 spreadsheets. [14] It works perfectly but is not documented or listed in Excel’s formula autocomplete. You must type it in manually.

6. How can I find someone’s age on a specific future date?

Replace TODAY() with the specific date in your formula, like so: =DATEDIF(A2, "2030-01-01", "Y"). You can also reference another cell containing that future date. [4]

7. Does this method for an age calculation spreadsheet work in Google Sheets?

Yes, the DATEDIF function and the same syntax work identically in Google Sheets, making it a cross-platform solution. [18]

8. Is there an alternative to DATEDIF for calculating age?

Yes, you can use the YEARFRAC function, such as =INT(YEARFRAC(A2, TODAY())). It calculates the year fraction between two dates. While often accurate, DATEDIF is generally considered more straightforward for getting a simple integer age. [21]

© 2026 Your Website. All rights reserved.


Leave a Reply

Your email address will not be published. Required fields are marked *