How to Find the Last Day of Any Month in Excel
Last Day of Month Formula is a Excel function that returns the last day of the current month or the last day of a month n months from now.. Formula Genius generates and validates this formula automatically from a plain-English prompt.
Use the EOMONTH function to easily determine the last day of the current month or a future month by specifying the number of months to add.
The Formula
"Find the last day of the current month, or the last day of a month N months from now"
=EOMONTH(TODAY(), 0)
This formula returns the last day of the current month or the last day of a month N months from now.
Step-by-Step Breakdown
- EOMONTH is the function used to calculate the end of the month.
- TODAY() returns the current date.
- The second argument in EOMONTH specifies how many months to add (0 for current month).
- The function calculates the last day of the month based on the provided date.
- The result is a date value representing the last day of the specified month.
Edge Cases & Warnings
- Using a negative number for N returns the last day of a previous month.
- If the date is at the end of a month, it still returns the last day of that month.
- Using a very large number for N may return a date far in the future.
- If the formula is used in a leap year, it correctly accounts for February 29.
- If no argument is provided, it defaults to the current month.
Examples
"EOMONTH(TODAY(), 0)"
2023-10-31
"EOMONTH(TODAY(), 2)"
2023-12-31
Frequently Asked Questions
What does EOMONTH stand for?
EOMONTH stands for 'End Of Month'.
Can I use EOMONTH with dates other than today?
Yes, you can replace TODAY() with any valid date.
What happens if I use a negative number?
Using a negative number will return the last day of a previous month.
Can't find what you need?
Describe any formula in plain English and Formula Genius will generate, explain, and validate it — instantly.