Highlighted

## How to Calculate Months Difference between Two Dates

Does anyone know how to calculate the number of months between two dates? Calculating the days is easy per my formula in the image below.

4 REPLIES 4
Highlighted Community Manager

## RE: How to Calculate Months Difference between Two Dates

After checking with our Customer Success team, I have two options for you:
• Depending on the accuracy needed, try: (End Date - Start Date)/30
OR
• Month(Date 1) - Month(Date 2)
Will you give one or both a try and let me know know which worked best? Thanks! Emily
Highlighted

## RE: How to Calculate Months Difference between Two Dates

Thanks Emily for the fast response. I ended up using (End Date - Start Date) / 365 * 12. This will give the highest degree of accuracy.
Highlighted

## RE: How to Calculate Months Difference between Two Dates

Michael - an alternative method is (Year(EndDate)*12 + Month(EndDate)) - (Year(StartDate)*12 + Month(StartDate)) This returns the number of calendar periods and is valid for some calculations. Best, Mitch
Highlighted  Certified Master Anaplanner

## Re: How to Calculate Months Difference between Two Dates

by utilizing the Functions  MONTH() and YEAR() you can derive  the number of months between 2 date formatted line items with this formula:  IF ISBLANK(start date) THEN 0 ELSE IF ISBLANK(end date) THEN YEAR(START()) * 12 + MONTH(START()) - (YEAR(start date) * 12 + MONTH(start date)) ELSE YEAR(end date) * 12 + MONTH(end date) - (YEAR(start date) * 12 + MONTH(start date))