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 qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.

Related Posts



Get the Latest Microsoft Excel Tips

Follow Us

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

Subscribe for awesome Microsoft Excel videos 😃