Net working days between dates
From 1 to 10 July 2026 there are 7 working days once the weekend and a holiday on the 3rd are taken out. Count weekdays between two dates, both included, and remove your own closure days. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Start
- 2026-07-01
- End
- 2026-07-10
- Holidays
- 2026-07-03, 2026-07-04, 2026-07-03
- Net workdays
- 7
- Calendar days
- 10
- Excluded holidays
- 1
This net working days calculator counts Monday through Friday across two explicit ISO calendar dates and removes any weekday holidays you supply. Reverse the dates and the count becomes negative, while the magnitude follows the same calendar rules.
Define the interval and its direction precisely
Send start and end as real calendar dates in strict YYYY-MM-DD form. The interval is inclusive, so an ordinary Monday used for both start and end counts as one working day. A Friday-to-Monday interval counts Friday and Monday but skips Saturday and Sunday.
Direction comes entirely from the order of the inputs. When start is earlier than or equal to end, the result is positive or zero. When start is later than end, the calculator evaluates the same inclusive span and negates both day counts.
Swapping two dates therefore changes only the sign, never the magnitude. This behavior is especially useful for schedule variance, where an overdue interval and an early interval should point in opposite directions. Years from 0001 through 9999 are supported under the proleptic Gregorian calendar.
Exclude weekends and explicit holidays without ambiguity
Every Monday through Friday in the inclusive interval begins as a working day; every Saturday and Sunday is excluded automatically. The optional holidays array lets you remove organization-specific closure dates without relying on a country database that could change or choose the wrong region. A holiday outside the interval has no effect.
A holiday that falls on Saturday or Sunday has no additional effect because that date was already excluded. Duplicate holiday entries are deduplicated, so listing the same closure twice cannot reduce the result twice. Supply the exact observed dates used by your organization, including substitute days when applicable, because this capability deliberately does not infer legal calendars, religious observances, regional rules, or company shutdowns.
Use deterministic results in operational systems
The implementation performs integer arithmetic on Gregorian year, month, and day components. It never calls the JavaScript Date constructor, reads the system clock, asks for a timezone, accesses the network, or uses randomness. In practical terms, a request run in London, Tokyo, a browser, or an edge worker returns the same object.
That stability matters around daylight-saving changes, where timestamp-based approaches can accidentally create a twenty-three-hour or twenty-five-hour day and shift a loop across a calendar boundary. It also means historical results can be reproduced later from stored inputs alone. For recurring workflows, keep the holiday array beside the policy or calendar version that produced it, then store the inputs with the result.
This preserves an audit trail even if your organization changes its observed holidays next year. The free browser execution uses the same pure solver, making it suitable for checking examples before putting them into automated jobs.
What you can do with it
Measure SLA duration
Count signed working days from ticket opening to resolution while removing your support team's closure dates.
Audit delivery variance
Compare two milestone dates with a direction-preserving value that remains consistent when the dates are swapped.
Calculate finance windows
Count weekdays across an invoice or settlement interval and provide the exact bank holidays your process observes.
FAQ
Why can the result be negative?
If start is later than end, the inclusive count is negated. Swapping the dates preserves the magnitude and reverses the sign.
Does it load holidays for a country automatically?
No. Provide the exact holiday dates you want excluded, which avoids hidden regional assumptions and keeps results reproducible.
Does timezone or daylight saving time affect the answer?
No. The solver uses pure Gregorian calendar arithmetic with UTC semantics and never reads local timezone state or the system clock.
Are the start and end dates both counted?
Yes. The range is inclusive, so a Monday entered as both the first and the last date counts as one working day, and a Friday-to-Monday range counts two days while skipping the weekend.
What if a holiday falls on a weekend or is listed twice?
It changes nothing. A Saturday or Sunday is already left out, and a repeated holiday is removed only once, so in the July 2026 example the 4th and the doubled 3rd take away a single day.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/date/net-workdays-between \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"start":"2026-07-01","end":"2026-07-10"}'const res = await fetch("https://api.kit.forhosting.com/date/net-workdays-between", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"start": "2026-07-01",
"end": "2026-07-10"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/date/net-workdays-between",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"start": "2026-07-01",
"end": "2026-07-10"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/date/net-workdays-between", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"start":"2026-07-01","end":"2026-07-10"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"start":"2026-07-01","end":"2026-07-10"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/date/net-workdays-between", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"start": "2026-07-01",
"end": "2026-07-10"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "date.net_workdays_between",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_holidays | 10000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Both endpoints are included, making the result useful for auditable schedules, service targets, invoice windows, and staffing reports. The calculation uses pure Gregorian arithmetic rather than the host clock or local timezone, so identical inputs always produce identical results in the browser, API, tests, and UTC-based pipelines.
Define the interval and its direction precisely
This inclusive convention is stated in the response through signed calendar_days as well as net_workdays, which makes integrations easier to audit. Dates are validated rather than normalized: February 30, month 13, missing zero padding, timestamps, and locale-specific date strings produce invalid_input instead of a plausible but unintended answer.
Exclude weekends and explicit holidays without ambiguity
Each holiday must use the same strict ISO format as the endpoints. The response includes excluded_holidays, which counts only unique supplied holidays that actually removed a weekday inside the range. This makes it possible to explain why a result differs from a weekends-only calculation. Holiday treatment is symmetric when dates are reversed: the exclusion count remains an unsigned quantity, while net_workdays carries the interval direction.
Use deterministic results in operational systems
Use net_workdays for signed calculations such as planned-versus-actual delivery, calendar_days as a quick inclusive-span check, and excluded_holidays for traceability. The API price is $0.002 per request, with one complete date-range calculation treated as one item.
Technical questions
Are the start and end dates included?
Yes. Both endpoints belong to the interval and count when they are weekdays not listed as holidays.
How are duplicate or weekend holidays handled?
Duplicate dates are removed, and weekend holidays do not subtract again. excluded_holidays reports only unique weekday holidays inside the interval.
What does an API request cost?
A successful API request costs $0.002. The same deterministic calculation is also available free in the browser.