Function Problems

Calculate Age Between Two Dates with Excel DATEDIF

Kushani NimanthikaKushani Nimanthika Dec 2, 2026 868 views

Question details

Calculate complete years between two dates when Excel does not show DATEDIF in its function list or provide an input tooltip.

Calculate Age Between Two Dates with Excel DATEDIF
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to calculate age from a start date and an end date in a worksheet.
Observed behavior
DATEDIF does not appear in the function list or display an input tooltip in some Excel versions.
Before you start

Enter valid Excel dates in A2 and B2, with the earlier date in A2. If you are calculating age, use the birth date as the start date.

Solution 1Recommended

Enter DATEDIF Manually to Calculate Complete Years

Use this formula to calculate age in completed years, even when DATEDIF is absent from Excel's function list.

1
Select a result cell

Click an empty cell, such as C2, next to the dates in A2 and B2.

2
Type the formula

Enter =DATEDIF(A2,B2,"y") in the cell or formula bar and press Enter. The "y" argument returns complete years.

3
Check the result

Confirm that C2 displays the number of completed years. To calculate age as of today instead, enter =DATEDIF(A2,TODAY(),"y").

Enter DATEDIF Manually to Calculate Complete Years
If the formula returns an error: Check that A2 and B2 contain valid dates and that A2 is not later than B2. Depending on your regional settings, you may need semicolons instead of commas between arguments.
Calculate age in WPS Spreadsheet

Calculate Complete Years with DATEDIF in WPS Spreadsheet

Use WPS Spreadsheet to enter DATEDIF manually and calculate complete years between two dates, including in an Excel workbook.

  1. 1. Open a spreadsheet: Launch WPS Office and open a workbook in WPS Spreadsheet, or create a blank spreadsheet.
  2. 2. Enter the dates: Enter the earlier date in A2 and the later date in B2.
  3. 3. Calculate complete years: Select C2, type =DATEDIF(A2,B2,"y"), and press Enter.
  4. 4. Save the workbook: Use File > Save As to save the spreadsheet in a format such as XLSX.
Calculate completed years between a birth date and an end dateOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar spreadsheet interface for formulas and date valuesWork with spreadsheets using the free WPS Office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why can't I find DATEDIF in Excel's function list?

DATEDIF is not well documented in some Excel versions and may not appear in the function list or show a tooltip. Type it directly into a cell or the formula bar.

How do I calculate someone's current age in Excel?

If the birth date is in A2, enter =DATEDIF(A2,TODAY(),"y") in an empty cell. The result is the number of complete years as of today.

Why does my DATEDIF formula return an error?

Check that both cells contain valid dates and that the start date is not later than the end date. Also check whether your regional settings require semicolons instead of commas.

Can YEARFRAC calculate age in complete years?

YEARFRAC returns fractional years based on a day-count convention, so it is not a reliable replacement for counting completed birthdays. Use =DATEDIF(A2,B2,"y") for complete years.