Business Day Calculator
Result
Target Date:
Business days added (requested):
Actual calendar days spanned:
Skipped days (weekends/holidays):
What is a business day calculator?
A business day calculator is a tool that adds, subtracts, or counts the number of working days—typically excluding weekends and specified holidays—between dates.
What this calculator does
- Mode 1 – Add/Subtract Business Days: Pick a start date and enter how many business days to move forward (positive number) or backward (negative number). The tool returns the resulting date.
- Mode 2 – Count Business Days Between Dates: Pick a start date and an end date to get the number of business days between them (excluding the start date and including the end date if it qualifies as a business day).
- Weekend toggle: By default, Saturdays and Sundays are excluded. You can uncheck this if your “business week” is non-standard.
- Holiday list: Provide custom holidays (YYYY-MM-DD) as comma- or newline-separated values; those dates will also be treated as non-business days.
How to use it (step by step)
1) Choose the mode
Use the “Mode” dropdown to switch between:
- Add/Subtract Business Days (e.g., “Start on 2025-09-15, add 10 business days”)
- Count Business Days Between Dates (e.g., “How many business days are between 2025-09-01 and 2025-09-30?”)
The form shows the relevant inputs for the selected mode. In “Add/Subtract,” you’ll see a Business Days to Add field. In “Count,” you’ll see an End Date field.
2) Set your start date
Pick the Start Date. Internally, the calculator treats dates at local midnight, which is appropriate for workday counting. If your workflow spans multiple time zones, see the notes in Tips & assumptions below.
3) Configure weekends and holidays
- Exclude weekends (checked by default): Saturdays and Sundays do not count as business days. If your calendar treats weekends differently, uncheck this to include them.
- Holidays (optional): Add any non-working dates in YYYY-MM-DD format, separated by commas or new lines:
2025-01-01, 2025-03-17 2025-05-01 2025-12-25
When provided, these dates will be skipped just like weekends.
4) Enter the offset or end date
- Add/Subtract mode: Enter a positive number to move forward in time or a negative number to move backward. For example, entering 10 skips over weekends and holidays until ten business days are counted, then returns the landing date.
- Count mode: Set the End Date. The calculator returns business days, excluding the start date and including the end date if it qualifies as a business day.
5) Click “Calculate”
Your result appears in the green result panel. If the landing date itself isn’t a valid business day under your settings (for example, you added zero days and your start date is a Sunday), you’ll see a small note indicating that.
Examples
Example A – Add 10 business days
- Start: 2025-09-15 (Monday)
- Offset: +10
- Weekends excluded, no holidays
- Result: 2025-09-29 (Monday)
Example B – Subtract 5 business days
- Start: 2025-10-06 (Monday)
- Offset: −5
- Weekends excluded, holidays: 2025-10-02
- Counting backward and skipping weekend days and the holiday, you’ll land on a date in the previous week that reflects exactly five business days of movement.
Example C – Count between two dates
- Start: 2025-09-01
- End: 2025-09-30
- Weekends excluded, no holidays
- Result: 22 business days (typical for a 30-day month with four or five weekends).
Tips & assumptions
- Inclusive/exclusive rules (Count mode)
The calculator excludes the start date and includes the end date if it is a business day. This mirrors many payroll and project-planning conventions. If you need a different convention, you can adapt the counting line to include or exclude whichever boundary you prefer. - Negative offsets (Add/Subtract mode)
You can move backward by entering a negative number (e.g., −7). The algorithm steps one calendar day at a time in the appropriate direction and only counts days that satisfy your business-day settings. - Custom weekends
Some organizations treat Friday–Saturday as the weekend, or they count Sunday as a working day. The UI provides a simple “Exclude weekends (Sat & Sun)” toggle. If you need a different weekend pattern, you can extend the script to treat specific weekdays as non-business days by adjusting theisWeekend()
function. - Holidays
Holidays are matched by exact date (YYYY-MM-DD). You can paste a region-specific list or your company’s closure dates. If a holiday lands on a weekend and you also exclude weekends, it’s already non-business, but leaving it in the list is harmless. - Time zones
The logic uses your browser’s local time and treats dates at local midnight (e.g.,T00:00:00
). This is usually perfect for business-day math because we’re counting whole days rather than hours. If your process spans time zones (e.g., a global team closing tickets on UTC), make sure everyone uses the same reference. - Validation & edge cases
- The calculator warns if required fields are missing or invalid.
- In “Count” mode, it handles start dates after end dates by returning a signed count (negative if the end is before the start).
- In “Add/Subtract,” entering 0 returns the start date; a note will tell you if that date isn’t a business day under your settings.
- Performance
For typical usage (ranges of a few months or even years), stepping day-by-day is fast in the browser. If you plan to add thousands of business days at once, you could optimize by skipping whole weeks when weekends are excluded, but that’s rarely necessary for interactive planning. - Accessibility & UX
The result region usesaria-live=\"polite\"
so screen readers are notified when results update. Labels are bound to inputs, and the page uses conservative contrast on a white background to keep things clear and readable. - Embedding & customization
- Styling: Everything is inlined for portability; you can drop the file into any site.
- Default holidays: Pre-fill the textarea with your organization’s standard holiday set.
- API glue: If you need to persist holidays or audit calculations, hook the “Calculate” button to a small API that saves inputs and results.
Frequently Asked Questions (FAQ)
1) Does the calculator include the start date when counting between two dates?
No. It excludes the start date and includes the end date if it is a business day.
2) Can I move backward in time?
Yes. Enter a negative number of business days in “Add/Subtract” mode (e.g., −3).
3) What counts as a weekend?
By default, Saturday and Sunday. Uncheck the weekend box to include them, or modify the isWeekend()
function if you follow a different weekend pattern.
4) How do holidays work?
Any date you add to the Holidays field (YYYY-MM-DD) is treated as a non-business day in addition to weekends. Paste them comma- or newline-separated.
5) What happens if a holiday falls on a weekend?
It’s already excluded by the weekend rule. Including it in the holiday list doesn’t hurt anything.
6) Is the resulting date guaranteed to be a business day?
When adding/subtracting, the calculator lands on the N-th valid business day and returns that date. If you enter 0, you’ll just get the start date, which might not be a business day—there’s a note in that case.
7) Does it handle different time zones?
It uses your browser’s local time. Because it deals with whole days (not hours), this is usually fine. For cross-time-zone workflows, standardize on a single zone.
8) Can I include partial days or hours?
No—this tool focuses on whole business days. For hour-level planning, you’d need a working-hours calculator.
9) Can I save my holiday list?
Not by default. To persist holidays, wire the form to a small backend or store them in localStorage if you’re comfortable modifying the script.
10) How accurate is the count for very large ranges?
Accurate. The code checks each calendar day and only counts it if it qualifies as a business day under your settings. For extremely large ranges, you can add weekly “fast-forward” optimizations, but interactive use shouldn’t need them.