ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

Function guides / EOMONTH

The EOMONTH function in Excel

EOMONTH (end of month) returns the last day of the month, a given number of months before or after a date. Use it for payment terms like "end of next month", for monthly reporting periods, and to find the first day of a month or the number of days in it. Finance and accounting tests use it often.

Syntax

=EOMONTH(start_date, months)
start_dateAny date in the month you're counting from.
monthsHow many months to move. 0 is the end of the same month, 1 the end of next month, -1 the end of last month.

Try it yourself

This is a live spreadsheet. Type the formula and press Enter.

These invoices are due at the end of the month after they're issued. In D2, use EOMONTH to find the due date for the invoice date in B2.

fx
ABCDEFG
1
Invoice
Invoice date
Amount
Due date
2
INV-410
1/17/2025
$1,200.00
3
INV-411
1/30/2025
$860.00
4
INV-412
2/4/2025
$2,350.00
5
INV-413
3/21/2025
$495.00
6
7
8

Tip: The second argument counts months from the invoice date. 0 would be the end of the same month.

Examples

=EOMONTH(B2,0)→ 45688

Returns the last day of the invoice's own month, Jan 31, 2025. Like other date results it comes back as a serial number. Format the cell as a Date to show it.

=DAY(EOMONTH(B3,0))→ 29

DAY of the month's last date is the number of days in that month. February 2024 was a leap year, so this gives 29.

=TEXT(EOMONTH(B4,-1)+1,"mmm d, yyyy")→ "Nov 1, 2025"

The end of last month plus one day is the first day of this month. It's the standard way to get the start of a reporting period.

Example data

1InvoiceInvoice dateAmount
2INV-3011/17/20251200
3INV-3022/9/2024850
4INV-30311/3/2025430

Common mistakes

  • Leaving out the months argument

    EOMONTH needs both arguments, so Excel won't accept =EOMONTH(B2). Use 0 for the end of the same month.

  • The result shows as a number

    A result like 45688 is a date serial number. Format the cell as a Short Date to see it.

  • Expecting the first day with -1

    EOMONTH(B2,-1) is the last day of the previous month. Add 1 to get the first day of this month.

  • EOMONTH inside quotes in SUMIFS

    "<=EOMONTH(F1,0)" is just text. Join the operator to the function: "<="&EOMONTH(F1,0).

FAQ

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

Go to the end of the previous month and add one day: =EOMONTH(A2,-1)+1.

How do I find how many days are in a month?+

Take the day number of the month's last date: =DAY(EOMONTH(A2,0)). It returns 28, 29, 30 or 31.

How do I total sales for one month?+

Use SUMIFS with the first and last day: =SUMIFS(C2:C50,B2:B50,">="&F1,B2:B50,"<="&EOMONTH(F1,0)), where F1 holds the first day of the month.

Lesson

Master EOMONTH step by step: Renewals and month-ends: EDATE, EOMONTH, WEEKDAY

Shift dates by whole months with EDATE, jump to month-end with EOMONTH, and find the day of the week with WEEKDAY.

Related functions

EDATEWORKDAYSUMIFS