Reporting periods, due dates, and date filters all need the first or last day of a month. EOMONTH gives the month-end directly, and a one-character tweak turns it into the month-start.
EOMONTH(date, 0) is this month’s end; EOMONTH(date, -1)+1 is the day after last month’s end — i.e. the 1st.
The example
Any date resolved to its month’s first and last day.
| A | B | C | |
|---|---|---|---|
| 1 | Date | First of month | Last of month |
| 2 | 2/14/2026 | 2/1/2026 | 2/28/2026 |
| 3 | 6/30/2026 | 6/1/2026 | 6/30/2026 |
The formula
First day in B2, last day in C2:
How it works
EOMONTH always lands on a month-end; you steer which month:
EOMONTH(A2, 0)returns the last day of A2’s own month — the0means “this month.” For Feb 14 2026 that’s Feb 28 (it knows about leap years).EOMONTH(A2, -1)steps back one month to the previous month-end (Jan 31). Adding 1 lands on Feb 1 — the first of A2’s month.- Use a positive offset to jump forward:
EOMONTH(A2, 1)is next month’s end. - Format the result cells as dates — EOMONTH returns a serial number that Excel shows as a date.
Try it: interactive demo
Pick any date; see the first and last day of its month.
Variations
First day, alternate formula
Subtract the day-of-month and add 1 — works without EOMONTH:
Last day of the current month
Anchored to today:
First day of next month
Great for “due on the 1st” logic:
Pitfalls & errors
Result shows as a number. EOMONTH returns a date serial. If you see 46081, format the cell as a Date.
#VALUE! on text dates. EOMONTH needs a real date. Convert text dates with DATEVALUE or Text to Columns first.
Don’t hard-code 28/30/31. Manually picking the last day breaks on leap years and short months. EOMONTH handles all of that.
Practice workbook
Frequently asked questions
How do I get the last day of the month in Excel?
How do I get the first day of the month?
How do I get the first day of next month?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class