Cellwise

Dates function

Excel EOMONTH function

EOMONTH returns the last day of the month, a set number of months away from a start date. Use it for month-end reporting, payment terms like "end of next month", and counting days in a month.

fx=EOMONTH(start_date, months)

Arguments

start_date
Any date in the starting month.
months
0 for the same month, 1 for next month, -1 for last month.

EOMONTH examples

Every result below was calculated live from this sample sheet.

ABC
1InvoiceInvoice dateAmount
2INV-3102026-01-12940
3INV-3112026-02-201200
4INV-3122026-03-05375
  1. fx=EOMONTH(B2,0)

    Result: Jan 31, 2026

    The last day of the invoice month: January 31, 2026.

  2. fx=EOMONTH(B3,1)

    Result: Mar 31, 2026

    Payment due at the end of next month: March 31, 2026.

  3. fx=EOMONTH(B4,-1)+1

    Result: Mar 1, 2026

    The end of last month plus one day is the first day of this month.

  4. fx=DAY(EOMONTH(B3,0))

    Result: 28

    Reads the last day's number to count the days in February: 28.

How to use EOMONTH

  1. Click the cell for the result.
  2. Type =EOMONTH( and click any date.
  3. Type ,0 for this month or another number of months.
  4. Press Enter and format the cell as a date.

Common EOMONTH mistakes

Leaving out the months argument

EOMONTH needs both arguments. Use 0 for the current month.

Result shows as 46053

That is a date serial. Format the cell as a date.

Using it to add months while keeping the day

EOMONTH always jumps to month-end. Use EDATE to keep the same day.

EOMONTH FAQ

How do I get the last day of the month in Excel?

Use =EOMONTH(A2,0). It works for leap years and months of any length.

How do I get the first day of the month in Excel?

Use =EOMONTH(A2,-1)+1. It finds the end of the previous month and adds one day.

How do I calculate "end of month plus 30 days" payment terms?

Add the days to EOMONTH: =EOMONTH(A2,0)+30.

Practice EOMONTH in these lessons

Guides that use EOMONTH

Related functions

Updated 2026-10-31