Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

EOMONTH Formula: How to Use It in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The EOMONTH function returns the last day of the month a specified number of months before or after a start date. Use it as =EOMONTH(start_date, months) — for example, =EOMONTH("2025-01-15", 0) gives 31 January 2025, and =EOMONTH("2025-01-15", 1) gives 28 February 2025. It works in Excel, Google Sheets and LibreOffice Calc, and the result is a real date serial number you can format and calculate with.

This guide covers the syntax, practical examples, common errors and fixes. The function is identical across platforms, but the way you enter dates and the menu labels for formatting can differ slightly by version, device or region.

What You'll Need

  • A spreadsheet application that supports EOMONTH: Microsoft Excel (desktop or web), Google Sheets, or LibreOffice Calc.
  • A valid start date in a cell, or a date typed directly into the formula.
  • Basic familiarity with entering formulas (starting with =) and formatting cells as dates.

Step-by-Step

  1. Pick a cell for the result. Click an empty cell where you want the last-day date to appear. This keeps your source date separate from the calculated result.
  2. Enter the formula. Type =EOMONTH( then supply two arguments separated by a comma: the start date and the number of months. For example: =EOMONTH(A2, 0) if your start date is in A2. Close the parenthesis and press Enter.
  3. Use 0 for the current month. A months value of 0 returns the last day of the month that contains the start date. If A2 is 15 March 2025, =EOMONTH(A2, 0) returns 31 March 2025.
  4. Use positive numbers for future months. =EOMONTH(A2, 1) returns the last day of the next month; =EOMONTH(A2, 3) returns the last day three months later. The function handles year rollovers automatically.
  5. Use negative numbers for past months. =EOMONTH(A2, -1) returns the last day of the previous month. This is useful for prior-period reporting.
  6. Format the result as a date. The formula returns a serial number that may display as a plain number. Select the result cell, open the number format menu (Home tab > Number Format in Excel; Format > Number in Google Sheets), and choose a Date format. The exact labels vary by version.
  7. Copy the formula down. Drag the fill handle or copy and paste to apply the same formula to other rows. Use absolute references (for example $B$1) if the months value comes from a fixed cell.
  8. Combine with other functions. Wrap EOMONTH in TEXT to produce a readable label: =TEXT(EOMONTH(A2,0),"mmm yyyy") gives "Mar 2025". Use =EOMONTH(A2,0)+1 to get the first day of the following month.

Common Mistakes

  • Passing text that looks like a date. EOMONTH needs a real date value or a date string the app can parse. Text like "January 2025" may be interpreted incorrectly. Store dates in date-formatted cells or use DATE(year, month, day).
  • Forgetting the months argument. EOMONTH requires two arguments. Omitting the second one causes an error.
  • Using a non-integer months value. The months argument is truncated to an integer. 1.9 behaves like 1, which can surprise you.
  • Expecting the result to look like a date automatically. If the cell was formatted as General or Number, you will see a five-digit serial number instead of a date. Apply a date format.
  • Confusing EOMONTH with EDATE. EDATE returns the same day-of-month shifted by months; EOMONTH always returns the last day of the target month.
  • Using a start date before 1900. Excel's date system does not support dates before 1 January 1900, so EOMONTH returns an error for earlier dates.

Tips

  • Use EOMONTH to build month-end reporting periods: the period start is =EOMONTH(previous_date,0)+1 and the period end is =EOMONTH(current_date,0).
  • For a fixed month-end, combine with TODAY(): =EOMONTH(TODAY(),0) gives the last day of the current month and updates automatically.
  • To count days remaining in the month, subtract the start date: =EOMONTH(A2,0)-A2.
  • Use named ranges for the months argument so you can change the offset in one place.
  • In Google Sheets, EOMONTH works the same way; the function name is not localized in formulas, but menu labels are.

Troubleshooting

  • #VALUE! error: The start date is not a valid date. Check that the cell contains a date, not text. Re-enter using a date format or the DATE function.
  • #NUM! error: The resulting date falls outside the supported range (before 1900 or after 9999). Adjust the start date or months value.
  • Result shows as a number: Format the cell as a date. In Excel, use Home > Number Format > Date; in Google Sheets, Format > Number > Date.
  • Formula returns a date you did not expect: Verify the months argument sign and value. Remember that 0 means the current month, not the next month.
  • Formula not calculating: Check that calculation is set to automatic (Formulas > Calculation Options in Excel). Press F9 to recalculate manually.
  • Dates entered as text: Use Data > Text to Columns or the DATEVALUE function to convert text dates to real dates before using EOMONTH.

Frequently Asked Questions

What does EOMONTH stand for?

End Of MONTH. It returns the last day of the month a given number of months from a start date.

Can EOMONTH handle leap years?

Yes. It returns 29 February for leap years when the target month is February.

Does EOMONTH work in Google Sheets?

Yes, with the same syntax: =EOMONTH(start_date, months).

How do I get the first day of the next month?

Add 1 to the EOMONTH result: =EOMONTH(A2,0)+1.

Why does EOMONTH return a number instead of a date?

The cell is formatted as a number. Apply a date format to the result cell.

Can I use a cell reference for the months argument?

Yes. For example, =EOMONTH(A2, B2) uses the value in B2 as the month offset. Use an absolute reference if you copy the formula.