In Excel, you can use a formula to calculate the number of weeks between two dates. In this tutorial, we will learn to write this formula.
Here, in this example, we have two dates: the starting date is 01-Jan-2023, and the ending date is 04-Jul-2023.
Formula to Get Weeks Between Two Dates in Excel
- Enter TRUNC Function in a cell.
- Minus the starting date from the ending date.
- Divide it by 7 as there are 7 days in a week.
- Close the function and hit enter to get the result.
The moment you hit enter, it returns the count of complete weeks between the specified dates.
The way this formula works is simple: you subtract the starting date from the ending date to get the total number of days between the dates.
Then, divide that by 7 to get the number of weeks for those days. In the end, when you use the TRUNC function, it only returns the count of the complete weeks, ignoring the decimals.
But if you want to get the exact count of weeks, you can skip using the TRUNC function and use a simple formula like the following:
And if you want to round an incomplete week as a complete week, you can use the ROUNDUP function.
In the ROUNDUP, you can use the same formula in the number argument and 0 in the num_digit.