Excel guide · 4 min read
How to count a specific weekday between two dates in Excel
=NETWORKDAYS.INTL(B2,C2,"0111111") counts the Mondays from B2 to C2, both dates included. The mask runs Monday to Sunday, and 0 means "count this day" while 1 means "skip it", so "1111101" counts Saturdays and "1010111" counts Tuesdays and Thursdays.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | H | I | J | K | L | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Booking | Start | End | Day | Closed days | Month | Day number | Rate per walk | ||||
| 2 | Monday yoga class | Nov 2, 2026 | Dec 21, 2026 | Mon | Nov 26, 2026 | Nov 1, 2026 | 2 | 18 | ||||
| 3 | Saturday market stall | Nov 7, 2026 | Dec 19, 2026 | Sat | Dec 21, 2026 | Dec 1, 2026 | ||||||
| 4 | Tue/Thu dog walks | Nov 3, 2026 | Nov 26, 2026 | Tue+Thu | Dec 25, 2026 | Feb 1, 2027 | ||||||
| 5 | Friday payroll | Jan 1, 2026 | Dec 31, 2026 | Fri | ||||||||
| 6 | Sunday brunch shifts | Nov 1, 2026 | Nov 30, 2026 | Sun |
Download this sheet as an Excel practice file (.xlsx)
NETWORKDAYS.INTL with a weekday mask
You run a Monday yoga class from 2 November to 21 December and need to know how many sessions to book the hall for. Counting squares on a calendar works once. A formula works every term.
NETWORKDAYS.INTL was built to count working days with a custom weekend, and the third argument can be a text mask instead of a weekend code. The mask has seven characters for Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday. A 1 marks a day off and a 0 marks a day to count. "0111111" turns every day except Monday into a day off, so all that is left to count is Mondays.
Both the start and the end date are counted when they land on the right day. 2 November and 21 December are both Mondays, and both are in the 8. If "between" should leave them out, move the ends in: =NETWORKDAYS.INTL(B2+1,C2-1,"0111111") returns 6. NETWORKDAYS.INTL works in Excel 2010 and later.
Result: 8
8 Mondays from 2 November to 21 December 2026, counting both ends.
Any other day, or two days at once
Move the 0 to the day you want. For the Saturday market stall from 7 November to 19 December, =NETWORKDAYS.INTL(B3,C3,"1111101") returns 7. For Sunday brunch shifts in November, "1111110" returns 5. Friday payroll dates in 2026 come out at 52 with "1111011".
Put a 0 on more than one day to count them together. The dog walker below goes out on Tuesdays and Thursdays, so the mask is "1010111", and 3 to 26 November gives 8 walks. With the rate in an input cell, the invoice line is one formula: =NETWORKDAYS.INTL(B4,C4,"1010111")*L2 returns 144 at the 18 typed in L2. Change L2 and the total follows.
Some years have 53 of one weekday. 2026 starts on a Thursday, so it has 53 Thursdays ("1110111") and 52 of every other day. That's the kind of detail that quietly breaks a "52 weeks x rate" budget.
Result: 8
8: four Tuesdays and four Thursdays between 3 and 26 November.
Leave out holidays and closed days
The fourth argument is a list of dates to skip. Put the closed days in a column (F2:F4 here) and point the formula at it. Only closed days that land on a counted weekday make a difference: 26 November is a Thursday, so the dog walks drop from 8 to 7 and the invoice from 144 to 126. 21 December is a Monday, so the yoga count drops from 8 to 7. 25 December is a Friday, so the 2026 payroll count drops from 52 to 51.
Keep the list on its own sheet or in a named range if several formulas share it, and type real dates. A closed day typed as text is ignored without any warning.
Result: 7
7 walks: Thursday 26 November is in the closed-days list, so it is not counted.
Count a weekday in a month
For "how many Mondays are in this month", start at the first of the month and end at EOMONTH(date,0), the last day. With 1 November 2026 in H2, =NETWORKDAYS.INTL(H2,EOMONTH(H2,0),"0111111") returns 5. December 2026 has 4 Mondays and February 2027 has 4.
In Excel 365, one formula fills the whole column: =NETWORKDAYS.INTL(H2:H4,EOMONTH(H2:H4,0),"0111111") spills 5, 4 and 4. A month with five Mondays is exactly where a "four sessions a month" plan comes up short, so it's worth a column in any class, rota or billing sheet.
Result: 5
5 Mondays in November 2026: the 2nd, 9th, 16th, 23rd and 30th.
The SEQUENCE way, and a formula for older Excel
In Excel 365 or 2021 you can also list every date and test each one. SEQUENCE(C2-B2+1,1,B2) makes the dates from B2 to C2, WEEKDAY turns them into day numbers (Sunday 1, Monday 2, through Saturday 7) and SUMPRODUCT counts the matches. With the day number in J2, the yoga count is again 8. This version is easy to extend: ={3,5} in place of =J2 counts Tuesdays and Thursdays, and multiplying by ISNA(MATCH(SEQUENCE(C2-B2+1,1,B2),F2:F4,0)) drops closed days, giving 7.
Before Excel 2010 there was no NETWORKDAYS.INTL. The classic formula is =INT((WEEKDAY(B2-J2)+C2-B2)/7), with J2 using the same 1 = Sunday numbering. It also returns 8 here. It is hard to read, so leave a note next to it if someone else will inherit the file.
Result: 8
8 again: the Mondays (day number 2) from 2 November to 21 December.
Common mistakes
Reading the mask backwards
In the mask, 1 means a day off and 0 means count it. "1000000" counts Tuesday to Sunday, not Mondays. Use "0111111" for Mondays.
Using a weekend number instead of a mask
Codes like 1 or 11 set which days are the weekend, so NETWORKDAYS.INTL(B2,C2,1) counts the 36 Monday-to-Friday days. To count one weekday you need the seven-character text mask.
A mask with the wrong length or a space
"0" or "0111111 " returns #VALUE!. The mask must be exactly seven 0s and 1s in quotes.
Start and end swapped
If the start date is after the end date the result is negative (-8 instead of 8). Check the order, or wrap the dates in MIN and MAX.
FAQ
How do I count the number of Mondays between two dates in Excel?
Use =NETWORKDAYS.INTL(start,end,"0111111"). The 0 in the first position keeps Monday and the six 1s skip the other days. Both dates are counted if they are Mondays.
How do I count Saturdays and Sundays between two dates?
Use the mask "1111100": =NETWORKDAYS.INTL(start,end,"1111100"). That counts both weekend days together. For Saturdays only, use "1111101".
How many Fridays are in a year?
52 or 53. =NETWORKDAYS.INTL(DATE(2026,1,1),DATE(2026,12,31),"1111011") returns 52 for 2026. A year has 53 of the weekday it starts on (and of the next day in a leap year), and 2026 has 53 Thursdays.
Does NETWORKDAYS.INTL count the start date?
Yes. Both the start and end dates are included when they fall on a counted day. Use start+1 or end-1 if you need to leave them out.
Functions used
NETWORKDAYS.INTLWeekdays between dates, custom weekendNETWORKDAYSWeekdays between datesEOMONTHLast day of a monthSEQUENCENumbered list, spillsWEEKDAYDay of the week as a numberSUMPRODUCTMultiply then addISNAIs it #N/A?MATCHPosition of a valueINTRounds down to integer
Related guides
- How to count workdays between two dates in Excel
- Check if a date is a weekend in Excel
- How to find the nth weekday of a month in Excel
- WORKDAY vs NETWORKDAYS: what is the difference?
- How to sum by day of the week in Excel
- How to list all dates between two dates in Excel
Updated