terican

Last verified · v1.0

Calculator · business

Working Days Calculator

Count business days between any two dates, excluding weekends and US federal or state holidays. Accurate results for payroll, legal, and project deadlines.

FreeInstantNo signupOpen source

Inputs

Working Days

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

Working Daysdays

The formula

How the
result is
computed.

How the Working Days Calculator Works

The working days calculator determines the exact number of business days between two dates by applying a precise three-phase mathematical formula. This tool is essential for payroll processing, contract deadline management, project sprint planning, and regulatory compliance windows where calendar days and working days produce materially different results.

The Core Formula

The calculator applies the following formula: W = ⌊D ÷ 7⌋ × 5 + Σ(i=0 to R−1) 𝟙[(s+i) mod 7 ∉ {5,6}] − Hstate

Each variable represents a specific element of the date range:

  • W — Total working days in the period
  • D — Total calendar days between the start and end dates (inclusive of the start day)
  • ⌊D ÷ 7⌋ — Number of complete weeks via floor division, each contributing exactly 5 working days
  • R — Remainder days after complete weeks are extracted (R = D mod 7)
  • s — Numeric day of the week the period begins (0 = Monday through 6 = Sunday)
  • 𝟙[...] — Indicator function: returns 1 for weekdays (mod values 0–4), returns 0 for Saturday (5) or Sunday (6)
  • Hstate — Count of public holidays falling on weekdays within the period, determined by the selected US state

Step-by-Step Formula Derivation

Phase 1 — Complete-week contribution: Every full 7-day block always contains exactly 5 working days and 2 weekend days. Applying floor division ⌊D ÷ 7⌋ and multiplying by 5 computes this portion in constant time without iterating through individual days, making the approach computationally efficient for any date range.

Phase 2 — Remainder days: The leftover R days (R = D mod 7), beginning from weekday index s, are evaluated individually using the indicator function. A day whose modular index equals 5 or 6 contributes zero to the sum; all others contribute 1. Summing these indicators yields the working-day count within the partial week at the end of the range.

Phase 3 — Holiday deduction: The term Hstate subtracts all federally and state-observed holidays that land on weekdays within the date range. The U.S. Office of Personnel Management maintains the official schedule of 11 annual federal holidays. States independently designate additional observances, so Hstate varies by jurisdiction and can significantly change the final working-day count.

Worked Example: 20-Day Project Window

Consider a project running from Monday, January 6 to Friday, January 24 — a span of 20 calendar days with s = 0 (Monday):

  • Complete weeks: ⌊20 ÷ 7⌋ = 2 → 2 × 5 = 10 working days
  • Remainder: 20 mod 7 = 6 days from Monday → Mon, Tue, Wed, Thu, Fri, Sat → 5 working days
  • Subtotal: 10 + 5 = 15 working days
  • Holiday deduction: Martin Luther King Jr. Day falls on January 20 (Monday) → Hstate = 1
  • Final result: W = 15 − 1 = 14 working days

State-Level Holiday Variation

Holiday counts differ substantially across US states. The federal government mandates 11 public holidays per year, but states add further observances independently. Texas law authorizes up to 20 state holidays annually, while many northeastern states observe between 11 and 15. The New York State Comptroller's Office publishes detailed days-worked calculation standards for public employees — a methodology this calculator mirrors for accuracy. Holiday pay standards from UC Davis Finance and Business further inform how observed vs. actual holiday dates are treated when a holiday falls on a weekend and is shifted to a nearby weekday.

Practical Applications

  • Payroll and HR: Prorate salaries accurately, track leave balances, and calculate overtime eligibility based on exact weekday counts within a pay period.
  • Legal and regulatory deadlines: Courts, agencies, and contracts routinely measure filing windows and notice periods in business days; a one-day miscalculation can invalidate a submission or trigger a breach.
  • Project management: Sprint planning and Gantt chart construction depend on accurate business-day counts to assign realistic task durations and delivery milestones.
  • Contract terms: Net-30, Net-60 payment clauses, cure periods, and termination notice requirements frequently specify working days rather than calendar days.
  • Supply chain logistics: Vendor lead times quoted in business days must be converted precisely to calendar dates to schedule procurement and avoid stockouts.

Reference

Frequently asked questions

What counts as a working day?
A working day is any weekday — Monday through Friday — that is not a recognized public holiday. Saturdays and Sundays are always excluded regardless of other settings. When the holiday exclusion option is enabled, federally observed days such as Thanksgiving, Christmas Day, and Independence Day are also subtracted. In the US, the standard working week contains 5 days, so a typical 4-week month yields approximately 20 working days before holiday deductions are applied.
How does the calculator handle US public holidays?
When the Exclude Public Holidays option is activated, the calculator identifies every federal and state-observed holiday that falls on a weekday within the selected date range and subtracts each one from the total. The U.S. Office of Personnel Management defines 11 federal holidays annually. Each state may designate additional observances — Texas recognizes up to 20 per year — so selecting the correct state from the dropdown ensures the deduction reflects the actual number of observed days off in that jurisdiction.
Does the start date count as a working day?
Yes. The calculator includes the start date in the count if it falls on a weekday that is not a holiday. This inclusive-start convention is standard in HR, legal, and government contexts. The New York State Comptroller's Office, for example, uses inclusive counting when calculating days worked for public employees. If the start date falls on a Saturday or Sunday, the first counted working day shifts to the following Monday.
How many working days are in a typical year?
A standard 365-day calendar year contains 52 complete weeks plus 1 extra day, producing 52 × 5 = 260 weekdays as the baseline. Subtracting the 11 federal holidays that fall on weekdays (the exact number varies slightly each year because some shift when they land on weekends) leaves approximately 249 working days. Adding state-specific holidays can reduce that figure to 240 or fewer depending on the state and the specific calendar year.
How many working days are in a month?
Working days per month range from 19 to 23, depending on the total days in the month and the day of the week on which the month begins. February in a non-leap year typically yields 19 or 20 working days, while a 31-day month starting on a Monday can reach 23. Averaged across all 12 months, each calendar month contains approximately 21.7 working days before any holiday deductions, making 20 a widely used planning estimate for budgeting and capacity calculations.
Why does selecting a US state affect the business day count?
Each US state independently determines which holidays employers must observe beyond the 11 federal mandates. Choosing the wrong state can cause the calculator to overcount or undercount working days by 2 to 9 days per year. For payroll proration, contract deadline compliance, and leave-balance administration, matching the state setting to the employee's actual work location is essential. A contract deadline calculated without state holidays could expire a full business day earlier than the parties intended.