Calculate Time Between 2 Dates in Excel

September 2016


Among the variety of functions given by Office application Microsoft Excel is the ability to determine the number of days between two dates. These formulas can be adapted to provide you with daily, monthly, or yearly variables. This article will provide you with two formulas that you may adapt to either calculate the number of days between two given dates, or find a date based on the number of days after a specific day.

Calculate Dates in Excel

In this example, you will work out the number of days that pass between a start date of January 5, 2009 and February 27, 2010. The formula assumes that your information is listed in Columns A and B, and in Rows 1 and 2:
   A              B                  
1 Start End
2 01/05/09 02/27/10


To calculate the number of days between these two dates, enter the following formula in box C2:
=(YEAR(B2)-YEAR(A2))*12+MONTH(B2)-MONTH(A2) 

Calculate Future Date in Excel

Using the same principles as above, you can use the same date functions to calculate a future date in Excel. The below example assumes your data is shown in Columns A and B, as well as Rows 1 and 2:

A B
1 Start Month number
2 01/05/09 2

To calculate a date exactly 2 month after January 5, 2009, use the following formula:

=MIN(DATE(YEAR(A2),YEAR(A2)+C2+1,0),DATE(YEAR(A2 ),MONTH(A2)+C2,DAY(A2))) 

Related :

This document entitled « Calculate Time Between 2 Dates in Excel » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.