Yes, Excel can calculate the number of weeks between two dates, and the core formula is simple: =INT((end_date - start_date)/7). This gives you the number of complete weeks. If you need partial weeks (e.g., 2.5 weeks), remove the INT function. Before you start, make sure your dates are entered as real Excel dates (not text) and are formatted as dates in the cells.
What You'll Need
- Microsoft Excel (any recent version – 2016, 2019, 365, or online) installed on your computer or accessed via browser.
- Two cells containing dates – for example, A1 (start date) and B1 (end date).
- Basic familiarity with typing formulas into a cell (click a cell, type =, then the formula).
Step-by-Step
- Verify your dates are real dates. Click on the cell with your start date. In the Home tab, look at the Number Format dropdown. If it says "Date" (or shows a date format like 14-Mar-2021), you're good. If it says "General" or "Text", Excel may not treat it as a date. To fix, select the cell, press Ctrl+1, choose "Date" under Category, and pick a format.
- Decide what kind of week count you need. Do you want the number of complete weeks (e.g., 3 full weeks) or the total duration in weeks including partial days (e.g., 3.4 weeks)? This determines which formula you use.
- For complete weeks, use =INT((B1-A1)/7). Type this into an empty cell (say C1) and press Enter. Excel subtracts the start date from the end date to get the number of days, divides by 7 to get weeks, and INT chops off the decimal, leaving only whole weeks. For example, if A1 is 1-Jan-2024 and B1 is 22-Jan-2024, the difference is 21 days, divided by 7 = 3, so the result is 3.
- For fractional weeks, use =(B1-A1)/7. This returns the exact number of weeks, including partial weeks. With the same dates, it gives 3.0, but if B1 were 23-Jan-2024, it would give 3.14 (22 days / 7).
- For weeks rounded up (ceilings), use =ROUNDUP((B1-A1)/7,0). This is useful when you need to count every started week (e.g., billing for partial weeks). If the difference is 22 days, 22/7 = 3.14, ROUNDUP gives 4.
- For weeks rounded to the nearest whole number, use =ROUND((B1-A1)/7,0). This rounds 3.14 down to 3, but 3.5 would round up to 4.
- If you want to exclude weekends or count only weekdays, use =NETWORKDAYS(A1,B1)/7. This counts Monday-to-Friday days between the two dates (inclusive of both dates) and divides by 7. Note that this gives a fractional number; to get whole work weeks, wrap with INT: =INT(NETWORKDAYS(A1,B1)/7).
- For weeks between dates including both start and end days as full days, add 1 to the day difference. Some people expect that from 1-Jan to 8-Jan is 2 weeks (because both days count). The formula =INT((B1-A1+1)/7) does that. Use this only if your business logic counts both endpoints.
- If you want the result as text like "3 weeks", use =INT((B1-A1)/7)&" weeks". The ampersand joins the number with the word. For plural handling, you can use =INT((B1-A1)/7)&" week"&IF(INT((B1-A1)/7)=1,"","s").
- If your dates are in different rows or columns, adjust the cell references. For example, if start is in A2 and end is in B2, use =INT((B2-A2)/7). You can drag the fill handle (small square at the bottom-right of the cell) down to copy the formula to other rows.
Common Mistakes
- Using text that looks like dates. If you type "January 1, 2024" as text, Excel won't subtract it. Always use DATE(2024,1,1) or type 01/01/2024 and let Excel convert it.
- Forgetting to reverse the order. The formula subtracts start from end. If you type =INT((A1-B1)/7), you'll get a negative number (or an error if the start is after the end).
- Using INT on a negative number. If your end date is before your start date, INT rounds away from zero, so INT(-3.14) gives -4. That may not be what you expect. Use MAX(0, INT((B1-A1)/7)) to force a zero for negative differences.
- Dividing by 7 but expecting calendar weeks. Excel doesn't know about calendar weeks (like ISO weeks). The formula just divides days by 7. If you need weeks starting on a specific day (e.g., Monday), you need a more complex formula using WEEKNUM.
- Not formatting the result cell. If the result cell is formatted as a date, Excel will show a weird date like 01/03/1900 instead of a number. Right-click the cell, Format Cells, and choose General or Number.
Tips
- Use cell references instead of hard-coded dates. That way, if you change the start or end date, the formula updates automatically.
- For ISO week numbers (week 1 starts on the first Monday of the year), use =WEEKNUM(end_date,21)-WEEKNUM(start_date,21). The 21 tells Excel to use the ISO week system (Monday-based). This gives the difference in week numbers, which is not the same as the number of weeks between dates – it counts the week numbers of each date. For example, from 1-Jan-2024 (week 1) to 8-Jan-2024 (week 2) gives 1, but the actual days are 7, so 1 week. This works only if both dates are in the same year.
- For weeks between dates in different years, use =INT((DATE(YEAR(B1),MONTH(B1),DAY(B1))-DATE(YEAR(A1),MONTH(A1),DAY(A1)))/7). That's the same as the basic formula, but it's clearer if you want to see the date parts.
- If you need to count only full weeks that fall entirely within the period, use =INT(NETWORKDAYS(A1,B1)/7). This counts weekdays only, so a period from Monday to Friday gives 5 weekdays, divided by 7 = 0.71, INT gives 0 – correct if you want only complete Monday-to-Sunday weeks.
- Use the DATEDIF function for a different approach. =DATEDIF(A1,B1,"d")/7 gives the same fractional weeks as =(B1-A1)/7. DATEDIF is hidden but still works for days, months, and years.
Troubleshooting
If the formula returns a #VALUE! error: This usually means one of the cells is not a valid date. Check that both cells contain dates, not text. Select each cell, press Ctrl+1, and see if the format is Date. If it's Text, re-enter the date by typing it as a date (e.g., 01/01/2024) or use =DATEVALUE("01/01/2024") in a helper cell.
If the result is a date (like 01/00/1900): The cell is formatted as a date. Right-click the cell, choose Format Cells, select General or Number, and set decimal places to 0 if you want whole weeks.
If the result is negative: Your start date is after your end date. Swap the references or use =ABS(INT((B1-A1)/7)) to get the absolute number of weeks.
If the result seems off by one week: Check whether you want inclusive counting (both start and end days counted) or exclusive. The basic formula excludes the start day and includes the end day. For example, from Monday to next Monday is 7 days, which gives 1 week. If you expect 2 weeks because you count both Mondays, add 1 to the day difference before dividing.
If you get a decimal like 3.14 and you want 3: Use INT or ROUNDDOWN. If you want 4, use ROUNDUP.
Frequently Asked Questions
How do I calculate weeks between two dates in Excel including the start and end dates?
Use =INT((B1-A1+1)/7). This adds 1 to the day difference to count both endpoints. For example, from 1-Jan to 8-Jan, the day difference is 7, plus 1 = 8 days, divided by 7 = 1.14, INT gives 1 week. If you want 2 weeks, you'd need to count both Mondays as full weeks, which is not standard.
Can I calculate weeks between dates using the WEEKNUM function?
Yes, but it's not the same as the number of weeks. =WEEKNUM(B1,21)-WEEKNUM(A1,21) gives the difference in week numbers (e.g., week 5 minus week 2 = 3). That works only if both dates are in the same year. For cross-year, you'd need to add 52 for each year difference, which gets messy. Stick to the day-difference method for actual weeks.
How do I count only full weeks that are Monday to Sunday?
Use =INT(NETWORKDAYS(A1,B1)/7). This counts weekdays (Mon-Fri) and divides by 7. For a period from Monday to the following Sunday, NETWORKDAYS gives 6 (Mon-Fri), divided by 7 = 0.86, INT gives 0. That's because the period doesn't include a full Monday-Sunday week. To count full calendar weeks (Mon-Sun), you'd need to check the start day and adjust, which is more complex.
Why does my formula return 0 for dates that are 6 days apart?
Because 6 days divided by 7 = 0.857, and INT truncates to 0. That's correct for complete weeks. If you want to count any part of a week as 1, use =ROUNDUP((B1-A1)/7,0).
How do I show the result as "X weeks and Y days"?
Use =INT((B1-A1)/7)&" weeks and "&MOD(B1-A1,7)&" days". MOD gives the remainder after dividing by 7. For example, 10 days gives 1 week and 3 days.
Does the formula account for leap years?
Yes, because Excel stores dates as serial numbers that include leap days. The difference in days automatically includes February 29 when applicable. No extra adjustment needed.