How to Get the Last Day of the Month in Google Sheets

By Tomosuke Hasegawa · Updated Oct 29, 2026 · Beginner · 5 min read · includes 2 free exercises

In short: EOMONTH returns the last day of the month that is a set number of months from a start date. The formula is =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)

A step-by-step example

Cell A2 holds January 15, 2026.

A
1Date
21/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

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.

Hint: move zero months.

Exercise 2: End of next month

Write a formula that returns the last day of the next month after the date in A2.

Hint: move one month forward.

What to learn next

Syntax and rules in this guide were checked against Google's EOMONTH help page. See all guides.