In Excel: use =EOMONTH(start_date, months) — it returns the last day of a month n months away, handling leap years and 30/31-day months for you.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
start_date | required | The reference date. |
months | required | Months to shift before taking the month end. 0 is the current month, -1 the previous. |
Related functions
Negative values subtract. Month steps clamp the day, so 31 Jan + 1 month is 28 Feb.
Weekday: Saturday
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
EOMONTH returns the last day of the month a given number of months from a date. Passing 0 gives the end of the current month, -1 the end of the previous, 1 the end of the next. It is the correct way to build month-end reporting periods, payment terms and accrual dates, because it knows February has 28 days except when it has 29 — logic that hand-rolled date arithmetic gets wrong every four years. Pairing it with a +1 gives the first day of a month, which is the other half of a period boundary. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. Treat “eomonth function excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected formula shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.
A worked example
The end of the current month for a reporting cut-off: =EOMONTH(TODAY(), 0). The first day of the current month: =EOMONTH(TODAY(), -1)+1. Net-30 terms landing on a month end: =EOMONTH(A2, 1). Building twelve month-end dates down a column: =EOMONTH($A$2, ROW()-1). EOMONTH gets month ends right on the leap year that hand-rolled date arithmetic quietly gets wrong. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. The short version of “eomonth function excel”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.
Common mistakes
- Hand-rolling month ends with DATE and a day count, which breaks on February and on 30-day months.
- Forgetting the second argument, which is required and has no default.
- Leaving the result unformatted, so it shows a serial number.
Frequently asked questions
How do I get the last day of the current month?
=EOMONTH(TODAY(), 0). For the first day, =EOMONTH(TODAY(), -1)+1.
What is the difference between EOMONTH and EDATE?
EDATE keeps the same day number n months away; EOMONTH always returns the last day of that month.
Does EOMONTH handle leap years?
Yes — that is much of the point. February returns the 28th or 29th correctly without any special case.