To find the age in Excel, the most efficient method is using the =DATEDIF(start_date, end_date, "unit") function. For example, if a birthdate is in cell A2, use =DATEDIF(A2, TODAY(), "y") to calculate the current age in completed years.

Calculating age is a common requirement for HR spreadsheets, school rosters, and customer databases. While Excel has many date functions, the DATEDIF function is specifically designed to calculate the difference between two dates in years, months, or days without requiring complex manual math. This guide covers how to set up your data and apply the formula correctly to ensure your ages update automatically every time you open the file.

What You'll Need

  • Microsoft Excel (any version)
  • A column containing birthdates formatted as "Date"
  • A blank column where the calculated age will be displayed

Step-by-Step

  1. Prepare Your Data: Ensure your birthdates are entered in a consistent format (e.g., MM/DD/YYYY). Select the cells containing the dates, go to the Home tab, and in the Number group, ensure the dropdown is set to Date.
  2. Select the Target Cell: Click on the empty cell where you want the age to appear (for example, cell B2, if the birthdate is in A2).
  3. Enter the DATEDIF Formula: Type the following formula exactly as shown: =DATEDIF(A2, TODAY(), "y").
    • A2 represents the cell with the birthdate.
    • TODAY() is a function that tells Excel to use the current date from your computer's system clock.
    • "y" tells Excel to return the difference in complete years.
  4. Press Enter: Once you hit Enter, Excel will display the number of full years that have passed between the birthdate and today.
  5. Apply to All Rows: To calculate the age for an entire list, hover your mouse over the bottom-right corner of the cell (the small green square called the Fill Handle) until the cursor becomes a thin black cross. Click and drag the handle down to the bottom of your list.
  6. Verify the Formatting: If the result looks like a weird date (e.g., 1/15/1900) instead of a number, the cell is formatted as a Date. Go to the Home tab, look at the Number dropdown, and change it to General or Number.

Common Mistakes

  • Using the wrong unit: Using "Y" (uppercase) usually works, but ensure you use quotation marks. If you use "m", you will get the age in months; if you use "d", you will get the age in days.
  • Date Order: The DATEDIF function requires the start date (birthdate) to come before the end date (today). If you put TODAY() first, Excel will return a #NUM! error.
  • Incorrect Date Formatting: If your dates are stored as text rather than actual date values, the formula will return a #VALUE! error. You can tell if a date is text if it is aligned to the left of the cell by default.
  • Forgetting the Parentheses: The TODAY() function must have empty parentheses after it. Writing TODAY without them will result in a #NAME? error.

Tips

  • Calculating Age as of a Specific Date: If you need to know how old someone was on a specific date (e.g., the start of a school year), replace TODAY() with a cell reference containing that specific date. Example: =DATEDIF(A2, C1, "y") where C1 is the cutoff date.
  • Adding "Years" Text: To make the result read "25 Years" instead of just "25", use the concatenation symbol (&). Use this formula: =DATEDIF(A2, TODAY(), "y") & " Years".
  • Detailed Age (Years, Months, Days): If you need a precise age, you can combine three DATEDIF functions:
    =DATEDIF(A2, TODAY(), "y") & "y, " & DATEDIF(A2, TODAY(), "ym") & "m, " & DATEDIF(A2, TODAY(), "md") & "d"
    This uses "ym" to find remaining months and "md" to find remaining days.

Troubleshooting

If your formula is not working, try these steps in order:

  1. Check for #NUM! errors: This almost always means your start date is later than your end date. Double-check that the birthdate cell is the first argument in the formula.
  2. Check for #VALUE! errors: This means Excel doesn't recognize one of the cells as a date. Select your date column, go to the Data tab, select Text to Columns, click Next twice, select Date (and the correct format, like MDY), and click Finish. This forces Excel to convert text to dates.
  3. Check for #NAME? errors: Ensure you have spelled DATEDIF and TODAY correctly and included the parentheses for the TODAY function.
  4. Check Cell Formatting: If the result looks like a date (e.g., 1900), change the cell format to General via the Home tab.

Frequently Asked Questions

Why isn't DATEDIF appearing in the formula autocomplete list?

DATEDIF is a "hidden" function in Excel. It was originally included for compatibility with Lotus 1-2-3. Because of this, Excel will not suggest it as you type, but it will work perfectly once you finish typing the formula and press Enter.

Can I calculate age without using DATEDIF?

Yes, you can use =(TODAY()-A2)/365.25. This subtracts the birthdate from today and divides by the average length of a year (including leap years). However, you will need to use the INT function to remove the decimals: =INT((TODAY()-A2)/365.25).

Will the age update automatically tomorrow?

Yes. Because the formula uses the TODAY() function, Excel recalculates the date every time the workbook is opened or refreshed, ensuring the age is always current.

How do I handle empty cells in my date column?

If a cell is empty, DATEDIF might return a very large number (because Excel treats an empty cell as the date 0). To prevent this, wrap your formula in an IF statement: =IF(A2="", "", DATEDIF(A2, TODAY(), "y")). This tells Excel to leave the age cell blank if the birthdate cell is empty.

Does this work in Google Sheets as well?

Yes, the DATEDIF function and the TODAY() function work exactly the same way in Google Sheets as they do in Microsoft Excel.