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
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. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “last day of month formula”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. 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 is what makes a layout choice that keeps the sheet readable and sortable useful in real work: repeatable, auditable, and not dependent on memory or luck.
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
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. Treat “last day of month formula” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.
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.
Other ways people ask this
This is also commonly searched as “excel formula last day of month”, “ms excel find same month/day”, “excel function last day of month” and “last day of the month excel formula”. They describe the identical operation, so you are in the right place no matter how you phrased it.
Why do people search for this in so many different ways?
Because the same task has many names. “excel formula last day of month”, “ms excel find same month/day”, “excel function last day of month” all point at the one operation explained on this page, which is why they all lead here.