The fastest way to calculate weeks in Excel is to subtract the start date from the end date and divide by 7. With the start date in A2 and the end date in B2, type =(B2-A2)/7 in another cell and press Enter. You get the number of weeks as a decimal, such as 6.43. Wrap it in INT, as in =INT((B2-A2)/7), if you only want full weeks.
This guide covers every common way to count weeks: decimal weeks, whole weeks, weeks plus leftover days, work weeks, week numbers (including ISO weeks), and adding weeks to a date. It also explains how to fix results that show up as a date or an error.
Why subtracting dates works
Excel stores every date as a serial number. January 1, 1900 is serial number 1, and each day after that adds 1. So when you subtract one date from another, Excel returns the number of days between them. Divide that by 7 and you have weeks.
Before you start, make sure both cells hold real dates, not text that looks like a date. A quick test: real dates line up on the right of the cell by default, while text lines up on the left. Microsoft notes that problems can occur if dates are entered as text, and text that Excel can’t read as a date gives a #VALUE! error. How you type a date (for example 3/9/2026 or 9/3/2026) depends on your computer’s regional settings.
Which formula do you need?
| You want | Formula (start in A2, end in B2) | Example result |
|---|---|---|
| Exact weeks, with decimals | =(B2-A2)/7 | 6.43 |
| Full weeks only | =INT((B2-A2)/7) | 6 |
| Any partial week counts as a week | =ROUNDUP((B2-A2)/7,0) | 7 |
| Weeks and leftover days | =INT((B2-A2)/7)&" weeks "&MOD(B2-A2,7)&" days" | 6 weeks 3 days |
| Work weeks (Monday to Friday) | =NETWORKDAYS(A2,B2)/5 | Varies |
| Week number of one date | =WEEKNUM(A2,2) or =ISOWEEKNUM(A2) | 1 to 54 (ISOWEEKNUM: 1 to 53) |
| A date a number of weeks later | =A2+7*B2 | A date |
The example results use a 45-day gap between the two dates.
Method 1: Calculate weeks between two dates (decimal)
- Type the start date in A2 and the end date in B2.
- Click C2 and type
=(B2-A2)/7. - Press Enter.
- If the answer shows too many decimal places, press Ctrl + 1, choose Number, and set Decimal places to 2.

You can also use the DATEDIF function, which Microsoft uses in its guide to calculating the difference between two dates. The formula is =DATEDIF(A2,B2,"d")/7. The "d" unit returns the number of days in the period, and dividing by 7 turns it into weeks. It gives the same answer as plain subtraction.
Two things to know about DATEDIF, from Microsoft’s DATEDIF function page:
- If the start date is later than the end date, the result is #NUM!. Plain subtraction gives a negative number instead.
- Microsoft warns that DATEDIF may calculate incorrect results in some scenarios, and it recommends against one of its other units for days. For weeks, stick with the
"d"unit, or just subtract.
To show the decimal result as a whole number instead, see how to round to the nearest whole number in Excel.
Method 2: Count full weeks only
Often you want whole weeks, such as “6 weeks”, not “6.43 weeks”. Use one of these:
=INT((B2-A2)/7)drops the decimal part and keeps the full weeks.=ROUNDDOWN((B2-A2)/7,0)does the same for positive results.=ROUNDUP((B2-A2)/7,0)counts any partial week as a full week. This is handy for billing or rental periods charged by the week.
If you need standard rounding (6.43 becomes 6, 6.57 becomes 7), use =ROUND((B2-A2)/7,0).
Should you include the end date?
Subtraction counts the days between two dates but not both ends. From Monday to the next Monday is 7 days, so 1 week. If your project runs from the start date through the end date and both days count, add 1 before dividing: =(B2-A2+1)/7. Pick one approach and use it everywhere in your sheet so the numbers stay consistent.
Method 3: Show weeks and remaining days
To show a result like “6 weeks 3 days”, combine INT and MOD in one formula:
=INT((B2-A2)/7)&" weeks "&MOD(B2-A2,7)&" days"

