Home › Excel functions › EOMONTH

EOMONTH in Excel: Last Day of the Month

EOMONTH ("end of month") returns the last day of a month, a given number of months before or after a date. It's the reliable way to work with month ends, payment terms and monthly reports.

In this guide
  1. EOMONTH syntax
  2. Examples
  3. Monthly totals
  4. Payment terms
  5. EDATE: add months
  6. FAQ

EOMONTH syntax

=EOMONTH(start_date, months)
ArgumentWhat it means
start_dateAny date in the starting month.
months0 for the same month, 1 for next month, -1 for last month, and so on.

The result is a date serial number; format the cell as a date (Ctrl+1) if you see something like 46356.

Examples

With November 12, 2026 in A2:

GoalFormulaResult
Last day of this month=EOMONTH(A2, 0)Nov 30, 2026
Last day of next month=EOMONTH(A2, 1)Dec 31, 2026
Last day of last month=EOMONTH(A2, -1)Oct 31, 2026
First day of this month=EOMONTH(A2, -1)+1Nov 1, 2026
First day of next month=EOMONTH(A2, 0)+1Dec 1, 2026
Days in this month=DAY(EOMONTH(A2, 0))30

Monthly totals with SUMIFS

With any date of the month in F1, this adds up all sales in that month:

=SUMIFS(C2:C100, A2:A100, ">="&EOMONTH(F1,-1)+1, A2:A100, "<="&EOMONTH(F1,0))

No need to know whether the month has 28, 30 or 31 days. See SUMIFS.

Payment terms: "end of month + 30"

An invoice payable 30 days after the end of the invoice month: =EOMONTH(A2, 0)+30. For an invoice dated November 12, 2026, that's December 30, 2026.

EDATE: add whole months

EDATE keeps the day number: =EDATE(A2, 3) returns February 12, 2027. If the day doesn't exist in the target month, EDATE uses the last day: =EDATE(DATE(2026,1,31), 1) returns February 28, 2026. Use EDATE for contract renewals, EOMONTH for month ends.

Frequently asked questions

Why does EOMONTH return a number?

Dates are stored as numbers. Format the cell as a date with Ctrl+1 › Date.

How do I get the first day of the month?

Use =EOMONTH(A2, -1)+1: the last day of the previous month, plus one day.

How do I get the month name?

Use =TEXT(A2, "mmmm") for "November" or "mmm" for "Nov".