How to Get the Last Day of the Month in Google Sheets
=EOMONTH(start_date, months). Use 0 for the same month, 1 for next month and -1 for last month.
What EOMONTH does
Months have different lengths, so the last day is 28, 29, 30 or 31. EOMONTH works it out for you. It is handy for month-end reports, billing cut-offs and invoice due dates.
EOMONTH syntax
=EOMONTH(start_date, months)
start_date: the date to calculate from.months: how many months to move. Negative values go back and positive values go forward. The result is always the last calendar day of the month you land on. Decimals are truncated, so2.6works as2.
A step-by-step example
Cell A2 holds January 15, 2026.
| A | |
|---|---|
| 1 | Date |
| 2 | 1/15/2026 |
Dates in the tables are shown in month/day/year order. The results do not depend on your display format.
=EOMONTH(A2, 0)
This returns January 31, 2026, the last day of the same month. Move one month forward:
=EOMONTH(A2, 1)
This returns February 28, 2026, because 2026 is not a leap year. A negative number goes back:
=EOMONTH(A2, -1)
This returns December 31, 2025.
The first day of the next month
EOMONTH gives the last day, so add 1 to get the first day of the following month: =EOMONTH(A2, 0) + 1 returns February 1, 2026.
Common mistakes
- Typing the date inside the formula. Google's help page warns that typing a date such as
10/10/2000straight into the formula is read as a division, not a date. Use a cell reference orDATE(). - The result shows as a number. Format the cell as a date.
- Confusing it with EDATE. EDATE keeps the day of the month. EOMONTH always returns the month's last day.
Try it yourself
Use the date above (A2). Type your formula into the box, starting with =, then press Check.
Exercise 1: End of this month
Write a formula that returns the last day of the same month as the date in A2.
Exercise 2: End of next month
Write a formula that returns the last day of the next month after the date in A2.
What to learn next
- EDATE: move a date forward or back by months.
- WORKDAY: find the date a set number of working days away.
- DATE: build a date from a year, month and day.
Syntax and rules in this guide were checked against Google's EOMONTH help page. See all guides.