INT gives the full weeks. MOD gives what’s left over after dividing the days by 7. The ampersands join the numbers and the words into one line of text. Because the result is text, you can’t add it up or use it in other math. Keep a separate number column if you need totals.
Method 4: Calculate work weeks
To count weeks of working days instead of calendar days, use NETWORKDAYS and divide by 5:
- Click an empty cell and type
=NETWORKDAYS(A2,B2)/5. - Press Enter.
Microsoft’s NETWORKDAYS function page explains that it returns the number of whole working days between the two dates, leaving out weekends. It doesn’t skip public holidays unless you list them in the optional third argument, as in =NETWORKDAYS(A2,B2,E2:E10), where E2:E10 holds your holiday dates.
Different weekend days or a named holiday list
If your weekend isn’t Saturday and Sunday, use NETWORKDAYS.INTL. The third argument sets the weekend: 1 means Saturday and Sunday, and 2 means Sunday and Monday. For example, =NETWORKDAYS.INTL(A2,B2,2)/5.
To reuse a holiday list, give it a name:
- Select the cells that contain your holiday dates.
- Go to Formulas > Define Name.
- Type a name such as MyHolidays and click OK.
- Use the name in the formula:
=NETWORKDAYS.INTL(A2,B2,1,MyHolidays)/5.
Method 5: Find the week number of a date
Sometimes “calculate weeks” means “which week of the year is this?” Excel has two functions for that.
WEEKNUM
The formula =WEEKNUM(A2) returns the week number with weeks starting on Sunday. Add a second argument to change the start day. For example, =WEEKNUM(A2,2) starts weeks on Monday. According to Microsoft’s WEEKNUM function page, the main options are:
| Second argument | Week starts on | Week 1 is |
|---|---|---|
| 1 or left out | Sunday | The week containing January 1 |
| 2 | Monday | The week containing January 1 |
| 11 to 16 | Monday through Saturday | The week containing January 1 |
| 17 | Sunday | The week containing January 1 |
| 21 | Monday | The week containing the first Thursday (ISO 8601) |
Microsoft’s example: March 9, 2012 is week 10 with the default setting and week 11 with the second argument set to 2. Any value not in the list gives #NUM!.
ISOWEEKNUM
Many businesses, especially in Europe, use ISO week numbers. The simplest formula is =ISOWEEKNUM(A2), which Microsoft’s ISOWEEKNUM function page says returns the ISO week number of the year for a given date. It gives the same result as =WEEKNUM(A2,21) and is easier to read. Microsoft lists it for Excel 2016 and later, including Microsoft 365.
To build a label like 2026-W03, use =YEAR(A2)&"-W"&TEXT(ISOWEEKNUM(A2),"00"). Be careful around New Year: an early January date can belong to the last ISO week of the previous year, and a late December date can belong to week 1 of the next year. YEAR shows the calendar year, so check those dates by hand.
Calendar weeks between two dates
To find how many calendar weeks a period touches, subtract the week numbers and add 1: =WEEKNUM(B2,2)-WEEKNUM(A2,2)+1. This only works when both dates are in the same year, because week numbers start again at 1 every January. For spans across years, use Method 1 or 2.
Don’t use =WEEKNUM(B2-A2) to count weeks between dates. That treats the day count as a date in early 1900 and returns a week number for that date, not the weeks that have passed.
Method 6: Add or subtract weeks from a date
Since one week is 7 days, multiply the number of weeks by 7 and add it to the date. With a date in A2 and a number of weeks in B2:
- Type
=A2+7*B2in an empty cell. - Press Enter.
- To go back in time, put a negative number in B2, or use
=A2-7*B2.
This follows the days method in Microsoft’s guide to adding or subtracting dates. If the answer shows as a number such as 46100, press Ctrl + 1, choose Number > Date, and click OK.
Count weeks until or since today
Replace a fixed date with TODAY() to get a live count. For a deadline in B2, =(B2-TODAY())/7 shows the weeks left. For a start date in A2, =(TODAY()-A2)/7 shows the weeks that have passed. The result updates whenever you open the file on a different day.
For more ways to work with start and end dates, see our guide to calculating date ranges in Excel.
Common problems and fixes
- The result looks like a date. The cell picked up date formatting from the cells you referenced. Press Ctrl + 1 and choose General or Number.
- #VALUE! error. One of the dates is probably text. Retype it, or check that it lines up on the right of the cell.
- #NUM! error with DATEDIF. The start date is later than the end date. Swap the cells.
- A negative number. The dates are in the wrong order in a subtraction formula. Swap them, or wrap the formula in ABS, as in
=ABS(B2-A2)/7. - Work weeks look too high. NETWORKDAYS doesn’t know your holidays. Add a holiday range as the third argument.
- Week numbers don’t match your calendar. Check the second WEEKNUM argument, or switch to ISOWEEKNUM if your company uses ISO weeks.
Questions
Is there a WEEKS function in Excel?
No. Excel has a DAYS function, but no function that counts weeks between dates directly. Divide the days by 7 with =(B2-A2)/7 or =DAYS(B2,A2)/7.
How do I calculate weeks for a whole column of dates?
Enter the formula in the first row, such as =INT((B2-A2)/7) in C2. Then double-click the small square at the bottom right of the cell to fill the formula down to the last row of data.
Why do WEEKNUM and ISOWEEKNUM give different answers?
By default, WEEKNUM starts weeks on Sunday and counts the week with January 1 as week 1. ISOWEEKNUM starts weeks on Monday and counts the week with the first Thursday as week 1. Near the start and end of the year, the two can differ by a week.
Matt Williams is the writer and editor behind TechInfoHome. He holds a degree in computer science and has more than 10 years of experience working in IT. For the past 5 years he has written online tutorials for Windows, Microsoft Office, Google apps and iPhone, with a focus on clear steps that get readers to a working fix quickly.