Add/Subtract Days from a Date Calculator
This professional-grade date calculator lets you add or subtract any number of days from a start date. It supports inclusive counting, business-day calculations that skip weekends, and optional holiday exclusions. Designed for reliability, accessibility (WCAG 2.1 AA), and fast results on any device.
Calculator
Custom holidays (optional)
Paste one date per line in YYYY-MM-DD format. These dates will be excluded when Business days is enabled.
Results
Data Source and Methodology
Primary reference: ISO 8601:2019 — Date and time — Representations for information interchange (2019). Official standard details at: iso.org/standard/70907.
Algorithmic reference: Dershowitz, N. & Reingold, E. M. (2018). Calendrical Calculations (4th ed.). Cambridge University Press. View book.
Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.
The Formula Explained
Calendar days (exclusive counting):
Let S be the start date and d ∈ ℕ the number of days. For operation o ∈ {+1 (add), −1 (subtract)}:
$$ R = S + o \cdot d $$
Inclusive counting: If the start date counts as day one and d > 0, compute
$$ d' = d - 1,\quad R = S + o \cdot d' $$
Business days (Mon–Fri) with holiday set H:
Let B(n) advance by one day in the direction of o until a business day not in H is encountered, repeating n times:
$$ R = B^{(d')}(S) $$
Leap years follow Gregorian rules:
$$ \text{leap}(y) \iff (y \bmod 4 = 0) \land (y \bmod 100 \ne 0 \lor y \bmod 400 = 0). $$
Glossary of Variables
- S (Start date): The initial date you input (YYYY-MM-DD).
- o (Operation): +1 to add; −1 to subtract.
- d (Number of days): The number of days to add or subtract.
- d' (Adjusted days): d − 1 when inclusive counting is enabled and d > 0; otherwise d.
- R (Result date): The computed date after applying the operation.
- B (Business-day successor): Function that moves to the next/previous business day, skipping weekends and specified holidays.
- H (Holiday set): Optional set of ISO dates excluded from business-day counting.
How It Works: A Step-by-Step Example
Example: Add 45 business days (excluding weekends and a holiday)
- Operation: Add; Start date S = 2025-01-15; d = 45; Inclusive = off; Business days = on.
- Holiday set H includes 2025-02-17 (Presidents’ Day).
- Adjusted days d' = 45 (since not inclusive).
- Apply B 45 times from S, skipping weekends and 2025-02-17.
- The result R is the first date after completing 45 counted business days. The calculator shows the exact date and the number of excluded days encountered.
FAQ
Does this tool use my time zone?
No. To avoid daylight saving anomalies, dates are treated as date-only values in UTC.
Can I paste holidays from a spreadsheet?
Yes. Paste one ISO date per line (YYYY-MM-DD). Duplicates are ignored; invalid lines are flagged.
What happens if I enter 0 days?
The result equals the start date, regardless of inclusive or business-day options.
Are weekends configurable?
This version treats Saturday and Sunday as weekends. A future update will offer locale-based weekend definitions.
How fast is it for large inputs?
Calendar-day math is instant up to 100,000 days. For business days, inputs are limited to 10,000 days to guarantee responsiveness.
Is the result legally binding?
No. While algorithmically rigorous, always verify critical dates against your organization’s official calendars.