Excel formulas
NETWORKDAYS.INTL Friday–Saturday Weekend: Payroll Worked Example
In this article
- The scenario: May 2025 payroll for a Friday–Saturday office
- Step 1: Count the working days three ways
- Step 2: Understand why the holidays subtract different amounts
- Step 3: Calculate a pro-rata salary for a mid-month joiner
- Step 4: Set deadlines with WORKDAY.INTL
- Weekend codes and 7-digit strings at a glance
- Mistakes that give wrong counts or errors
- Adapting the sheet to your team
To count working days when the weekend is Friday and Saturday, use NETWORKDAYS.INTL with weekend code 7 or the string "0000110": =NETWORKDAYS.INTL(start_date, end_date, 7, holidays). Plain NETWORKDAYS cannot do this, because it always treats Saturday and Sunday as the weekend. Below, one payroll month (May 2025) is calculated three ways so you can see why the results differ.
The scenario: May 2025 payroll for a Friday–Saturday office
An HR officer needs the number of paid working days in May 2025 for staff on a Sunday-to-Thursday week. The company also has a three-day closure from 1 to 3 May (example dates; replace them with your official public-holiday calendar). Some site staff work six days and only rest on Sunday, so the sheet must handle both weeks.
Set up the sheet like this:
| Cell | Label | Value |
|---|---|---|
| B2 | Period start | 01-May-2025 (Thursday) |
| B3 | Period end | 31-May-2025 (Saturday) |
| E1 | Header | Holiday |
| E2 | Holiday 1 | 01-May-2025 (Thursday) |
| E3 | Holiday 2 | 02-May-2025 (Friday) |
| E4 | Holiday 3 | 03-May-2025 (Saturday) |
Enter the dates as real dates, for example =DATE(2025,5,1) in B2 and =DATE(2025,5,31) in B3. Microsoft recommends entering dates with the DATE function or as results of other formulas, not as typed text. Then select E2:E4 and type Holidays in the Name Box to create a named range. That is the whole sample sheet: two date cells, three holiday cells and one name. Every formula in the tables below can be pasted straight into it to reproduce the results.
Step 1: Count the working days three ways
May 2025 has 31 days. Because it starts on a Thursday, it contains five Thursdays, five Fridays and five Saturdays, and four of every other weekday. That explains every number below.
| Weekend | Formula | No holidays | With 1–3 May holidays |
|---|---|---|---|
| Friday–Saturday (code) | =NETWORKDAYS.INTL($B$2,$B$3,7) | 21 | 20 |
| Friday–Saturday (string) | =NETWORKDAYS.INTL($B$2,$B$3,"0000110") | 21 | 20 |
| Sunday only (code 11) | =NETWORKDAYS.INTL($B$2,$B$3,11) | 27 | 24 |
| Saturday–Sunday (code 1, default) | =NETWORKDAYS.INTL($B$2,$B$3,1) | 22 | 20 |
For the "with holidays" column, add the holiday range as the fourth argument, for example =NETWORKDAYS.INTL($B$2,$B$3,7,$E$2:$E$4) or =NETWORKDAYS.INTL($B$2,$B$3,7,Holidays).
Where the numbers come from
- Code 7 / "0000110": 31 days − 5 Fridays − 5 Saturdays = 21.
- Code 11: 31 days − 4 Sundays = 27.
- Code 1: 31 days − 5 Saturdays − 4 Sundays = 22.
Step 2: Understand why the holidays subtract different amounts
A holiday that already falls on a weekend day is not subtracted twice. The function removes a holiday only if that date would otherwise be a working day.
| Weekend | Thu 1 May | Fri 2 May | Sat 3 May | Days removed | Result |
|---|---|---|---|---|---|
| Fri–Sat (7) | Removed | Already weekend | Already weekend | 1 | 21 − 1 = 20 |
| Sunday only (11) | Removed | Removed | Removed | 3 | 27 − 3 = 24 |
| Sat–Sun (1) | Removed | Removed | Already weekend | 2 | 22 − 2 = 20 |
This matters when you audit a payroll sheet by hand. If you calculate "working days minus number of holidays", you get 21 − 3 = 18 for the Friday–Saturday team, which is wrong. The formula is right; the manual shortcut is not.
Step 3: Calculate a pro-rata salary for a mid-month joiner
An employee on a Friday–Saturday weekend joins on Thursday 15 May 2025 with a monthly salary of 6,000. If your policy pays by working days:
=ROUND(6000*NETWORKDAYS.INTL(DATE(2025,5,15),$B$3,7,Holidays)/NETWORKDAYS.INTL($B$2,$B$3,7,Holidays),2)From 15 to 31 May there are 17 calendar days, including three Fridays and three Saturdays, so 11 working days. The month has 20 working days after holidays, so the result is 6000 × 11 / 20 = 3,300.00. Both the start and end dates are counted when they are working days, so 15 May is paid. Some contracts pro-rate by calendar days or by a fixed 30-day month instead; follow your labour law and contract, not the formula's default.
Step 4: Set deadlines with WORKDAY.INTL
WORKDAY.INTL works the other way: you give a start date and a number of working days, and it returns the end date. The start date itself is not counted. Format the result cell as a date (Ctrl+1 → Date), otherwise you see a serial number such as 45792.
| Goal | Formula | Result |
|---|---|---|
| 10 working days after 1 May, Fri–Sat weekend | =WORKDAY.INTL($B$2,10,7) | Thu 15 May 2025 |
| Same, with holidays | =WORKDAY.INTL($B$2,10,7,Holidays) | Thu 15 May 2025 |
| 10 working days after 1 May, Sunday-only weekend | =WORKDAY.INTL($B$2,10,11) | Tue 13 May 2025 |
| Same, with holidays | =WORKDAY.INTL($B$2,10,11,Holidays) | Thu 15 May 2025 |
The holidays do not move the Friday–Saturday deadline: 1 May is the start date (not counted) and 2–3 May are already weekend days. For the six-day week, 2 and 3 May are working days, so removing them pushes the deadline two working days later. Use a negative number of days, such as =WORKDAY.INTL($B$2,-5,7), to count backwards (for example, "submit timesheets 5 working days before").
Weekend codes and 7-digit strings at a glance
| Weekend | Code | String (Mon→Sun) |
|---|---|---|
| Saturday, Sunday | 1 or omitted | "0000011" |
| Thursday, Friday | 6 | "0001100" |
| Friday, Saturday | 7 | "0000110" |
| Sunday only | 11 | "0000001" |
| Friday only | 16 | "0000100" |
| Saturday only | 17 | "0000010" |
The full set: codes 1–7 are two-day weekends (2 = Sun–Mon, 3 = Mon–Tue, 4 = Tue–Wed, 5 = Wed–Thu), and 11–17 are single days from Sunday (11) through Saturday (17). The string always starts on Monday; 1 means a day off and 0 a working day. Strings cover patterns codes cannot, such as Friday plus Sunday off: "0000101".
Mistakes that give wrong counts or errors
- Using plain NETWORKDAYS. It always uses a Saturday–Sunday weekend. For May 2025 it returns 22 instead of 21, with no warning.
- Reading the string from Sunday.
"1000001"looks like "weekend at the ends" but means Monday and Sunday off. It returns a count, just the wrong one. - Code 6 instead of 7. Code 6 is Thursday–Friday, the older Gulf weekend. Again, a silent wrong count.
- Forgetting the quotes in a formula. Typing
0000110without quotes turns it into the number 110, which is not a valid code, so you get an error. Inside a formula, always write"0000110". - Wrong-length string.
"000011"(six characters) or a string with a trailing space is invalid. Microsoft documents a#VALUE!error for invalid strings; at least this one is visible. - Weekend argument 0 or "1111111". A weekend of 0 returns
#NUM!, and Microsoft lists "1111111" (every day off) as invalid. - Text dates. A date typed as text, or typed in the wrong order for your regional settings, can be misread. For example, "05/01/2025" is 1 May on a month/day/year system but 5 January on a day/month/year system. Test each date cell with
=ISNUMBER(B2): real dates return TRUE. Rebuild bad ones withDATE(year,month,day). - Holiday range problems. Select only the date cells (E2:E4), not the header. Compare
=COUNT(Holidays)with=COUNTA(Holidays): if the numbers differ, some holidays are text and will not be handled as dates.
Adapting the sheet to your team
- Several weekend patterns in one sheet: put each employee's code or string in a column and use
=NETWORKDAYS.INTL($B$2,$B$3,C5,Holidays). Numeric codes such as 7 can be typed normally. Weekend strings need care: type'0000001with a leading apostrophe, or format the column as Text before typing. Do not type the quote marks inside the cell, because they become part of the text and the string is no longer valid. - Watch out for this one: if you type
0000001into a General-formatted cell, Excel stores it as the number 1, which is the Saturday–Sunday weekend code. The formula returns a normal-looking count (22 for May instead of 27), with no error. Check with=ISTEXT(C6): a string cell should return TRUE. - Weekend days instead of working days:
=($B$3-$B$2+1)-NETWORKDAYS.INTL($B$2,$B$3,7)returns 31 − 21 = 10. - Growing holiday list: convert the holiday range to an Excel Table and refer to its column, for example
Holidays[Date], so new rows are included automatically. - Salary in words: if your payslips need the amount spelled out, see converting numbers to words in Indian rupees without a macro.
These formulas behave the same in current versions of Microsoft Excel and in Microads Office Excel, a free spreadsheet for Windows 10 and 11 (64-bit) that needs no account and whose 502 functions cover the Excel 365 date and time category; the .xlsx file opens in either. If you would rather describe the rule in plain English ("working days in May, Friday–Saturday weekend, holidays in E2:E4") and get the formula back, try the free AI Excel formula generator, or run a model on your own PC as shown in using Ollama with Excel offline.
Official references: Microsoft's NETWORKDAYS.INTL and WORKDAY.INTL pages.

Frequently asked questions
What happens if the start date is later than the end date?
The function returns a negative number of working days. For example, swapping B2 and B3 in the Friday–Saturday example returns -21 instead of 21.
How do I count working days for a six-day week with only Friday off?
Use weekend code 16 or the string "0000100", for example =NETWORKDAYS.INTL(B2,B3,16,Holidays). Only Fridays and the listed holidays are excluded.
Do I need to remove holidays that fall on the weekend from my list?
No. A holiday on a weekend day is ignored automatically, so you can keep one full public-holiday list and use it for teams with different weekends.
Does NETWORKDAYS.INTL work in Google Sheets?
Google Sheets also has NETWORKDAYS.INTL and WORKDAY.INTL with the same argument order, so the formulas in this example can be reused there. Check the results against the tables above after importing the sheet.
Microads Office is a free Word, Excel and PDF suite for Windows built by Microads Technology Co., Ltd. (Ho Chi Minh City, Vietnam) and open source under GPL-3.0. Articles are written by the Microads Office team with AI assistance and checked against the software’s real features. Source code · Download
Use Ollama with Excel Locally: Free Offline AI for Formulas
Word Table of Contents Not Updating Headings? 6 Fixes
Sign a PDF with a .pfx File for Free (and Keep It Safe)