﻿ How to calculate between dates in Excel - Barzrul Tech

# How to 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 different 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 4 Jan 20017. 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.

## 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. Following are the examples of the formula you can use to calculate the different:

### The difference in days:

`=DATEDIF(B3,C3,"d")`

### The difference in weeks:

`=DATEDIF(B4,C4,"d")/7`

### The difference in months:

`=DATEDIF(B5,C5,"m")`

### The difference in years:

`=DATEDIF(B6,C6,"y")`

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 locations. 