EOMONTH returns the last day of a month, a number of months before or after a date.
Syntax
=EOMONTH(start_date, months)
Examples
- Last day of the current month:
=EOMONTH(TODAY(), 0)
- Last day of next month:
=EOMONTH(TODAY(), 1)
- Last day of the previous month:
=EOMONTH(TODAY(), -1)
First day of the month
Go to the end of the previous month and add one day:
=EOMONTH(A2, -1)+1
Days in a month
=DAY(EOMONTH(A2, 0)) returns 28, 29, 30 or 31.
EDATE for the same day next month
=EDATE(A2, 1) moves a date forward by one month, keeping the day number where possible.
Use in reports
EOMONTH is handy for monthly reports, billing and payroll cut-off dates, and for grouping dates into months with SUMIFS between the first and last day.
The result is a serial number. Format the cell as a date.
Worked example
Date 10-Feb-2026 in A2. =EOMONTH(A2,0) returns 28-Feb-2026. =EOMONTH(A2,1) returns 31-Mar-2026. For the first day of the month: =EOMONTH(A2,-1)+1.
Common mistakes
- Result shows a serial number. Format as Date.
- Using 1 when you want the same month. Use 0.
- Using text dates.
Frequently asked questions
How do I get the first day of the month?
=EOMONTH(A2,-1)+1.
How do I get days in a month?
=DAY(EOMONTH(A2,0)).
Where is it useful?
Month-end reports, billing cut-offs and SUMIFS by month.
Practice this online, free
Reading is only half of learning Excel. Cellgrids is a free place for online Excel practice: solve Excel formula exercises in a live spreadsheet, prepare for Excel interview questions, and work through business case studies built for data analytics and business analytics roles.
Practice these formulas: EOMONTH, EDATE, TODAY.
Start Excel practice → Case studies