=EOMONTH(A2, 0) returns the last day of the month of the date in A2; use 1 for next month and -1 for the previous one. Format the cell as a date, because EOMONTH returns the date's serial number.
{"cells": {"A1": "Question", "A2": "Last day of the month", "A3": "First day of the month", "A4": "Last day of next month", "A5": "Days in the month", "A9": "Date", "B1": "Answer", "B2": "=EOMONTH(B9,0)", "B3": "=EOMONTH(B9,-1)+1", "B4": "=EOMONTH(B9,1)", "B5": "=DAY(EOMONTH(B9,0))", "B9": 46071}, "focus": "B2", "formats": {"B2:B4": {"fmt": "date"}, "B9": {"fmt": "date"}}, "note": "Change the date in B9, for example to a February date."}
EOMONTH
The second argument moves by whole months.
=EOMONTH(A2, 0)The last day of this month.=EOMONTH(A2, -1)The last day of the previous month, a common reporting date.=EOMONTH(TODAY(), 0)The last day of the current month.First day and number of days
The day after the previous month-end is always the 1st.
=EOMONTH(A2, -1)+1The first day of the month.=DAY(EOMONTH(A2, 0))28, 29, 30 or 31.Last working day
Step back from the first day of the next month.
=WORKDAY(EOMONTH(A2, 0)+1, -1)The last Monday-to-Friday day of the month.Common mistakes
- A number like 46081 appears
- Format the cell as Short Date.
- Same day next month, not month-end
- Use EDATE:
=EDATE(A2, 1)keeps the day of the month.
Frequently asked questions
What's the difference between EOMONTH and EDATE?
EOMONTH always returns a month-end; EDATE returns the same day, months later.
Can I use EOMONTH in SUMIFS?
Yes, it's the easiest way to total a month. See sum by month.
Does it handle leap years?
Yes. February 2028 ends on the 29th.