Calculate Exact Age from Date of Birth in Excel Using DATEDIF

Use Excel's legacy DATEDIF function to compute precise ages (years, months, days) that account for leap years and avoid errors from dividing by 365.

What the video covers

Show how to calculate exact age from a Date of Birth cell using Excel's DATEDIF and TODAY() functions. Covers full years only and a combined years/months/days string, filling formulas down a column, and common error fixes.

Watch the video on YouTube

Step-by-step instructions

  1. Select target cell
    Click the empty cell where you want the age to appear next to the Date of Birth column (for example, the cell adjacent to B2).
  2. Enter the core formula for full years
    Type the formula =DATEDIF(B2, TODAY(), "Y") and press Enter. This returns the number of full years between the DOB in B2 and today.
  3. Fill the formula down
    With the cell selected, drag the fill handle or double-click it to copy the formula down the column so each row calculates age from its DOB cell.
  4. Create a years/months/days string (optional)
    For a detailed label, enter: =DATEDIF(B2, TODAY(), "Y") & " Years, " & DATEDIF(B2, TODAY(), "YM") & " Months, " & DATEDIF(B2, TODAY(), "MD") & " Days" and fill down. "YM" gives remaining months after full years; "MD" gives remaining days after the last full month.
  5. Verify dates and fix #NUM! errors
    If you get #NUM!, confirm the DOB is earlier than TODAY() and that the DOB cell contains a valid Excel date (not text). Swap arguments only if you intend to compute a negative span.
  6. Notes about the function
    DATEDIF is a legacy/hidden function — Excel won’t offer auto-complete or argument tooltips, so type the function name and argument codes exactly (StartDate, EndDate, Unit).

Watch the video

Video thumbnail for Calculate Exact Age from Date of Birth in Excel Using DATEDIF Play tutorial

Watch on YouTube

Why it matters

Dividing days by 365 ignores leap years and can drift over time. DATEDIF computes age using actual calendar dates, giving stable, accurate results for HR records, registries, and trackers.

Check your result

The result should match the number of full years between the DOB and today. For the detailed string, the components (Years, Months, Days) should add up to the span between the two dates.

Troubleshooting

If you see #NUM!, the start date is later than the end date — ensure DOB is the first argument. DATEDIF is a legacy function so Excel won’t show autocomplete; type the function and its arguments manually. If results look wrong, confirm DOB cells are real dates (not text).