Count total, business and weekend days between two dates, excluding holidays.
The calculator counts calendar days as the simple difference between the two dates (optionally inclusive of the end date). Business days are counted by iterating through each day in the range and excluding Saturdays and Sundays. Any public holidays that fall on weekdays are then deducted from the business-day count to give 'working days'. Because public holidays vary by country and employer, the user must supply the count.
Total days (inclusive)
Total days = (end timestamp − start timestamp) ÷ ms-per-day + 1
Working days
Working days = Business days − Holiday count
With it ON, both the start and end dates are counted. For example, Jan 1 to Jan 3 inclusive = 3 days. With it OFF, the end date is not counted: Jan 1 to Jan 3 = 2 days. Use OFF when you need the 'gap' between dates (e.g. days remaining until a deadline).
Enter the number of public holidays that fall on weekdays within your date range. The calculator deducts them from the business-day count to give the 'Working Days' figure.
Yes. The calculator works at the millisecond level and lets JavaScript's Date object handle calendar irregularities including leap years.
The business-day count iterates day by day. A 10-year range is ~3650 iterations — effectively instant.