How to Find Number of Weeks Between Two Dates in Excel

Suppose you are in a situation where you have to calculate weeks from some given date range. And you need to calculate cost estimation by using those weeks, for instance. So how will you calculate those weeks? Well, you can calculate those using your calculator, or you can do it in Excel in a faster way. Guess what our topic is today? That’s right! This is how you can calculate the number of weeks between two dates in Excel.

Let’s assume we have a dataset, namely the Everest Base Camp Expedition timeline. You can use any dataset suitable for you.

Number of Weeks Between Two Dates in Excel

We have used the Microsoft Office 365 version; you may use any other version according to your convenience.


1. Using INT Function

Firstly, you can calculate the number of weeks between two given dates by doing a simple mathematical calculation. We will subtract two given dates and then divide them by 7 to get the number of weeks. To get an integer value, we will use the INT function.

📌 Steps:

  • Select cell D5 and apply the following formula given below.
=INT((C5-B5)/7)

Here, cells C5 and B5 represent the Ending Date and Starting Date respectively. In this formula, the mathematical subtraction returns the number of days first. Later, when the output is divided by 7, we get the number of weeks, but not in integers. That’s why we need to use the INT function to get the desired output.

  • Then press ENTER.

Using INT Function

Using INT Function

  • The final output will be given below.

Using INT Function


2. Applying ROUNDDOWN Function

The ROUNDDOWN function returns the same output as found in the earlier method. Here, the output has been rounded down by using the ROUNDDOWN function.

📌 Steps:

  • To begin, put the following formula in cell D5.
=ROUNDDOWN((C5-B5)/7,0)
  • Then press ENTER.

Applying ROUNDDOWN Function

  • Drag the Fill Handle icon.

Applying ROUNDDOWN Function

  • As a result, your final output will be as follows.

Applying ROUNDDOWN Function

Read More: Excel Formula to Count Days from Date


3. Utilizing the DATEDIF Function

In this method, we will learn how to calculate the number of weeks between two dates using the DATEDIF function. The method is not hard. All you need to know is how you use the DATEDIF function to do your task.

📌 Steps:

  • Click on cell D5 and then type the following formula.
=ROUNDDOWN((DATEDIF(B5, C5, "d") / 7), 0)
  • Press ENTER.

3. Utilizing DATEDIF Function

  • Finally, drag the Fill Handle tool from cell D5 to D15 to get the rest of the value.

3. Utilizing DATEDIF Function

  • The output will look like the one below.

3. Utilizing DATEDIF Function


4. Employing WEEKNUM Function

By using the WEEKNUM function, you can calculate the number of weeks between two given dates. But one thing you should keep in mind is that this function will provide you with the correct output if two dates (from which you want to find the number of weeks) are in the same year. Sounds Confusing? Not at all! You will understand the functionality if you look at the example that I have given below.

Suppose we have a data set that looks like this:

Employing WEEKNUM Function

Now follow the steps that are given below.

📌 Steps:

  • First, click on cell D5 and type the following formula.
=WEEKNUM(B5)-WEEKNUM(B5)

Basically, the WEEKNUM function returns the week number in a year from any specific date. For this reason, we have to use the function twice for each date.

  • Press ENTER.

Employing WEEKNUM Function

  • Drag the Fill Handle tool as we have shown below.

Employing WEEKNUM Function

  • Thus, we get the values of the weeks as follows.

Employing WEEKNUM Function


Calculating the Number of Weekdays Between Two Dates in Excel

Now, we can calculate our weekdays between given dates employing the DATEDIF function in our Excel sheet.

📌 Steps:

  • Type the following formula in cell D5.
=(DATEDIF(B5, C5, "d"))

In this case, we used d in the 3rd argument as we want to find the number of days between two dates.

  • Then press ENTER.

Calculating Number of Weekdays Between Two Dates in Excel

  • Then drag the Fill Handle tool from cell D5 to D15 to get the other value.

Calculating Number of Weekdays Between Two Dates in Excel

  • As a result, the output looks like this.

Calculating Number of Weekdays Between Two Dates in Excel

Read More: Excel Formula to Calculate Number of Days Between Today and Another Date


Calculating the Number of Months Between Two Dates in Excel

The Excel DATEDIF function also allows you to determine the number of months between two dates, like counting days.

📌 Steps:

  • Type the following formula.
=(DATEDIF(B5, C5, "m"))

In this formula, m gives Excel the direction to count the month as we have previously learned for counting days.

  • Then press ENTER.

Calculating Number of Months Between Two Dates in Excel

  • Drag the Fill Handle tool from cell D5 to D15 to get the other value.

Calculating Number of Months Between Two Dates in Excel

  • Finally, the output you get is as follows.

Calculating Number of Months Between Two Dates in Excel

Read More: How to Count Months from Date to Today by Using Excel Formula


Calculating the Number of Years Between Two Dates in Excel

Similarly, you can also find the number of years between two dates utilizing the DATEDIF function in Excel.

📌 Steps:

  • First, type the following formula for cell D5.
=(DATEDIF(B5, C5, "y"))
  • Press ENTER.

Calculating Number of Months Between Two Dates in Excel

  • Next, drag the Fill Handle icon.

Calculating Number of Months Between Two Dates in Excel

  • In turn, the output you get is as follows.

Calculating Number of Months Between Two Dates in Excel


Practice Section

Additionally, we have provided a practice section on the right side of each sheet so you can practice yourself. Please make sure to do it yourself.

Practice Section


Download Practice Workbook

You can download and practice the dataset that we have used to prepare this article.


Conclusion

We hope you have learned something new today through this tutorial. In fact, calculating the number of weeks between two dates is not hard at all, and we think all of us should learn this method to make our lives a little bit easier. Nevertheless, we will be at your disposal if you have any queries. Thank you.


Related Articles


<< Go Back to Days Between Dates | Calculate Dates | Date-Time in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mohammad Shah Miran
Mohammad Shah Miran

Mohammad Shah Miran has a professional background spanning over a year at Softeko. Initially starting as an Excel and VBA writer, he authored more than 50 articles for the ExcelDemy project. Currently, Miran is engaged in the LinuxSimply project as a Linux content developer, completed over 40 articles. His analytical approach extends across various domains, including Excel, VBA, Bash scripting, Linux, data analysis, and Python programming. In his leisure time, Miran enjoys watching movies and series or listening... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo