Excel EDATE Function
The Excel EDATE function returns a date on the same day of the month, n months in the past or future. You can use EDATE to calculate expiration dates, maturity dates, and other due dates. Use a positive value for months to get a date in the future, and a negative value for dates in the past.
- start_date - Start date as a valid Excel date.
- months - Number of months before or after start_date.
The EDATE function can add or subtract months from a date. You can use EDATE to calculate expiration dates, contract dates, due dates, anniversary dates, retirement dates, and other dates in the future or past. Use a positive number for months to get a date in the future, and a negative number for dates in the past.
For example, if A1 contains the date February 1, 2018, you can use EDATE like this:
6 months from today
To use EDATE with today's date, you can use the TODAY function. For example, to create a date exactly 6 months from today, you can use:
Moving by years
To use the EDATE function to move by years, multiply by 12. For example, to move forward 24 months, you can use either of these formulas:
The second form is handy when you already have years in another cell and want to convert to months inside EDATE.
End of month
EDATE is clever about rolling "end of month" dates forwards or backwards, and will adjust year, month, and day values as necessary. For example EDATE will maintain the last day of month:
=EDATE("31-Jan-2019",1) // returns 28-Feb-2019
EDATE will also respect leap years:
=EDATE("31-Jan-2020",1) // returns 29-Feb-2020
EDATE with time
The EDATE function will strip times from a dates that include time (sometimes called a "datetime"). To preserve the time in a date, you can use a formula like this:
Here, the MOD function is used to extract the time from the date in A1 and add it back to the result from EDATE.
See below for more examples of formulas that use the EDATE function.
- EDATE will return the #VALUE error if the start date is not a valid date.
- If the start date has a fractional time attached, it will be removed.
- If the months argument contains a decimal value, it will be removed.
- To calculate an end of month date, see the EOMONTH function.
- EDATE returns a date serial number, which must be formatted as a date.