# How to get same date next month or previous month in Excel

To get the same date next month from a given date, you can use the EDATE function.

## Formula

=EDATE(date,1)

## Explanation

In the example shown, the formula in cell B5 is:

=EDATE(B5,1)

### How this formula works

EDATE can get the “same date” in the future or past, based on the number of months supplied. When 1 is given for months, EDATE gets the same date next month.

### Same date in previous month

To get the same date in a previous month, use -1:

=EDATE(date,-1) // prior month