🗓️ Net Working Days (NETWORKDAYS)
Count workdays between two dates, excluding weekends & custom holidays
Non-Working Days (Weekends)
How NETWORKDAYS Really Works — And Why Getting It Right Matters
If you have ever tried to tell a client "the project will be done in 30 working days" and then fumbled through manually counting dates on a calendar, you already know the problem. Weekends blur into weekdays, public holidays get missed, and suddenly your deadline is off by a week. Excel's NETWORKDAYS function was invented precisely to solve this — but it hides a surprising amount of nuance beneath its simple surface.
The Core Logic: What NETWORKDAYS Actually Counts
The formula =NETWORKDAYS(start_date, end_date, [holidays]) returns the number of working days between two dates, inclusive of both the start and end date. That "inclusive" part trips people up constantly. If you ask Excel how many working days exist between a Monday and the following Friday, you get 5 — not 4. Both endpoints count.
The baseline assumption is that weekends are Saturday and Sunday. Every day that falls on those two weekdays is automatically excluded from the count. On top of that, you can pass in a third argument — a range of holiday dates — and those specific dates get subtracted too, but only when they fall on an otherwise-working weekday. If Christmas falls on a Sunday, it doesn't reduce your count any further because Sunday was already excluded.
This layered subtraction is the heart of the algorithm:
Net Working Days = Total Calendar Days − Weekend Days − Holidays (that fall on weekdays)
The implementation loops through every calendar date in the range, checks its day-of-week, checks whether it appears in the holiday list, and increments three separate counters. At the end, the non-weekend, non-holiday days are your answer. It sounds simple, but the details matter enormously at scale.
The Date Boundary Problem
One of the most common bugs in home-grown NETWORKDAYS implementations is off-by-one errors caused by timezone handling. JavaScript's new Date("2024-12-25") parses an ISO string as UTC midnight, which means in a browser running UTC−5, that date object actually represents 7 PM on December 24th locally. When you then call .getDay(), you might get Wednesday instead of Thursday.
The correct approach is to parse the year, month, and day components explicitly and pass them to new Date(year, month, day) — which uses the local timezone. This is what any robust implementation (including the tool above) must do. It seems like a minor detail until you're calculating payroll dates and your holiday exclusion silently shifts by one day.
Beyond the Standard Weekend: Custom Non-Working Days
Excel also ships a cousin function called NETWORKDAYS.INTL, which lets you define which days of the week count as non-working. Middle-Eastern countries often have Friday-Saturday weekends instead of Saturday-Sunday. Some religious communities observe a Saturday Sabbath. Four-day workweeks are increasingly common in progressive companies.
A truly flexible tool should let users pick which weekdays to exclude. The tool on this page offers Saturday, Sunday, and Friday checkboxes — covering the most common real-world configurations. The underlying algorithm is identical regardless of which days are checked: any day whose getDay() value appears in the "excluded weekday" set is simply not counted.
Holidays: The Variable That Breaks Every Assumption
The holiday argument is what separates a basic weekend-counter from a genuine business tool. Public holidays vary by:
- Country — US Thanksgiving is meaningless in Germany; Diwali matters in India but not in Brazil.
- State or region — US states have different public holidays; Indian states observe different regional festivals.
- Company policy — Many companies grant "floating holidays" or close between Christmas and New Year, which doesn't appear on any government calendar.
- Year — Because holidays like Easter are date-shifted each year, a holiday list from 2023 is wrong for 2024.
This is why the tool provides a free-text holiday input rather than a pre-loaded calendar. Pre-loading calendars locks you into one jurisdiction and one year. A blank textarea that accepts YYYY-MM-DD dates gives you total control. Paste in your country's official public holiday list, add your company's ad-hoc closures, and the formula handles the rest.
Where NETWORKDAYS Is Used in Practice
The function shows up in more places than you might expect:
Project management: Converting a "30 working-day" SLA into a concrete calendar date. If your contract says deliverables are due 20 business days after kickoff, you need to know whether November 20th lands before or after Thanksgiving.
Finance and HR: Payroll cycles, invoice payment terms ("Net 30 business days"), and employee notice periods in employment contracts are almost always expressed in working days. A mistake here can trigger penalty clauses or legal disputes.
Supply chain: Lead times from suppliers are quoted in working days. If a component takes 15 working days to arrive and you're placing the order on a Wednesday before a three-day holiday weekend, your effective delivery date shifts significantly.
Legal deadlines: Court filings, regulatory submissions, and statutory response periods often specify business days. Missing a deadline by even one day can have serious consequences, and "I forgot to account for the bank holiday" is not an accepted excuse.
Customer service SLAs: Support teams measure response times in business hours and days. Knowing the exact count helps determine whether a ticket was resolved within the contracted window.
Common Mistakes and How to Avoid Them
Forgetting the inclusive boundaries. If you subtract dates manually (end minus start), you get the number of days between them, not counting the start day. NETWORKDAYS counts both endpoints. Always verify with a known simple case: Monday to Friday should return 5, not 4.
Listing holidays that fall on weekends. If you include a Saturday holiday in your list, it has zero effect on the count because Saturday was already excluded. This isn't wrong — it's just redundant. But if you're building a holiday list from a government source, don't bother filtering these out manually; the algorithm handles the overlap correctly.
Using the wrong year's holiday list. New Year's Day 2023 was a Sunday, observed on Monday January 2nd. New Year's Day 2024 was a Monday — no observation shift needed. The actual date on the government's official holiday calendar changes year to year. Always fetch the current year's list.
Mixing date formats. A holiday list with entries like "25/12/2024", "Dec 25, 2024", and "2024-12-25" all mixed together is a parsing nightmare. Standardize on ISO 8601 (YYYY-MM-DD) and validate every entry before running the calculation.
The Reverse Problem: Finding the End Date from a Duration
NETWORKDAYS answers "how many working days between A and B?" But businesses frequently need the inverse: "given a start date and a 20-business-day duration, what is the end date?" Excel solves this with WORKDAY(start, days, [holidays]). The algorithm is the same logic run in reverse — step forward one calendar day at a time, skip non-working days, and decrement your counter until it hits zero. It's a useful complement to NETWORKDAYS and a natural next step for any business calculation toolkit.
Understanding NETWORKDAYS at this level — the inclusive counting, the timezone pitfalls, the holiday layering, the regional variability — turns what looks like a trivial formula into a genuinely powerful scheduling primitive. Whether you're running it in Excel, Google Sheets, or a browser tool, the math is the same. What changes is how carefully the implementation handles the edge cases.