Skip to content
ENExplore Calculators

Day Counter

Count total, business and weekend days between two dates, excluding holidays.

About Day Counter

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.

Formulas

Total days (inclusive)

Total days = (end timestamp − start timestamp) ÷ ms-per-day + 1

Working days

Working days = Business days − Holiday count

B
Business days (Mon–Fri)
H
Public holidays on weekdays

Worked example

With the default values below, Day Counter returns Total Calendar Days of 365. Change any input above and every figure here is recalculated in your browser.

Inputs used

Start Date
2025-01-01
End Date
2025-12-31
Include End Date
Yes
Public Holidays in Rangeaccepts 0–366
0

Results

Total Calendar Days
365
Business Days (Mon–Fri)
261
Weekend Days
104
Working Days (after holidays)Business days minus the entered holiday count.
261
Total Weeks
52.1429
Holidays Deducted
0

Step by step

  1. 1Date range= 2025-01-01 → 2025-12-31 (inclusive)
  2. 2Total calendar days= 365
  3. 3Business days (Mon–Fri)= 261
  4. 4Deduct public holidays= 261 working days

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

What does 'Include End Date' do?

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).

How do I account for public holidays?

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.

Does it handle leap years?

Yes. The calculator works at the millisecond level and lets JavaScript's Date object handle calendar irregularities including leap years.

How long does counting take for a very large range?

The business-day count iterates day by day. A 10-year range is ~3650 iterations — effectively instant.

Day Counter – Calculate Total Calendar Days | Calcrivo