Excel EOMONTH Function: Month-End Dates and Examples

Excel EOMONTH function month-end tutorial cover

What does EOMONTH do in Excel?

The EOMONTH function returns the date of the last day of a month a chosen number of months before or after a starting date. It works well for accounting close dates, invoice schedules, monthly reports and rolling date windows.

EOMONTH syntax

=EOMONTH(start_date,months)

start_date is a valid Excel date, and months is the number of months to move. Use zero for the current month, positive numbers for later months and negative numbers for earlier months. Decimal month counts are truncated toward zero.

Example 1: End of the current month

If A2 contains 15 November 2026:

=EOMONTH(A2,0)

Result: 30 November 2026. Format the result as Date if Excel shows a serial number.

Example 2: Last day of next month

=EOMONTH(A2,1)

Result: 31 December 2026. The starting day of the month does not affect which day is returned.

Example 3: Last day of previous month

=EOMONTH(A2,-1)

Result: 31 October 2026. This is useful for prior-period reporting cutoffs.

Example 4: First day of next month

=EOMONTH(A2,0)+1

Result: 1 December 2026. Adding one day to the end of November gives the first day of December.

Example 5: Last day of a month three months away

=EOMONTH(A2,3)

Result: 28 February 2027. EOMONTH handles differing month lengths and leap years automatically.

Example 6: Dynamic month-end reporting

=EOMONTH(TODAY(),0)

The result updates to the end of the current month whenever Excel recalculates after the month changes.

Example 7: Sum sales for a particular month

If A2 holds any date within the target month, B2:B100 contains transaction dates and C2:C100 contains amounts:

=SUMIFS(C2:C100,B2:B100,">"&EOMONTH(A2,-1),B2:B100,"<"&EOMONTH(A2,0)+1)

This includes transactions occurring within the full target month, including datetimes on its last day. Both criteria use dates stored as real Excel dates/times.

EOMONTH vs EDATE

EOMONTH always returns a month-end date. EDATE moves by whole months while usually preserving the day-of-month when possible. Use EOMONTH for month-end reporting and EDATE for anniversary-style schedules.

Common EOMONTH errors

  • #VALUE!: verify start_date is a valid Excel date, not text Excel cannot parse.
  • #NUM!: requested date may be outside Excel’s supported date range.
  • Unexpected integer: apply a Date number format.
  • Off-by-one range: for date-time transactions, use the next month’s first day as an exclusive upper bound.
  • Wrong month direction: use a negative months argument to move backward.

FAQs

Does EOMONTH account for leap years?

Yes. The end of February changes appropriately when the year is a leap year.

Can I calculate the first of a month?

Yes. Use =EOMONTH(A2,-1)+1 for the first day of the month containing A2.

Does EOMONTH include time of day?

It returns a date serial for midnight at the end-of-month date; it does not preserve the input time.

Practice exercise

Create a monthly billing table with invoice dates. Calculate the current month-end, next month-end, and the first date of next month. Add a SUMIFS formula to total one month of transactions.

Related Excel tutorials

Explore our Excel Functions learning module for more practical tutorials, including text, dates and logical formulas.

Official reference

See Microsoft Excel Support for official function documentation and version notes.