Date formula page
Last Day of Month Formula | EOMONTH
Use EOMONTH when month-end reporting, due dates, or date criteria need the final calendar day of a month. The same formula works in Excel and Google Sheets.
Get the last day of the month in Excel or Google Sheets with EOMONTH.
If A2 is any January 2026 date, the formula returns 2026-01-31. With TODAY(), it returns the last day of the current month.
Copy formulas
=EOMONTH(A2, 0)=EOMONTH(A2, 0)Excel and Google Sheets both use EOMONTH(start_date, months). If the result appears as a serial number, format the output cell as a date.
Example data
| Start Date | End Date | Holiday | Result |
|---|---|---|---|
| 2026-01-01 | 2026-01-31 | 2026-01-19 | 30 |
| 2026-02-10 | 2026-03-12 | 30 | |
| 1990-05-20 | 2026-05-20 | 36 |
If A2 is any January 2026 date, the formula returns 2026-01-31. With TODAY(), it returns the last day of the current month.
How the formula works
- A2 supplies the starting date, which must be a real spreadsheet date.
- 0 means the same month, 1 means next month, and -1 means previous month.
- EOMONTH returns the final calendar date of the target month.
- Use EOMONTH(TODAY(), 0) when the result should update to the current month end.
| Syntax piece | Role in the formula |
|---|---|
| A2 | A real spreadsheet date in the month used as the starting point. |
| 0 | Returns the end of the same month; use 1 for next month and -1 for the previous month. |
| EOMONTH | Returns the final calendar date of the month selected by the offset. |
Verified examples
=EOMONTH(A2, 0)Excel: Enter any January 2026 date in A2. Returns: 2026-01-31
=EOMONTH(A2, -1)Google Sheets: Enter any January 2026 date in A2 and use an offset of -1. Returns: 2025-12-31
=WORKDAY(EOMONTH(A2, 0)+1, -1, C2:C20)Excel: List excluded holiday dates in C2:C20. Returns: The final weekday of the month that is not listed as a holiday
Common errors and fixes
| Issue | Likely cause | Fix |
|---|---|---|
| EOMONTH returns #VALUE! | A2 contains text that looks like a date rather than a spreadsheet date value. | Convert A2 to a real date before using EOMONTH. |
| The result appears as 46053 or another number | The formula returned a valid date serial, but the result cell uses General or Number format. | Format the output cell as Date; do not change the formula. |
| The result is one month earlier or later than expected | The months argument uses the wrong sign or offset. | Use 0 for the same month, 1 for the next month, and -1 for the previous month. |
When not to use this formula
- Use WORKDAY with the EOMONTH result when weekends or listed holidays should move the deadline.
Alternatives
| Alternative | When to use it |
|---|---|
| First Day of Month Formula | Use when the required boundary is the first calendar day rather than the final day. |
| SUMIFS by Month Formula | Use when the month-end date is part of a complete reporting total rather than the final output. |
Related formulas
Official references
- EOMONTH function from Microsoft
FAQ
How do I get the last day of the current month?
Use =EOMONTH(TODAY(),0). The result updates when the current month changes.
Does EOMONTH return the last business day?
No. EOMONTH returns the final calendar date. Wrap the next month boundary in WORKDAY when weekends and holidays must be excluded.