Count number of months between dates Excel tutorial

Count number months between two dates with this Excel tutorial. Counting time difference like this is easy, just follow these simple steps.

Type any two dates in cells A1 and B1. I have chosen 1.7.2008 for cell A1 and 5.7.2012 for cell B1.

You can count number of months between these dates with the following formula:
=(YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)
The result for my dates is 48 months.  Note, this formula rounds the result up to full months. So if only a couple of days of a month has passed, it is included to the result.

Round down to the previous month when counting number of months between dates with this formula:
=IF(DAY(B1)>=DAY(A1),0,-1)+(YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)
That's it, have a good one! Cheers!

No comments:

Post a Comment