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
Select the result cell and type =EOMONTH(.
Select the reference date, then a comma.
Enter the month offset — 0 for this month, -1 for last, 1 for next.
Format the result as a date, and add +1 if you actually want the first day of the following month.
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. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. For “end of month formula excel”, 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 calculation you can defend to a CFO or an auditor 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. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. 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 and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. For “end of month formula excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
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
On the way here you may have searched this as “excel formula for end of month” and “month end formula in excel” — it is all the same task, and this page is the single, complete answer to it.
Why do people search for this in so many different ways?
Because the same task has many names. “excel formula for end of month”, “month end formula in excel” all point at the one operation explained on this page, which is why they all lead here.