Excel tips: How to use Excel to calculate between dates

How to use Excel to calculate between dates

How to use Excel to calculate between dates

Learn how to use Microsoft Excel to calculate between dates. In this 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 simple formula to calculate the different 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 use Excel to calculate between dates

Step 1: On your Excel sheet, put any two dates that you want to calculate in two separate cells.

Step 2: Highlight the cell where you want the answer to be displayed. Following is the example of the formula you can use to calculate the different:

  • Difference in days: =DATEDIF(B3,C3,”d”)
  • Difference in weeks: =DATEDIF(B4,C4,”d”)/7
  • Difference in months: =DATEDIF(B5,C5,”m”)
  • 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:

=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 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 locaitons.

Get stuck in the middle or if you have any questions, let me know your thought in the comment below. Appreciate the knowledge, let your friends know about this post. Like and share this post with your friends. Click the button below.
Barzrul's Tech Blog uses cookies to ensure you get the best experience. Read more >>