Sub topic 9
Moving by Months with EDATE and EOMONTH
Assume you can enter formulas, use cell references, and apply date formats. This chapter uses two related functions:
EDATEmoves a date forward or backward by a whole number of months.EOMONTHreturns the last day of a month relative to a date.
Both functions return real date values. You can use their results in later calculations, sort them, or format them as dates.
Move a date by whole months with EDATE
The syntax is:
=EDATE(start_date, months)start_date is the date to move. months is a number. Use a positive number to move forward and a negative number to move backward.
For example, if cell A2 contains 2026-11-28, this formula returns 2027-02-28:
=EDATE(A2, 3)This formula returns the date three months earlier:
=EDATE(A2, -3)Use DATE when you want a predictable starting date:
=EDATE(DATE(2026, 1, 31), 1)The result is 2026-02-28, because February has no day 31. Sheets returns the last valid day in the target month.
| Formula | Result |
|---|---|
| `=EDATE(DATE(2026, 1, 15), 1)` | 2026-02-15 |
| `=EDATE(DATE(2026, 1, 31), 1)` | 2026-02-28 |
| `=EDATE(DATE(2026, 3, 31), -1)` | 2026-02-28 |
EDATE does not always preserve an end-of-month pattern. For example, moving January 31 forward one month produces February 28. Moving that result forward one more month produces March 28, not March 31.
Find the end of a month with EOMONTH
The syntax is:
=EOMONTH(start_date, months)The second argument identifies the target month relative to the starting date:
0means the month containingstart_date.1means the following month.-1means the preceding month.
For example:
=EOMONTH(DATE(2026, 11, 28), 0)returns 2026-11-30.
To calculate the end of the next month:
=EOMONTH(A2, 1)To calculate the last day of the previous month:
=EOMONTH(A2, -1)A common pattern finds the first day of the month after a date:
=EOMONTH(A2, 0) + 1You can also find the first day of the current month by combining EOMONTH with subtraction:
=EOMONTH(A2, -1) + 1Choose the function deliberately
For a subscription that renews on the 15th, use EDATE. For a report that closes at the end of each month, use EOMONTH. Format the result as a date if Sheets displays its underlying serial number.
Exercise
A2 contains 2026-01-31. Which formula returns the last day of the following month, and what is the result?
Show answer
Use =EOMONTH(A2, 1). The result is 2026-02-28.