What EOMONTH does

EOMONTH returns the last day of a month. =EOMONTH(B2,0) gives the last day of the month that the date in B2 falls in, and =EOMONTH(B2,1) the last day of the month after it. The name is short for “end of month”, and the second argument says how many months to move first.

Finance and billing work in month ends, from accruals to payment terms such as “end of the following month”. EOMONTH knows how many days each month has, February in a leap year included, so you never need a table of month lengths.

The first day of a month is the day after the last day of the month before, so EOMONTH gives you first days too. =EOMONTH(B2,-1)+1 is the first day of B2’s month, and =EOMONTH(B2,0)+1 the first day of the next one.

Syntax

=EOMONTH(start_date, months)
Every argument is required.
start_dateRequired
Any date in the month you start from, such as an invoice date in B2. Only its month and year matter.
monthsRequired
How many months to move before taking the last day: 0 for the date's own month, 1 for the month after, -1 for the month before.

Example: due at the end of the following month

A supplier’s terms say every invoice is due on the last day of the month after the one it was issued in.

Both November invoices are due on Dec 31, whichever day they were issued. In C2, =EOMONTH(B2,1) returns 31 Dec 2026.

Read it as: move one month on from the month of B2, then take its last day. Any date in November gives Dec 31.

Example: the first day of a month and its length

Billing that starts on the first of the month, and daily rates that divide by the number of days in the month, both come from the month end.

The last day of the month before, plus one, is the first of the month. DAY of the month end is the month's length: 29 for February 2028, a leap year. In B2, =EOMONTH(A2,-1)+1 returns 1 Feb 2026.

Total one month with SUMIFS

EOMONTH gives SUMIFS the end of a month without you working it out. With the first day of the month in E1, dates in A2:A100 and amounts in B2:B100, =SUMIFS(B2:B100,A2:A100,">="&E1,A2:A100,"<="&EOMONTH(E1,0)) adds the amounts dated in that month. Change E1 to another month and the end date moves with it, whether that month has 28 days or 31.

Common mistakes

  • =EOMONTH(B2) leaves out the months, which EOMONTH requires, so Excel won’t accept the formula. Use 0 for the end of the same month.
  • =EOMONTH(B2,1) when you wanted the end of B2’s own month gives the end of the next one. The count starts at 0 for the date’s own month.
  • =EOMONTH(B2,0)+1 is the first day of the next month. For the first day of B2’s own month, go back one month: =EOMONTH(B2,-1)+1.
  • EOMONTH returns a plain number, so a cell without a date format shows something like 46387. Format the cell as a date; the page on the DATE function explains why dates are numbers.

Frequently asked questions

How do I get the last day of the month in Excel?

Use =EOMONTH(A2,0) for the last day of the month the date in A2 falls in. =EOMONTH(A2,-1) is the last day of the month before.

How do I get the first day of the month?

Take the end of the previous month and add one day: =EOMONTH(A2,-1)+1 is the first day of A2’s month, and =EOMONTH(A2,0)+1 the first day of the next month.

How do I find the number of days in a month?

Take the day of the month’s last date: =DAY(EOMONTH(A2,0)) gives 28, 29, 30 or 31 for the month in A2.

How do I get the last working day of the month?

Step back one working day from the first of the next month: =WORKDAY(EOMONTH(A2,0)+1,-1). For Nov 2026 it gives Monday, Nov 30. Add a range of holidays as WORKDAY’s third argument to skip those too.

What is the difference between EOMONTH and EDATE?

EOMONTH always returns the last day of a month. EDATE returns the same day of the month as the start date, a number of months away, such as the 15th.