Add Subtract Days Calculator: Date Offset & Working Days
Accurately add or subtract calendar days, business working days, weeks, months, and years to or from any date with automatic month-end clamping and leap year precision.
Add/Subtract Days Calculator
Offset dates by adding or subtracting years, months, weeks, and days, with options to skip weekends
9 November 2026
٩ نوفمبر ٢٠٢٦
Scorpio (العقرب)
When "Skip Weekends" is toggled, days are shifted step-by-step skipping Saturdays and Sundays. The standard weeks/months/years shifts are applied independently afterwards.
+0y 0m 0w 10d
Chronological Mathematics, Intercalary Years & Calendar Physics
Calculating date offsets involves fundamental astronomical and chronological complexities. Because the Earth's tropical solar year encompasses approximately 365.24219 mean solar days, the civil Gregorian calendar relies on an intercalary rule: a year contains 366 days if it is divisible by 4, except for century years which must be divisible by 400.
When navigating calendar space, continuous time is mapped through Julian Day Numbers (JDN)—an integer count of days elapsed since January 1, 4713 BCE. The exact day of the week is determined via modular arithmetic:
1. Day-of-Week Modulo 7 Arithmetic:
DayIndex = (JDN + 1) mod 7 [where 0 = Sunday, 1 = Monday, ..., 6 = Saturday]
2. Business Day Skipping Sequence:
TargetDate = StartDate + sign * deltaDays (loop until deltaDays = 0)
If DayIndex in [0, 6] (Weekend), step forward/backward without decrementing the remaining business day counter.
3. Gregorian Leap Year Intercalary Condition:
isLeap = (Year mod 4 == 0 and Year mod 100 != 0) or (Year mod 400 == 0)
Month-End Clamping (ISO Normative Resolution): Calendar months vary in length between 28 and 31 days. When adding 1 month to January 31, no "February 31" exists. The engine clamps the resulting date to the final legitimate day of the target month: February 28 in common years, or February 29 in leap years. Because of clamping, calendar arithmetic is mathematically non-commutative: adding 1 month then 1 day produces a different date than adding 1 day then 1 month.
Fliegel-Van Flandern Algorithm & Computational JDN Conversion
To execute day offset arithmetic across centuries without being confused by variable month lengths or leap years, high-precision astronomical software converts civil Gregorian dates $(Y, M, D)$ into linear integer Julian Day Numbers (JDN). Using the Fliegel and van Flandern (1968) algorithm:
JDN = (1461 * (Y + 4800 + (M - 14)/12))/4 + (367 * (M - 2 - 12 * ((M - 14)/12)))/12 - (3 * ((Y + 4900 + (M - 14)/12)/100))/4 + D - 32075
Once converted to a linear integer, adding or subtracting $N$ calendar days is a trivial scalar operation: $JDN_(target) = JDN_(start) ± N$. The result is then inverted back into civil year, month, and day coordinates with mathematical certainty, bypassing all leap century irregularities.
Calendar Months, Cumulative Day Counts & Working Days Matrix
The following reference matrix details standard and leap year day distributions, quarterly partitions, cumulative day markers, and typical business day yields:
| Month | Common Days | Leap Days | Fiscal Quarter | Cumul. Common | Cumul. Leap | Typical Working Days |
|---|---|---|---|---|---|---|
| January | 31 | 31 | Q1 | 31 | 31 | 21–22 days |
| February | 28 | 29 | Q1 | 59 | 60 | 20–21 days |
| March | 31 | 31 | Q1 | 90 | 91 | 21–23 days |
| April | 30 | 30 | Q2 | 120 | 121 | 21–22 days |
| May | 31 | 31 | Q2 | 151 | 152 | 21–22 days |
| June | 30 | 30 | Q2 | 181 | 182 | 21–22 days |
| July | 31 | 31 | Q3 | 212 | 213 | 21–23 days |
| August | 31 | 31 | Q3 | 243 | 244 | 21–22 days |
| September | 30 | 30 | Q3 | 273 | 274 | 20–22 days |
| October | 31 | 31 | Q4 | 304 | 305 | 22–23 days |
| November | 30 | 30 | Q4 | 334 | 335 | 20–21 days |
| December | 31 | 31 | Q4 | 365 | 366 | 21–22 days |
Frequently Asked Questions
How does the calendar engine handle month-end clamping (e.g., adding 1 month to January 31)?
When adding or subtracting calendar months, target months with fewer days (such as February, April, June, September, and November) cannot accommodate day numbers like 29, 30, or 31. The engine adheres to ISO standard date clamping: adding 1 month to January 31 results in February 28 (or February 29 in a leap year), rather than overflowing into March.
How does the business day (skip weekends) algorithm calculate working-day offsets?
When the 'Skip Weekends' toggle is enabled, the calculation steps day-by-day in the direction of the offset (+1 for addition, -1 for subtraction). Each day is evaluated against its day-of-week index: Saturdays (day 6) and Sundays (day 0) are bypassed without decrementing the remaining offset counter, ensuring that only Monday through Friday are credited as valid business days.
What leap year rules are used for Gregorian calendar calculations?
Under the Gregorian calendar reform (intercalary rule), a year is a leap year (366 days with February 29) if it is divisible by 4, except for end-of-century years which must be divisible by 400. Thus, 2000 and 2024 are leap years, whereas 1900 and 2100 are common years of 365 days.
How do multi-unit offsets (years, months, weeks, and days) determine the calculation sequence?
Calendar offsets follow a hierarchical application order to preserve human intuitive scheduling: first, integer years are applied (Y +/- deltaY), followed by month offset with month-end clamping (M +/- deltaM), followed by calendar or business week offsets (W * 7 or W * 5), and finally individual day offsets.
Can this calculator determine legal, contractual, and judicial deadlines?
Yes. Legal deadlines and statutory limitation periods frequently specify 'business days' or 'calendar days' excluding federal court holidays and weekends. By switching between standard calendar days and business days, you can calculate filing cutoff dates, rescission cooling-off periods, and contractual delivery milestones.