Workday Calculator
Calculate working days within a date range
Workday Calculation
What is a Workday Calculator?
A workday calculator counts how many usable working days fall inside a date range after weekends and a chosen number of holidays are removed. It is helpful for delivery estimates, leave planning, payroll checks, invoice cycles, hiring timelines, and project schedules where total calendar days are too broad. The important distinction is that a workday is not the same as a calendar day: Saturday/Sunday weekends, Friday/Saturday weekends, regional holidays, company shutdowns, and make-up workdays can all change the answer. This tool gives a quick planning estimate based on the weekend pattern and holiday count you enter. For HR, legal, or contract use, verify the result against the official calendar.
How to Use
How to use
- Enter start date and end date
- Select weekend exclusion option (Sat-Sun / Fri-Sat / None)
- Enter public holidays count (optional)
- Click 'Calculate workdays' to see results
Calendar Assumptions
- Set weekend rules before calculating; Friday-Saturday, Saturday-Sunday, and no-weekend calendars produce different totals.
- Public holidays and company shutdown days must be entered separately if they should be excluded.
Use Cases
Technical Principle
The workday count is the number of calendar days in the inclusive range `[start, end]` that are neither weekend days nor holidays. The standard inclusive-endpoint formula is `total_days = (end - start) / 86_400_000 + 1` when both bounds are normalised to midnight UTC, then weekend and holiday days are subtracted. Day-of-week comes from `Date.prototype.getDay()` which returns `0` for Sunday through `6` for Saturday — note the off-by-one trap that `getDay()` is not `getDate()` and that the result is in the browser's local timezone, so a UTC date string crossing midnight can land on a different weekday than expected. Weekend pattern varies by region: the global default is Saturday-Sunday (Western, India, most of Asia), but the Middle East historically used Thursday-Friday and as of 2024 most Gulf countries (UAE, Bahrain, Kuwait, Qatar) have aligned on Friday-Saturday or even Saturday-Sunday with a half-Friday. Iran, Afghanistan, and parts of South Asia still observe Friday only; Israel observes Friday-Saturday. The tool exposes Sat-Sun, Fri-Sat, and "none" as the three common presets, and lets the holiday count cover everything else by subtraction. The counting algorithm itself has two practical implementations. The naive iteration walks one day at a time: `for (let d = start; d <= end; d.setDate(d.getDate()+1)) if (![0,6].includes(d.getDay())) count++`. This is O(n) in calendar days and trivial to read. The closed-form alternative computes `full_weeks * 5 + partial_week_workdays` and runs in O(1), which matters for ranges spanning many years. Holidays that fall on weekends should not be double-subtracted, so the canonical pattern is to filter the holiday set with `holidays.filter(h => !isWeekend(h)).length`. China's 调休 (shifted workdays) policy adds a wrinkle that pure weekend-pattern logic cannot represent: the State Council annually publishes a list that converts specific Saturdays or Sundays into working days to compensate for extended Spring Festival or National Day breaks, so for Chinese calendars the holiday list must be paired with an explicit "makeup workday" list rather than relying on the day-of-week rule alone.
- Inclusive range formula: `total_days = (end - start) / 86_400_000 + 1` with both dates normalised to midnight UTC to avoid DST drift.
- `Date.prototype.getDay()` returns 0 (Sun) through 6 (Sat) in the browser's local timezone — not UTC, so timezone-sensitive code should use `getUTCDay()`.
- Weekend presets: Sat-Sun (Western, India, most of Asia), Fri-Sat (most Gulf states since 2006-2013), Fri only (Iran), none (24/7 operations).
- O(1) closed-form: `full_weeks * 5 + extra_workdays_in_partial_week`; preferred over day-by-day iteration for multi-year ranges.
- Holidays falling on weekends must not be double-counted: subtract `holidays.filter(h => !isWeekend(h)).length`, not the raw holiday count.
- China State Council 调休: certain Saturdays/Sundays become statutory working days to compensate for extended breaks; requires an explicit makeup-day list.
- US federal holidays (per 5 U.S.C. § 6103) contribute 11 weekdays per calendar year: New Year, MLK, Presidents, Memorial, Juneteenth, Independence, Labor, Columbus, Veterans, Thanksgiving, Christmas.
Examples
Workdays in calendar year 2026
Start date: 2026-01-01
End date: 2026-12-31
Weekend: Saturday & Sunday
Holidays: 13 (China statutory holidays after 调休 adjustment)
Total days: 365
Weekend days: 104
Holidays: 13
Workdays: 248Two-week sprint capacity
Start date: 2026-06-15 (Monday)
End date: 2026-06-26 (Friday)
Weekend: Saturday & Sunday
Holidays: 0
Total days: 12
Weekend days: 2
Workdays: 10 (full two-week sprint, 4 devs => 40 workday capacity)Middle East team using Friday-Saturday weekend
Start date: 2026-09-01
End date: 2026-09-30
Weekend: Friday & Saturday
Holidays: 1 (regional holiday)
Total days: 30
Weekend days: 8 (Fri + Sat in September)
Workdays: 21Onboarding window after public holiday
Start date: 2026-10-08 (first workday after Golden Week)
End date: 2026-10-30
Weekend: Saturday & Sunday
Holidays: 0
Total days: 23
Weekend days: 6
Workdays: 17 (enough time for a 3-week onboarding plan)Q1 2027 planning with US federal holidays
Start date: 2027-01-01
End date: 2027-03-31
Weekend: Saturday & Sunday
Holidays: 4 (New Year, MLK Day, Presidents Day, Good Friday)
Total days: 90
Weekend days: 26
Workdays: 60FAQ
How are working days counted?
Monday-Friday are counted by default; Saturday and Sunday are skipped. Holidays you specify in the holiday list are also excluded. The page shows total calendar days, weekends, holidays, and the resulting working-day count.
Are public holidays applied automatically?
No. The calculator does not load public holidays automatically. You need to enter the holiday count manually. Check your country's official calendar for accurate numbers.
Does it handle make-up workdays (调休)?
No. The calculator only excludes weekends and the holiday count you enter. It does not handle China's 调休 (shifted workday) or similar policies automatically. Adjust the weekend rule or holiday count manually if your schedule includes make-up workdays.
Can I exclude only weekends but not holidays?
Yes. Toggle off the holiday list and the calculation only excludes Saturday and Sunday. You can also customize which weekday is the weekend - some Middle East schedules have Friday-Saturday weekends.
What's the difference between this and the Date Difference tool?
Date Difference returns calendar days. This tool returns working days, skipping weekends and holidays. Use this for project deadlines, contract dates, and SLA windows; use Date Difference for raw elapsed time.
Does it work for past dates?
Yes. It calculates workdays between any two dates, past or future. Enter the start and end date, select weekend rules, and enter a holiday count - the page then computes the total workdays in that range.
Is my data uploaded?
No. The calculation runs in your browser. Holiday counts and dates are not saved or transmitted.