EOMONTH Function

EOMONTH Function

EOMONTH Function

Returns the last day of the month before or after a given date.

ExcelClash Team
PUBLISHED

Summary

The Excel EOMONTH function returns the last day of the month before or after a given date.

EOMONTH is useful for month-end reporting, accounting cutoffs, billing periods, due dates, lease schedules, and any workbook that needs a clean month-end boundary.

Purpose

Return a month-end date

Calculates the final calendar day of a month based on a start date and month offset.

Return Value

A date serial number

Returns a valid Excel date for the last day of the target month.

Syntax

=EOMONTH(start_date, months)

start_date is the anchor date. months tells Excel how many months forward or backward to move before returning the month-end date.

Arguments

  • start_date - The starting date for the calculation.
  • months - The number of months to shift. Use 0 for the current month, positive values for future months, and negative values for past months.

EOMONTH vs EDATE

These functions both shift dates by months, but they do not return the same kind of result.

Function Returns Best Use Example
EOMONTH Last day of the target month Month-end cutoffs and reporting =EOMONTH(A1,0)
EDATE Same day number in another month Month-based due dates and renewals =EDATE(A1,1)

Use EOMONTH when you need the end of a month. Use EDATE when you want to preserve the day position as much as possible.

Using EOMONTH

EOMONTH is especially useful when dates arrive on many different days but your reporting needs a consistent month-end result. For example, invoices dated throughout May can all be converted to May 31 for monthly reporting.

The second argument controls the shift. A value of 0 keeps the current month, 1 moves to next month, and -1 moves to the previous month. Microsoft also notes that if months is not an integer, it is truncated.

A common pattern is DAY(EOMONTH(date,0)), which returns the total number of days in the month. That makes EOMONTH useful for monthly proration as well as reporting cutoffs.

Example 1 - Return the End of the Current Month

Use EOMONTH with a zero month offset to get the last day of the same month.

=EOMONTH(A1,0)

If A1 contains 2026-01-15, the result is the final day of January 2026.

Check Answer
Challenge #1
Target: Sheet1!F1
Current Month End

In cell F1, return the last day of the month for A1 with =EOMONTH(A1,0).

Example 2 - Return the End of the Next Month

Change the month offset to move forward before taking the month end.

=EOMONTH(A1,1)

This returns the final day of the following month. It is useful for billing cycles, contract periods, and rolling schedules.

Check Answer
Challenge #2
Target: Sheet1!F2
Next Month End

In cell F2, return the last day of the following month from A1.

Example 3 - Count the Days in a Month

Wrap EOMONTH in DAY to get the total number of days in the target month.

=DAY(EOMONTH(A1,0))

This pattern automatically handles different month lengths and leap years, so it is useful for monthly calculations and proration logic.

Check Answer
Challenge #3
Target: Sheet1!F3
Days in Month

In cell F3, calculate the total number of days in the month for A1.

Example 4 - Return the End of the Year

You can also combine EOMONTH with MONTH to jump to the final day of the year.

=EOMONTH(B1,12-MONTH(B1))

If B1 is any date in 2026, the result is December 31, 2026. This is a useful year-end cutoff pattern.

Check Answer
Challenge #4
Target: Sheet1!F4
Year-End Cutoff

In cell F4, return the last day of the year for the date in B1.

Conclusion Recap

  • Summary: EOMONTH returns the last day of a month.
  • Core use: Month-end reporting, accounting cutoffs, and billing boundaries.
  • Month offset: Use positive, negative, or zero month shifts to move around the calendar.
  • Helpful pattern: DAY(EOMONTH(date,0)) returns the number of days in a month.
  • Difference from EDATE: EOMONTH returns a month-end date, while EDATE returns a shifted calendar date.
  • Best practice: Use valid Excel dates for reliable results.
Tactical Arena
Select Scenario:
Share EOMONTH Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.