Business days until a date
From Friday 3 July to Friday 10 July 2026, 4 business days remain when Monday 6 July is a holiday. Enter a starting date, a target date and your own closures to see the working days left. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Reference date
- 2026-07-03
- Target date
- 2026-07-10
- Holidays
- 2026-07-06, 2026-07-06, 2026-07-04
- Business days
- 4
- Calendar days
- 7
- Excluded holidays
- 1
This business-days-until-date calculator measures the working time separating an explicit reference date from an explicit target date. It skips Saturdays and Sundays, removes any weekday holidays you provide, and never depends on the current day or the machine's local timezone. The reference date is excluded and the target date is included, matching the common question of how many working days remain after a known checkpoint. Earlier targets produce negative counts, so the same response can describe deadlines ahead or milestones already passed.
Set a fixed reference point and a target
The calculation deliberately excludes the reference date and includes the target date. If Friday is the reference and the following Monday is the target, the result is one business day because work remaining after Friday consists of Monday. Identical dates return zero.
This half-open convention prevents a completed reference day from being counted again and makes the result useful for countdowns, planning checkpoints, and reports generated from archived data. Inputs are validated rather than silently normalized. Because both dates are explicit, rerunning an old request never changes merely because today has advanced.
Store both inputs with the result whenever an audit must reproduce the original calculation exactly.
Exclude weekends and the holidays that actually apply
Saturday and Sunday are always treated as non-business days. Use the optional holidays array for additional closures that apply to your organization, market, contract, or project. Each entry must use the same strict ISO date format.
The calculator does not download a national calendar, guess a region, or infer substitute observance days, because those choices can differ between jurisdictions and employers and may change over time. Instead, you supply the exact dates governed by the policy you need to apply. Duplicate holiday entries are deduplicated.
For recurring calculations, version that set alongside your operational policy. When a holiday is officially observed on a different weekday, provide the observed weekday rather than assuming the calendar date of the celebration is enough.
Rely on deterministic UTC calendar arithmetic
The solver operates entirely on Gregorian year, month, and day integers. It does not construct JavaScript Date values, read the system clock, inspect a timezone, call a network service, or use randomness. This matters around daylight-saving transitions, where timestamp-based approaches can encounter days that are twenty-three or twenty-five hours long and accidentally shift a calendar boundary.
The browser execution uses the same pure solver.
What you can do with it
Track a delivery deadline
Measure working days remaining from a recorded project checkpoint to a contractual delivery date, using the closures that apply to the team.
Reproduce an SLA calculation
Store explicit dates and holidays with a ticket so the signed business-day result can be recalculated during a later audit.
Check a payroll or finance cutoff
Count operational weekdays until a filing, settlement, or payroll target without allowing local timezone settings to move a boundary.
FAQ
Are public holidays loaded automatically?
No. Supply the exact holiday or observed-closure dates that apply to your policy so the calculation remains explicit and reproducible.
How are duplicate or weekend holidays handled?
Duplicates are removed, and weekend holidays do not subtract again because Saturdays and Sundays are already excluded.
Can timezone or daylight-saving changes affect the answer?
No. The solver uses pure Gregorian integer arithmetic with UTC semantics and never reads a local timezone or clock.
Is the starting date counted?
No. The starting date is left out and the target date counts, because the question is how much work remains after a known day. From a Friday to the next Monday the answer is 1, and two identical dates give 0.
What if the target date is already in the past?
You get a negative number of business days. Swapping the two dates only changes the sign, so the same calculation can describe deadlines ahead and milestones already passed.
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/business-days-until-date \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"reference_date":"2026-07-03","target_date":"2026-07-10"}'const res = await fetch("https://api.kit.forhosting.com/date/business-days-until-date", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"reference_date": "2026-07-03",
"target_date": "2026-07-10"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/date/business-days-until-date",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"reference_date": "2026-07-03",
"target_date": "2026-07-10"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/date/business-days-until-date", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"reference_date":"2026-07-03","target_date":"2026-07-10"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"reference_date":"2026-07-03","target_date":"2026-07-10"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/date/business-days-until-date", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"reference_date": "2026-07-03",
"target_date": "2026-07-10"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "date.business_days_until_date",
"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
Set a fixed reference point and a target
Provide reference_date and target_date as complete calendar dates in strict YYYY-MM-DD form. Direction is preserved: when the target precedes the reference, business_days and calendar_days are negative. Swapping the same two endpoints therefore changes the sign while preserving the magnitude. Missing zero padding, timestamps, impossible dates such as February 30, and years outside 0001 through 9999 produce an invalid_input error.
Exclude weekends and the holidays that actually apply
A holiday on a weekend does not subtract twice, and a holiday outside the counted interval has no effect. excluded_holidays reports only unique supplied dates that removed an otherwise countable weekday. This makes the result explainable: the difference between the weekday-only count and business_days can be traced directly to the effective holiday set.
Rely on deterministic UTC calendar arithmetic
Here, an ISO date represents that calendar date directly, with UTC semantics, so the same input produces the same JSON in a browser, an edge worker, or a test process in another country. The response includes business_days as the signed primary result, calendar_days as a signed check on the number of dates after the reference through the target, and excluded_holidays as an unsigned audit count. One complete calculation is billed as one item, and an API request costs $0.002.
Technical questions
Is the reference date counted?
No. The interval excludes reference_date and includes target_date, which represents the business time remaining after the reference checkpoint.
What happens when the target date is earlier?
business_days and calendar_days become negative. Their magnitudes match the same interval with the endpoints swapped.
What does an API request cost?
A successful API calculation costs $0.002. The same deterministic solver is also available in the browser.