Calculate Age Between Two Dates with Excel DATEDIF
Question details
Calculate complete years between two dates when Excel does not show DATEDIF in its function list or provide an input tooltip.

- 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.
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.
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.
Click an empty cell, such as C2, next to the dates in A2 and B2.
Enter =DATEDIF(A2,B2,"y") in the cell or formula bar and press Enter. The "y" argument returns complete years.
Confirm that C2 displays the number of completed years. To calculate age as of today instead, enter =DATEDIF(A2,TODAY(),"y").

Use YEARFRAC for Fractional Years
Use YEARFRAC when a fractional year value is acceptable instead of age in complete years.
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. Open a spreadsheet: Launch WPS Office and open a workbook in WPS Spreadsheet, or create a blank spreadsheet.
- 2. Enter the dates: Enter the earlier date in A2 and the later date in B2.
- 3. Calculate complete years: Select C2, type =DATEDIF(A2,B2,"y"), and press Enter.
- 4. Save the workbook: Use File > Save As to save the spreadsheet in a format such as XLSX.

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.




