MicroadsMICROADS Office

Excel formulas

NETWORKDAYS.INTL Friday–Saturday Weekend: Payroll Worked Example

NETWORKDAYS.INTL Friday–Saturday Weekend: Payroll Worked Example
In this article
  1. The scenario: May 2025 payroll for a Friday–Saturday office
  2. Step 1: Count the working days three ways
  3. Step 2: Understand why the holidays subtract different amounts
  4. Step 3: Calculate a pro-rata salary for a mid-month joiner
  5. Step 4: Set deadlines with WORKDAY.INTL
  6. Weekend codes and 7-digit strings at a glance
  7. Mistakes that give wrong counts or errors
  8. 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:

CellLabelValue
B2Period start01-May-2025 (Thursday)
B3Period end31-May-2025 (Saturday)
E1HeaderHoliday
E2Holiday 101-May-2025 (Thursday)
E3Holiday 202-May-2025 (Friday)
E4Holiday 303-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.

WeekendFormulaNo holidaysWith 1–3 May holidays
Friday–Saturday (code)=NETWORKDAYS.INTL($B$2,$B$3,7)2120
Friday–Saturday (string)=NETWORKDAYS.INTL($B$2,$B$3,"0000110")2120
Sunday only (code 11)=NETWORKDAYS.INTL($B$2,$B$3,11)2724
Saturday–Sunday (code 1, default)=NETWORKDAYS.INTL($B$2,$B$3,1)2220

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.

WeekendThu 1 MayFri 2 MaySat 3 MayDays removedResult
Fri–Sat (7)RemovedAlready weekendAlready weekend121 − 1 = 20
Sunday only (11)RemovedRemovedRemoved327 − 3 = 24
Sat–Sun (1)RemovedRemovedAlready weekend222 − 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.

GoalFormulaResult
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

WeekendCodeString (Mon→Sun)
Saturday, Sunday1 or omitted"0000011"
Thursday, Friday6"0001100"
Friday, Saturday7"0000110"
Sunday only11"0000001"
Friday only16"0000100"
Saturday only17"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

  1. Using plain NETWORKDAYS. It always uses a Saturday–Sunday weekend. For May 2025 it returns 22 instead of 21, with no warning.
  2. 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.
  3. Code 6 instead of 7. Code 6 is Thursday–Friday, the older Gulf weekend. Again, a silent wrong count.
  4. Forgetting the quotes in a formula. Typing 0000110 without quotes turns it into the number 110, which is not a valid code, so you get an error. Inside a formula, always write "0000110".
  5. 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.
  6. Weekend argument 0 or "1111111". A weekend of 0 returns #NUM!, and Microsoft lists "1111111" (every day off) as invalid.
  7. 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 with DATE(year,month,day).
  8. 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 '0000001 with 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 0000001 into 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.

Microads Office Excel with a revenue table, a column chart and the AI assistant explaining a formula (Vietnamese interface)
Microads Office Excel with a revenue table, a column chart and the AI assistant explaining a formula (Vietnamese interface)

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.

About Microads Office

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

Before you download

Microads Office is free, safe and contains no viruses. Because it is a newly released app with few downloads so far, your browser and Windows do not “know” it yet and may show a warning. You can safely continue:

  1. Chrome blocks the download (“this file isn’t commonly downloaded”): press Ctrl+J → click ⋮ next to the file → Download suspicious file. In Edge: click … → Keep.
  2. While installing, Windows shows a blue screen “Windows protected your PC”: click More info → Run anyway.

Prefer no warnings? Get it from Microsoft Store.

Continue download