What it does
=EOMONTH(A2,0) returns the last day of A2's month, =EOMONTH(A2,1) the last day of the next month and =EOMONTH(A2,-1) the last day of the previous month. Whether the month has 28, 29, 30 or 31 days is handled for you.
Adding 1 to the last day of the previous month gives the first day of this month: =EOMONTH(A2,-1)+1. That way every date can be reduced to the start or end of its month, which makes grouping by month and rules like "month end plus 60 days" easy to build.
To add months while keeping the same day, use EDATE; for the number of days in a month use DAY(EOMONTH(A2,0)) (DAY). For working-day terms, combine the result with WORKDAY.
Syntax
=EOMONTH(start_date, months)=SERİAY(başlangıç_tarihi; ay_sayısı)Arguments in square brackets are optional. English Excel separates arguments with commas (,) and uses a dot for decimals; Turkish Excel uses semicolons (;) and a decimal comma. Excel shows function names in its own language when it opens the file.
Arguments
| Argument | Required | Description |
|---|---|---|
start_date | Required | The date, or the cell holding the date, to start from; the day of the month does not matter. |
months | Required | How many months to go forward (positive) or back (negative); 0 is the end of the same month. |
Examples
1A month-end plus 60 days payment term
Column C finds the last day of the invoice month; column D adds 60 days to it. The day of the month on which the invoice was issued does not change the due date.
=EOMONTH(B2,0)| A | B | C | D | |
|---|---|---|---|---|
| 1 | Invoice | Invoice Date | Month End | Due (Month End + 60) |
| 2 | F-2201 | 12-Jan-2026 | 31-Jan-2026 | 1-Apr-2026 |
| 3 | F-2202 | 3-Feb-2026 | 28-Feb-2026 | 29-Apr-2026 |
| 4 | F-2203 | 30-Oct-2026 | 31-Oct-2026 | 30-Dec-2026 |
| 5 | F-2204 | 5-Nov-2026 | 30-Nov-2026 | 29-Jan-2027 |
- C2 (filled down to C5)
=EOMONTH(B2,0) - D2 (filled down to D5)
=EOMONTH(B2,0)+60
The February invoice's month closes on 28-Feb-2026 and it falls due on 29-Apr-2026. The invoice issued on 5 November falls due in the next year: 29-Jan-2027.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
2Reduce records to the first of the month and total monthly
Column C turns each date into the first day of its month: the previous month's end plus 1. SUMIF in column F adds up by those month starts.
=EOMONTH(A2,-1)+1| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Date | Amount | Month Start | Month | Total | |
| 2 | 28-Sep-2026 | 1,200 | 1-Sep-2026 | 1-Sep-2026 | 1,200 | |
| 3 | 3-Oct-2026 | 800 | 1-Oct-2026 | 1-Oct-2026 | 3,000 | |
| 4 | 15-Oct-2026 | 1,500 | 1-Oct-2026 | |||
| 5 | 31-Oct-2026 | 700 | 1-Oct-2026 | |||
| 6 | 2-Nov-2026 | 950 | 1-Nov-2026 |
- C2 (filled down to C6)
=EOMONTH(A2,-1)+1 - F2 (filled down to F3)
=SUMIF($C$2:$C$6,E2,$B$2:$B$6)
Both 15 October and 31 October become 1-Oct-2026. Adding up by this column gives 1,200 for September and 3,000 for October.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
Common errors and fixes
- Shows a number
Cause: The result appears as a number such as 46356 because the cell is not formatted as a date.
Fix: Apply a date format to the cell.
- #VALUE!
Cause: The start date is stored as text and cannot be read.
Fix: Convert it to a real date.
- Month end left out
Cause: A period condition was written as
EOMONTH(A2,0)>B2instead ofB2<=EOMONTH(A2,0), so the last day of the month fell outside the period.Fix: Write
B2<=EOMONTH(A2,0)to include the month end; for dates that carry a time,EOMONTH(A2,0)+1>B2is safer.
Good to know
- A term of "60 days from the end of the invoice month":
=EOMONTH(A2,0)+60. - The first working day after the month end:
=WORKDAY(EOMONTH(A2,0),1).
In Nexell
Get Nexell to do it from a sentence
Add a due date column to the invoice list: 60 days from the end of the invoice month
Convert to tableBring your invoice list into the tool and type this. Nexell adds the due date column with real Excel date formulas and shows it in the preview; in the downloaded file, the due date changes when the invoice date does.
Nexell uses AI to understand the request and builds the result with real Excel formulas; the formula may differ from the example on this page. You see a preview first and nothing changes until you press Apply; formulas stay live in the downloaded .xlsx file.
Free account · no card needed · 30 credits a month
Frequently asked questions
How do I find the first day of the month in Excel?
Add 1 to the last day of the previous month: =EOMONTH(A2,-1)+1. =DATE(YEAR(A2),MONTH(A2),1) gives the same result (DATE).