Working Days Calculator
Calculate business days between two dates, excluding weekends.
About the Working Days Calculator
This Working Days Calculator counts the number of business days (Monday through Friday by default) between two dates, optionally excluding public holidays. It is a common tool for project planning, legal deadline calculations, and payroll processing — many contracts specify delivery dates in ‘working days’ rather than calendar days.
The default mode counts Monday through Friday as working days, which matches the standard business week in most Western countries. The tool also supports the Middle Eastern convention (Sunday-Thursday) and the Israeli work week (Sunday-Thursday) via the ‘include Saturday’ and ‘include Sunday’ checkboxes — in Saudi Arabia and much of the Gulf region, the work week is Sunday to Thursday, with Friday-Saturday weekends. Israel’s weekend is Friday-Saturday, with the work week Sunday-Thursday.
The holiday list is provided by the user — there is no canonical ‘world holidays’ database because holidays vary by country, state, and even city. For US federal holidays, use the official list at opm.gov. For other countries, see the IANA CLDR holiday data or the date-holidays npm package.
How It Works
The algorithm walks from start to end date one day at a time using Date.setDate(date.getDate() + 1). For each day, it checks three conditions:
1. Day of week: date.getDay() returns 0 (Sunday) through 6 (Saturday). By default, days 0 and 6 are weekends. The optional ‘include Saturday’ and ‘include Sunday’ checkboxes treat those days as working days.
2. Holiday membership: the user-provided holiday list is parsed into a JavaScript Set of ISO 8601 date strings (YYYY-MM-DD). The check holidaySet.has(dateStr) runs in O(1) on average.
3. Day classification: the day is classified as either a working day, weekend day, or weekday holiday. Holidays falling on weekends are counted separately so users can see the ‘wasted’ holidays (when a statutory holiday falls on a Saturday, some employers grant a substitute day off on the next Monday — this count helps plan for that).
The algorithm is O(N) where N is the number of days between start and end. For ranges up to a year, this is fast (under a millisecond). For multi-century ranges, a closed-form formula would be more efficient: fullWeeks × 5 + weekdayCount(partialWeekStart, partialWeekEnd), but the day-by-day walk is simpler and handles holidays correctly without additional logic.
The Date object is constructed at noon local time to avoid DST edge cases. DST transitions occur at 2 AM in most jurisdictions, so noon is always 24 hours from the next noon — the day count remains accurate.
Worked Examples
March 2025 (March 1 to March 31): 31 calendar days. Of these, 21 are weekdays (Monday-Friday) and 10 are weekends. Without holidays: 21 working days. With two holidays (March 17 St Patrick’s Day, March 21 Persian New Year): 19 working days. The calculator also tells you how many holidays fall on weekends — if March 21 is a Friday, the holiday is a weekday holiday; if it falls on a Saturday, it is already a weekend day.
January 2025 (January 1 to January 31): 31 days, 23 weekdays, 8 weekend days. With US federal holidays (January 1 New Year’s Day, January 20 Martin Luther King Jr. Day) excluded: 21 working days. Both holidays fall on weekdays in 2025 (January 1 is Wednesday, January 20 is Monday).
A 30-day contract starting March 1, 2025 with default settings: 22 working days (March 1-30 with weekends excluded). If the contract specifies ‘30 working days’ from March 1, the delivery date is March 31 (March 1 + 30 working days, excluding 8 weekend days).
For Middle Eastern projects: check ‘include Saturday’ and uncheck ‘include Sunday’ — the work week becomes Sunday-Thursday with Friday-Saturday weekends, matching the Saudi convention.
When to Use This Tool
- Project deadline estimation — convert ‘30 working days’ to a calendar date.
- Legal deadline calculations — many jurisdictions allow ‘X days’ for filings, computed in business days.
- Payroll processing — count paid working days in a pay period for hourly employees.
- Service-level agreement (SLA) tracking — ‘respond within 4 working hours’ requires business-day logic.
- Shipping and delivery estimates — ‘5–7 business days’ is a common courier commitment.
- Vacation planning — maximize vacation days by bridging weekends and public holidays.
- Software development sprint planning — convert story-point estimates to calendar days for stakeholder communication.
Limitations & Disclaimer
The tool counts full working days only — partial working days (e.g. half-day before a holiday) are not supported. The holiday list is user-provided; the tool does not consult any external holiday database. For multi-region calculations (e.g. shipping between US and Europe), enter holidays from both regions. The default work week is Monday-Friday; for Middle Eastern (Sun-Thu) or Israeli (Sun-Thu with Fri-Sat weekend) conventions, use the ‘include Saturday’ and ‘include Sunday’ checkboxes carefully. DST transitions are handled by constructing dates at noon local time. See our disclaimer for full terms.
Frequently Asked Questions
Does the tool exclude public holidays automatically?
No — holidays vary by country, state, and even city. The tool lets you enter a list of holiday dates (one per line, in <code>YYYY-MM-DD</code> format) that will be excluded from the working-days count. For US federal holidays, see <a href='https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/'>opm.gov</a>; for international holidays, see the <a href='https://github.com/commenthol/date-holidays'>date-holidays</a> npm package or your local government’s official list.
Why do I need to enter holidays manually?
Because there is no canonical world-holidays database. Even within the US, state holidays vary (e.g. Cesar Chavez Day is a state holiday in California but not in Texas). Within a single country, religious holidays (Easter, Ramadan, Diwali) shift each year. Industry sectors also have their own holidays (e.g. financial markets close on Good Friday even though it is not a US federal holiday).
What about regional work weeks?
The tool supports the standard Mon-Fri work week, plus optional Saturday and Sunday inclusion. For Sunday-Thursday (Middle East), check ‘include Saturday’ and uncheck ‘include Sunday’. For Friday-Saturday weekends (Israel), check ‘include Saturday’ and ‘include Sunday’ — the calculator then counts all 7 days as working days, which is probably not what you want; better to use the standard Mon-Fri mode.
Does the tool handle partial working days?
No — the tool counts full days only. For partial working days (e.g. half-day before a holiday), use a time-tracking tool that supports fractional days. Alternatively, multiply the working-days count by the typical work hours per day (8) and subtract the half-day hours.
How does the calculator handle weekends that fall on holidays?
If a holiday falls on a Saturday or Sunday, the calculator counts it as a ‘holiday that falls on a weekend’ (already excluded by the weekend rule). Some employers grant a substitute day off on the next Monday when a holiday falls on a weekend — this tool does not automatically substitute, so you would need to add the substitute date to the holiday list manually.
Can I calculate working hours between two timestamps?
Not with this tool — it counts full working days only. For hour-level granularity, use a tool that accepts start and end timestamps and accounts for working hours per day (typically 8 AM to 5 PM with a 1-hour lunch break), time zones, and daylight saving transitions.
Last updated: September 9, 2026 · Author: HT99 Tools Editorial Team