# How to Get the Last Day of the Month

## Example

=DAY(EOMONTH(B3,0))

## Generic Formula

=DAY(EOMONTH(Date,0))

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.

### 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

#### 9 Ways to Show Formulas in Microsoft Excel

This post is going to show you all the different ways you can show the...

#### How To Conditionally Concatenate A Range

This formula will conditionally concatenate a range based on a criteria in another range.

#### How To Solve a Quadratic Equation

These formulas will give the solutions to a quadratic equation.