Working days in a year
The working days in a year calculator takes one explicit ISO date, identifies its calendar year, and counts every Monday through Friday in that year.
Run — free
Add an optional list of holiday dates to remove weekday holidays from the result without subtracting the same date twice or counting a holiday that already falls on a weekend. The calculation uses fixed Gregorian calendar rules and deterministic arithmetic, so the same input always produces the same result in every time zone.
Choose the year with an explicit date
Enter a date in the exact YYYY-MM-DD ISO format. The complete date is required even though the calculation uses its year, because an explicit date keeps API requests unambiguous and avoids assumptions about the current year, account locale, or server clock. For example, 2024-07-25 selects the whole 2024 calendar year, from January 1 through December 31; it does not start counting on July 25. The result reports the submitted date, selected year, number of calendar days, weekend days, weekday holidays, and final workday count. Years from 0001 through 9999 follow the proleptic Gregorian calendar, including the familiar leap-year rule: a year divisible by four is a leap year unless it is divisible by one hundred, except that years divisible by four hundred remain leap years. Invalid calendar dates such as 2025-02-29 are rejected instead of being silently normalized. This makes the calculator suitable for reproducible schedules, audits, tests, and stored business rules where an implicit current date would make an old request change meaning later.
Exclude weekends and optional holidays correctly
Every Saturday and Sunday in the selected year is excluded first. You may then provide holiday dates as an array of ISO strings. A holiday reduces the workday total only when it belongs to the selected year and falls from Monday through Friday. A Saturday or Sunday holiday is already excluded as a weekend, so it does not reduce the total again. Repeated holiday dates are deduplicated for the same reason. Valid holidays from another year are accepted but ignored, which makes it safe to send a shared multi-year holiday list without filtering it before each request. The tool does not invent public holidays, substitute observance dates, or infer a country from your location. Those rules differ among jurisdictions, employers, collective agreements, and years. Supply the exact closure dates that apply to your organization. If a holiday observed on Monday replaces one that occurred on Sunday, include the observed Monday date. This explicit approach makes the count transparent: weekend days and effective weekday holidays are reported separately, so you can explain precisely how the final number was obtained.
Use a deterministic count in planning and automation
The calculation performs pure integer calendar arithmetic. It does not call a network service, read the current clock, use the JavaScript Date object, apply daylight-saving transitions, or inspect the machine's locale. In practical terms, UTC is the stable interpretation: an input such as 2026-01-01 remains that calendar date regardless of whether a request runs in Tokyo, London, or California. This is valuable when a workday total feeds annual capacity plans, staffing models, utilization targets, service-level forecasts, or payroll estimates. Store the input date and holiday list alongside the returned breakdown, and you have an auditable snapshot that can be recomputed later. Remember that the result is a count of potential Monday-to-Friday working dates, not the hours worked by a particular employee. It does not account for vacation, part-time schedules, shutdowns omitted from the holiday list, regional weekends other than Saturday and Sunday, or half-day closures. Run it in the browser for an interactive check, or call the API for $0.002 when the same rule belongs in a repeatable workflow.
What you can do with it
Build an annual capacity plan
Start with the year's available weekdays, remove your actual closure dates, and multiply the transparent result by daily team capacity.
Check payroll and utilization assumptions
Compare a model's assumed working-day total with a deterministic breakdown of weekends and effective weekday holidays.
Make forecasts reproducible
Save the date and holiday list with a forecast so future runs use the same calendar rules rather than the current clock.
FAQ
Does the date start the counting period?
No. The date selects its entire calendar year; every day from January 1 through December 31 is considered.
Which days count as weekends?
Saturday and Sunday are weekends. Other weekly rest-day patterns are not inferred.
What happens when a holiday falls on a weekend?
It is not subtracted again. The date is already included in the weekend-day count.
Does the calculator know national holidays?
No. Provide the exact holiday or closure dates that apply to your organization and jurisdiction.
What does an API request cost?
An API request costs $0.002. The same deterministic calculation is also available free in your browser.
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/workdays-in-year \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2024-07-25"}'const res = await fetch("https://api.kit.forhosting.com/date/workdays-in-year", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"date": "2024-07-25"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/date/workdays-in-year",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"date": "2024-07-25"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/date/workdays-in-year", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"date":"2024-07-25"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"date":"2024-07-25"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/date/workdays-in-year", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"date": "2024-07-25"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "date.workdays_in_year",
"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.
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. |