How to Calculate the Number of Weeks Between Two Dates in Excel

Dataset Overview

Let’s assume we have a dataset, namely the Everest Base Camp Expedition timeline.

Number of Weeks Between Two Dates in Excel


Method 1 – Using the INT Function

Subtract the Dates:

  • Select cell D5.
  • Enter the following formula:

=INT((C5-B5)/7)

  • Here, C5 represents the ending date, and B5 represents the starting date.
  • The subtraction calculates the number of days between the dates.
  • Dividing by 7 gives the number of weeks.
  • The INT function ensures we get an integer value.

Using INT Function

Fill Down:

  • Press ENTER.
  • Drag the Fill Handle from cell D5 to D15 to apply the formula to the entire range.

Using INT Function

  • The final output is shown below.

Using INT Function


Method 2 – Applying the ROUNDDOWN Function

Calculate Weeks:

  • In cell D5, enter:
=ROUNDDOWN((C5-B5)/7,0)
  • This formula rounds down the result to the nearest whole number of weeks.

Applying ROUNDDOWN Function

Fill Down:

  • Press ENTER.
  • Use the Fill Handle to copy the formula down to cell D15.

Applying ROUNDDOWN Function

  • The final output is shown below.

Applying ROUNDDOWN Function

Read More: Excel Formula to Count Days from Date


Method 3 – Utilizing the DATEDIF Function

Weeks with DATEDIF:

  • Enter the following formula in cell D5
=ROUNDDOWN((DATEDIF(B5, C5, "d") / 7), 0)
  • The DATEDIF function calculates the difference between dates in days (“d).
  • Dividing by 7 gives the weeks.

3. Utilizing DATEDIF Function

Fill Down:

  • Press ENTER.
  • Use the Fill Handle to copy the formula down to cell D15.

3. Utilizing DATEDIF Function

  • The final output is shown below.

3. Utilizing DATEDIF Function


Method 4 – Employing the WEEKNUM Function

Weeks Using WEEKNUM:

  • Suppose you have a dataset as shown.

In cell D5, enter:

=WEEKNUM(B5)-WEEKNUM(B5)
  • The WEEKNUM function returns the week number in a year.
  • We use it twice for each date to find the difference in weeks.

Employing WEEKNUM Function

Fill Down:

  • Press ENTER.

Employing WEEKNUM Function

  • Use the Fill Handle to copy the formula down to cell D15.

Employing WEEKNUM Function

  • The final output is shown below.

Employing WEEKNUM Function


Additional Calculations:

Weekdays Between Dates:

  • To find weekdays, enter:
=(DATEDIF(B5, C5, "d"))
  • This counts the number of days between the 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


Months Between Dates:

  • For months, enter:
=(DATEDIF(B5, C5, "m"))
  • This counts the number of months.
  • 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

  • As a result, the output looks like this.

Calculating Number of Months Between Two Dates in Excel

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


Years Between Dates:

  • To find years, enter:
=(DATEDIF(B5, C5, "y"))
  • This calculates the number of years.
  • 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

  • As a result, the output looks like this.

Calculating Number of Months Between Two Dates in Excel


Practice Section

We have provided a practice section on the right side of each sheet so you can practice yourself.

Practice Section


Download Practice Workbook

You can download the practice workbook from here:


Related Articles


<< Go Back to Days Between 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