How to calculate between dates in Excel

Calculate between dates in Excel
Calculate between dates in Excel

Learn how to use Microsoft Excel to calculate between dates. In this MS Excel tips series post, you will learn how you can calculate days, weeks, months, or years between two different dates. You also will learn how to accumulate the difference into days, weeks, months, and years.


Basically, here is the list of a simple formula to calculate the difference between two dates. It includes the calculation for how many days, weeks, months, or years between the two dates.

As you can see in the image above, that is an example of two dates from 4 Jan 1984 to 9 Feb 2036. I can easily calculate how many days are there, how many weeks, months, and years. And also I can accumulate all the days, months, and years between the date and combine them to be displayed in only one cell.

See also the uses of F1 through F12 function keys.


How to calculate between dates in Excel

  1. On your Excel sheet, put any two dates that you want to calculate in two separate cells.
  2. Highlight the cell where you want the answer to be displayed.
  3. Following are the examples of the formula you can use to calculate the different:

The difference in days:


The difference in weeks:


The difference in months:


The difference in years:


Note: Other than “weeks” above, the formula will only give you the number of completed days, months, or years. The partially-complete periods will be excluded.

However, there is a way you can display the partially-complete days, months, or years. The calculation formula will be as below:

The difference for partially-complete days, months or years:

=DATEDIF(B7,C7,"y")&" years, "&DATEDIF(B7,C7,"ym")&" months, "&DATEDIF(B7,C7,"md")&" days"

You can refer above image of how the formula will be shown in the accumulative period.

Note: You can copy and paste the formula above into your Excel cell. Just remember to change the cell address with your own location.


Let me know your thought

Notify of
Inline Feedbacks
View all comments
Barzrul Tech uses cookies to ensure you get the best experience while browsing the site.Read more >>