EOMONTH

Short answer

Build period headers that roll with one start date

EOMONTH(start_date, months)
Excel version
All versions
Also searched as
end of month, month end date, period end date, last day of month, fiscal year from date, eomonth excel

What it returns

EOMONTH returns the last day of the month that sits a given number of months before or after a start date. With 15 March 2026 in A2, =EOMONTH(A2, 0) returns 31 March 2026. A months value of 1 returns 30 April 2026, and -1 returns 28 February 2026.

The result is a date serial number, so a cell with General format shows something like 46112. Apply a date format and it reads as a date. It is still a number underneath, which is the point: a real date can be compared, subtracted and used as a SUMIFS criterion.

The day of the start date never matters. Any date in March returns the same month-end. That is why EOMONTH is the right tool for period headers and EDATE, which keeps the day of the month, is the right tool for contract anniversaries.

It is the wrong tool when you need a business day. The last calendar day of a month is often a Saturday. For the last working day, step back one working day from the first of the next month: =WORKDAY.INTL(EOMONTH(A2, 0)+1, -1).

Arguments that matter

ArgumentRequiredWhat it does
start_dateYesAny date in the base month. A cell holding a real date, or the result of DATE.
monthsYesHow many months to move. 0 is the same month, positive is forward, negative is back. Decimals are truncated, so 1.9 moves one month.

Two behaviors decide how the function behaves in a model:

  • months of 0 snaps any date to its own month-end. =EOMONTH(A2, 0) is the standard way to convert a transaction date into the period it belongs to.
  • months of -1, plus one day, gives the first day of the month. =EOMONTH(A2, -1)+1 returns the 1st of the month A2 sits in.

If start_date is not a valid date, EOMONTH returns #NUM!. A date typed as text that Excel cannot read returns #VALUE!.

In a financial model

EOMONTH builds the time axis. One input cell holds the model start month, and every period header is derived from it. Change that one cell and the whole calendar rolls forward. That is the practical form of date headers are real dates, and it keeps time moving in one direction, per time runs left to right, always.

The same function then does three more jobs:

  • Period mapping. A helper column of =EOMONTH([@Date], 0) turns every ledger row into a period key that matches the header row exactly.
  • Date windows. SUMIFS uses a month-end header as the upper bound and the prior month-end as the lower bound. This is the pattern behind SUMIFS over lookups for period math.
  • Fiscal years. Shifting a date forward by the number of months between fiscal year-end and December converts it to its fiscal year in one step. For a full fiscal year, period and quarter on every month, build a fiscal calendar table once and look it up.

The free 5-year cash flow model builds its “Period ending” row with EOMONTH from a single start-month input.

Worked example

Tab Inputs, cell C4 holds the model start date, 1 January 2026. The monthly header on tab IS runs across row 9 from column D.

First header:

=EOMONTH(Inputs!$C$4, 0)

Every header after it, filled right:

=EOMONTH(D$9, 1)

D9 shows 31 January 2026, E9 shows 28 February 2026, and so on. In Excel 365 one formula can spill all 60 months instead:

=EOMONTH(Inputs!$C$4, SEQUENCE(1, 60, 0))

Monthly actuals from a ledger Table GL with Date, Line and Amount columns, for the line in $B12:

=SUMIFS(GL[Amount], GL[Line], $B12, GL[Date], ">"&EOMONTH(D$9, -1), GL[Date], "<="&D$9)

The lower bound is the prior month-end, exclusive. The upper bound is this month-end, inclusive. Every date lands in exactly one column.

Fiscal year for a June year-end. A date’s fiscal year is the calendar year of the date six months later:

=YEAR(EOMONTH([@Date], 6))
DateEOMONTH(date, 6)Fiscal year
30 Jun 202631 Dec 2026FY2026
1 Jul 202631 Jan 2027FY2027
15 Mar 202730 Sep 2027FY2027

The offset is 12 minus the fiscal year-end month: 6 for June, 3 for September, 9 for March. Put that number on the inputs tab, not inside the formula.

Old way vs new way

The old header row was typed or built from DATE arithmetic:

=DATE(YEAR(D$9), MONTH(D$9)+2, 0)

It works, because day zero of a month is the last day of the month before, but nobody reading it can tell what it does. The EOMONTH version says what it means:

=EOMONTH(D$9, 1)

Typed headers are worse. Someone types “Jan-26” as text, the SUMIFS criteria stop matching, and the column reads zero with no error.

Where it breaks

Rows on the last day of the month go missing. The ledger dates carry a time, such as 31 January 2026 14:30, and EOMONTH returns midnight at the start of 31 January. The criterion "<="&D$9 excludes everything after midnight on the last day. Fix: use the first day of the next month as an exclusive bound, "<"&D$9+1, or strip the time in Power Query where the extract lands.

The header shows a five-digit number. EOMONTH returned a serial and the cell is formatted General. Nothing is wrong with the value. Fix: apply a date format such as mmm-yy to the header row.

EOMONTH returns #VALUE!. The start date is text Excel cannot read as a date. The usual source is a CSV whose day and month order differs from the machine’s settings, so 13/01/2026 fails on a US-format system. Fix: convert the column to real dates at load, in Power Query, rather than wrapping every formula in DATEVALUE.

The calendar is one month late. The start input holds a month-end, such as 31 January, and the first header uses months of 1 instead of 0, so the first column is February. Fix: anchor the first header with months of 0 and step by 1 only from the second column.

Fiscal years come out one year off. The offset counted the wrong way. For a June year-end, July 2026 belongs to FY2027 under the common “named for the year it ends” convention. Some companies name the year it starts. Fix: confirm the convention with whoever owns the reporting calendar and test both edge dates, the last day of the year and the first day of the next.

Related functions

  • EDATE. Keeps the day of the month. Right for renewals and maturities, wrong for period headers.
  • SUMIFS. Takes EOMONTH headers as its date bounds. The two together are the core of every actuals grid.
  • SEQUENCE. Generates the month offsets so one EOMONTH formula spills the whole header row.
  • YEARFRAC. Converts the gap between two dates into a fraction of a year for interest and accruals.
  • DAYS. Counts the days in a period, for daily proration against these month-end headers.
  • The play date headers are real dates is the rule this function exists to satisfy.

All functions