First & Last Day of the Month

Excel Formulas › Date & Time

All versionsEOMONTH

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.


Quick formula: for any date in A2:
=EOMONTH(A2, 0) // last day of A2's month =EOMONTH(A2, -1) + 1 // first day of A2's month
EOMONTH(date, 0) is this month’s end; EOMONTH(date, -1)+1 is the day after last month’s end — i.e. the 1st.

Functions used (tap for the full reference guide):

The example

Any date resolved to its month’s first and last day.

ABC
1DateFirst of monthLast of month
22/14/20262/1/20262/28/2026
36/30/20266/1/20266/30/2026

The formula

First day in B2, last day in C2:

=EOMONTH(A2, -1) + 1 → first day =EOMONTH(A2, 0) → last day

How it works

EOMONTH always lands on a month-end; you steer which month:

  1. EOMONTH(A2, 0) returns the last day of A2’s own month — the 0 means “this month.” For Feb 14 2026 that’s Feb 28 (it knows about leap years).
  2. 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.
  3. Use a positive offset to jump forward: EOMONTH(A2, 1) is next month’s end.
  4. Format the result cells as dates — EOMONTH returns a serial number that Excel shows as a date.

Try it: interactive demo

Live demo

Pick any date; see the first and last day of its month.

First:   Last:

Variations

First day, alternate formula

Subtract the day-of-month and add 1 — works without EOMONTH:

=A2 - DAY(A2) + 1

Last day of the current month

Anchored to today:

=EOMONTH(TODAY(), 0)

First day of next month

Great for “due on the 1st” logic:

=EOMONTH(A2, 0) + 1

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

📊
Download the free First & Last Day of the Month practice workbook
Dates resolved to month start/end with EOMONTH, plus the DAY alternative and next-month logic, and 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I get the last day of the month in Excel?
Use =EOMONTH(A2, 0). It returns the last day of the month containing the date in A2, correctly handling leap years and short months.
How do I get the first day of the month?
Use =EOMONTH(A2, -1) + 1, which is the day after the previous month-end, or =A2 - DAY(A2) + 1. Both return the 1st of the month.
How do I get the first day of next month?
Add 1 to this month's end: =EOMONTH(A2, 0) + 1. This is handy for billing or due-date logic tied to the 1st.

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

Related formulas: Sum by month · Calculate age from a birthdate · Working days between dates

Function references: EOMONTH · DAY