How to Count the Number of Days, Weeks, Months or Years between Two Dates?


Excel offers strong formulas and functions that help simplify date computations. This tutorial will walk you through the procedure step by step regardless of whether you need to determine the time interval between two significant events, keep track of project due dates, or examine time intervals.

Excel's ability to handle dates is crucial for many jobs, and knowing how to precisely compute date differences can help you save time and effort. This article will go over various techniques for measuring the time that has passed between two dates and explore various situations in which these calculations may be used.

Count the Number Of Days, Weeks, Months or Years between Two Dates

Here we can complete the task using the auto-fill handle. So let us see a simple process to know how you can Count the number of days, weeks, months, or years between two dates in Excel.

Step 1

Consider an Excel sheet where you have two dates.

First, to count the number of days between two dates, click on an empty cell and enter the formula as =DATEDIF(A2,B2,"D") and click enter.

Empty cell > Formula > Enter.

Step 2

Now to count the number of weeks between two dates, click on the empty cell and enter the formula as =(B2-A2)/7 and click enter.

Empty cell > Formula > Enter.

Step 3

Then, to count the number of months between two dates, click on an empty cell and enter the formula as =DATEDIF(A2,B2,"m") and click enter.

Empty cell > Formula > Enter.

Step 4

Finally, to count the number of years between the dates, click on the empty cell and enter the formula as =DATEDIF(A2,B2,"y") and click enter.

This is how you can count the number of days, weeks, months, and years between two dates in Excel.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can Count the number of days, weeks, months, or years between two dates in Excel to highlight a particular set of data.

Updated on: 21-Aug-2023

179 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements