To change a date to the end of the month in Excel, use the EOMONTH function. The basic formula is =EOMONTH(start_date, 0), where "start_date" is the cell containing your date and "0" tells Excel to stay within the current month. This function is essential for calculating payment deadlines, financial reporting periods, and project milestones where the specific day of the month is less important than the month-end cutoff.

What You'll Need

  • Microsoft Excel (works in all modern versions, including Excel 365, 2021, 2019, and Excel for the Web).
  • A cell containing a valid date (formatted as a Date in Excel).
  • A blank cell where you want the result to appear.

Step-by-Step

  1. Identify your start date: Locate the cell that contains the date you want to modify. For this example, let's assume your date is in cell A2.
  2. Select the destination cell: Click on the empty cell where you want the end-of-month date to be displayed (e.g., cell B2).
  3. Enter the formula: Type the following formula exactly as shown: =EOMONTH(A2, 0).
  4. Press Enter: Once you hit Enter, Excel will calculate the last day of the month for the date provided in A2.
  5. Format as Date: If the result appears as a five-digit number (e.g., 45323), it is because Excel is displaying the date as a serial number. To fix this:
    • Right-click the cell.
    • Select Format Cells.
    • Choose Date from the Category list and pick your preferred date format.
    • Click OK.
  6. Apply to multiple rows: If you have a column of dates, click the small green square (fill handle) at the bottom-right corner of cell B2 and drag it down to apply the formula to the rest of your list.

Common Mistakes

  • Using the wrong month offset: The second argument in the formula (the "0") is the number of months to move forward or backward. If you enter "1" instead of "0", Excel will give you the end of the following month.
  • Incorrect date formatting: Entering the date as text (e.g., typing "January 31st" instead of "1/31/2024") will cause the formula to return a #VALUE! error because Excel cannot perform math on text.
  • Forgetting the equals sign: Like all Excel formulas, if you forget to start with =, Excel will treat the entry as plain text and will not perform the calculation.
  • Circular references: Trying to put the formula in the same cell as the start date (e.g., putting =EOMONTH(A2, 0) inside cell A2) will create a circular reference error.

Tips

  • Find the end of the previous month: If you need the last day of the month before the date in your cell, change the 0 to -1: =EOMONTH(A2, -1).
  • Find the end of a future month: To find the end of the month three months from now, use =EOMONTH(A2, 3).
  • Calculate the first day of the next month: While there is no "First of Month" function, you can use EOMONTH and add one day. Use =EOMONTH(A2, 0) + 1. This finds the last day of the current month and adds one day to land on the 1st of the next month.
  • Dynamic dates: Use =EOMONTH(TODAY(), 0) to always show the end of the current calendar month, regardless of when the spreadsheet is opened.

Troubleshooting

If the formula does not go to plan, try these solutions in order:

  1. Check for #VALUE! errors: This usually means the date in your start cell isn't actually a "date" in Excel's eyes. Try re-typing the date or using the Data > Text to Columns tool to convert text dates into proper date formats.
  2. Check for #NAME? errors: This happens if the function name is misspelled. Ensure it is spelled EOMONTH and not ENDMONTH or EOMONT.
  3. Verify the serial number: If you see a number like 45657, the formula is working perfectly, but the cell format is set to "General" or "Number." Change the cell format to "Short Date" via the Home tab dropdown menu.
  4. Check for locked cells: If you cannot enter the formula, check if the worksheet is protected. Go to the Review tab and check if "Unprotect Sheet" is an option.

Frequently Asked Questions

Does EOMONTH account for leap years?

Yes. The EOMONTH function automatically recognizes leap years and will correctly return February 29th for leap years and February 28th for non-leap years.

Can I use EOMONTH with a date I type directly into the formula?

Yes, but you must wrap the date in quotes or use the DATE function. For example: =EOMONTH("2024-01-15", 0) or =EOMONTH(DATE(2024,1,15), 0). Referencing a cell is generally recommended for better flexibility.

How do I find the end of the current month automatically?

Combine EOMONTH with the TODAY function: =EOMONTH(TODAY(), 0). This will update every time the workbook is recalculated based on the current system date.

Is EOMONTH available in Google Sheets?

Yes, the EOMONTH function works exactly the same way in Google Sheets as it does in Microsoft Excel.

What happens if the start date is already the last day of the month?

The formula will simply return that same date. For example, if A2 is January 31st, =EOMONTH(A2, 0) will return January 31st.