Excel + Google Sheets · EOMONTH
The last day of any month, instantly
Returns the last day of the month, any number of months before or after a date.
The formula
=EOMONTH(A2, 1)What each part means
A2The date1Months ahead (0 = this month)
Example
| A | B | |
|---|---|---|
| 1 | Invoice date | Due date |
| 2 | Nov 2 | |
| 3 | Nov 18 | |
| 4 | Dec 5 | |
| 5 | Jan 30 |
| A | B | |
|---|---|---|
| 1 | Invoice date | Due date |
| 2 | Nov 2 | Dec 31 |
| 3 | Nov 18 | Dec 31 |
| 4 | Dec 5 | Jan 31 |
| 5 | Jan 30 | Feb 28 |
Step by step
- Click cell B2.
- Type the formula:
=EOMONTH(A2, 1) - Press Enter.
- Drag the small square in the bottom-right corner of the cell down to copy it to the other rows.
Where it works
- Every version of Excel
- Google Sheets
- Excel for the web (free)