How to Add Five Years to the Newer of Two Dates in Excel
Question details
The user needs to compare two dates in an Excel spreadsheet, identify which one is the most recent, and calculate a new date exactly five years after that newer date.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating future deadlines, contract renewals, or expiration dates based on the latest of two available timeline milestones.
- Observed behavior
- Requires a combined formula approach using built-in functions that can evaluate maximum date values and accurately add specific time intervals.
Ensure both of your date columns are formatted as 'Date' rather than text; otherwise, the formula will not be able to compare them or calculate future dates correctly.
Use EDATE and MAX Functions Together
Combine the MAX function to identify the most recent date and the EDATE function to add the equivalent of five years (60 months) to that date.
Spreadsheet software stores dates as sequential serial numbers, meaning newer dates have higher numerical values. Because of this, the MAX function easily identifies the newer date by finding the highest number. The EDATE function is then used to add a specified number of months to that exact date.
Click on the empty cell where you want the new calculated date (5 years later) to be displayed.
Type =EDATE(MAX(A3,B3),60) into the formula bar. Replace A3 and B3 with the actual cell references that contain the two dates you are comparing.
Press Enter to apply the formula. If the result appears as a standard number (e.g., 45000), right-click the cell, select 'Format Cells', and change the format to 'Date'.

Calculate Dates Easily with WPS Spreadsheet
WPS Spreadsheet fully supports advanced date functions like EDATE and MAX, offering a seamless, lightweight, and completely free alternative for your data calculation needs.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your existing workbook or create a new one.
- 2. Input and format your dates: Ensure your two date values are entered into separate cells and properly formatted as Dates using the Home tab.
- 3. Apply the combined formula: Select your output cell and type =EDATE(MAX(A3,B3), 60), then press Enter to instantly get the date exactly 5 years later.

Frequently Asked Questions
Can I add years directly instead of using months in the formula?
Yes, you can use the DATE, YEAR, MONTH, and DAY functions combined: =DATE(YEAR(MAX(A3,B3))+5, MONTH(MAX(A3,B3)), DAY(MAX(A3,B3))). However, using the EDATE function with 60 months is generally shorter and easier to type.
Why is my formula result showing a 5-digit number instead of a date?
Spreadsheet software stores dates as numerical serial numbers for calculation purposes. A 5-digit number simply means the cell's display format is set to 'General' or 'Number'. You just need to right-click the cell, select 'Format Cells', and apply a 'Date' format.
What happens to the calculation if one of the date cells is empty?
The MAX function ignores empty cells and will automatically return the date from the single populated cell. The EDATE function will then correctly add 5 years to that single date.
How do I subtract 5 years instead of adding them?
To calculate a past date, change the month value in the EDATE function to a negative number. For example, using =EDATE(MAX(A3,B3), -60) will subtract exactly 5 years from the newer of the two dates.




