How to Get the Last Day of the Month



Generic Formula


Date – This is the date for which you want to return the last day of the month.

What It Does

This formula will return the last day of the month from the date selected.

How It Works

EOMONTH(Date,N) will return the last date in the month that is N number of months before or after the Date. If N is 0 then this will be the last date in the same month as the Date. In our example EOMONTH(“2017-07-27”,0) results in 2017-07-31 because the 31st is the last day in the month in July. We then use the DAY function to return the numerical value of the last day of the month. In our example DAY(“2017-07-31”) results in 31.

About the Author

John MacDougall

John MacDougall

John is a Microsoft MVP and freelance consultant and trainer specializing in Excel, Power BI, Power Automate, Power Apps and SharePoint. You can find other interesting articles from John on his blog or YouTube channel.


Related Posts



Get the Latest Microsoft Excel Tips

Follow Us

Follow us on social media to stay up to date with the latest in Microsoft Excel!