In addition, there is not a modern Excel function dedicated to the task of calculating months between dates.

I have no idea why.

The DATEDIF function

The solutions described below are based primarily on the DATEDIF function.

Default DATEDIF behavior when calculating months between dates

Seethis page on the DATEDIF functionfor more information about the options available.

For example, when the days match, the result is an exact multiple of months, as expected.

However, when the days don’t match, the results can be unexpected.

Default DATEDIF behavior when calculating months between dates

One workaround to this problem is described below.

This means DATEDIF rounds a result down even when it is very close to the next whole month.

If the start year and end year are the same, the result is zero.

Default DATEDIF behavior when calculating months between dates

Finally, the two parts of the formula are added together to get a total month count.

The DATEDIF (Date + Dif) function is a “compatibility” function that comes from Lotus 1-2-3.

Default DATEDIF behavior when calculating months between dates

Default DATEDIF behavior when calculating months between dates

Modified DATEDIF formula to calculate nearest whole month

DATEDIF versus YEARFRAC to calculate months between dates

Alternative formula to calculate months touched by dates

Excel formula: Get days between dates

Excel formula: Get workdays between dates

Excel formula: Get days, months, and years between dates

Excel DATEDIF function

Excel YEARFRAC function

Excel MONTH function

Excel YEAR function

Modified DATEDIF formula to calculate nearest whole month

Alternative formula to calculate months touched by dates