Add or Subtract Days Calculator
Move forward or backward by whole calendar days or weeks. See an unambiguous result date and weekday, with leap years handled explicitly.
Your starting date & offset
See the method ↓Choose dates using the native date picker. Results use YYYY-MM-DD. Gregorian calendar dates from year 0001 to 9999 are supported; no clock time or time zone is assumed.
Loading calculator… If this message remains, reload the page.
HOW THE CALCULATION WORKS
Shift a Gregorian date by a whole number of calendar days
- Days before year Y = 365 × (Y−1) + floor((Y−1)/4) − floor((Y−1)/100) + floor((Y−1)/400). Add earlier month lengths and the day of month; 0001-01-01 has ordinal (numbered calendar day) 1. Here floor means round down to a whole number. Weekday index = the remainder after dividing (ordinal−1) by 7, starting with Monday at index 0.
- Day shift = offset × 1 for days or offset × 7 for weeks, with a negative sign for subtract. Target ordinal = start ordinal + day shift.
- Recover the target year by bounded search, then subtract month lengths to find the month and day. Keep the result within 0001-01-01 through 9999-12-31.
- No inclusive extra day is added. An offset of zero returns the starting date.
Worked example
Start 2024-02-28 and add 2 days: result 2024-03-01, a Friday. Subtracting 2 days from 2024-03-01 returns 2024-02-28. Adding 1 week is the same as adding 7 calendar days.
Defaults and assumptions
- Dates are blank initially; no current date or time zone is assumed. Supported dates are 0001-01-01 through 9999-12-31. Results and review records use YYYY-MM-DD, although a native picker may display your browser’s local date format.
- Gregorian rules are extended backward before their historical adoption. Leap years are divisible by 4, except centuries not divisible by 400. Impossible dates are rejected, not rolled into another month.
- Add and days are selected; offset is blank. Changing days/weeks clears the offset to prevent silently reinterpreting the same number.
- Offset is nonnegative whole-number text, at most 80 trimmed characters; optional plus and correctly grouped commas are accepted. No decimals, fractions, exponents or negative offsets. Select subtract for a backward shift.
- Maximum offset is floor(3,652,058 ÷ days per unit), and the resulting date must also remain in range. A week means exactly seven calendar days.
Limitations
- Calendar dates only: no time of day, daylight-saving adjustment, elapsed-hour claim, holidays, business days or historical calendar-adoption correction. A calendar day is not necessarily a 24-hour elapsed interval.
- This tool does not establish legal, contractual or filing-deadline counting rules. Choose the convention that matches your task and independently check consequential deadlines.
- No month/year offset, holiday skipping or inclusive counting option is applied. Days and weeks are the only offset units.
Precision and rounding
All calculations use exact bounded integers. Date ordinals (numbered calendar days) run from 1 to 3,652,059; the largest elapsed gap is 3,652,058 days. No rounding, milliseconds, timestamp conversion or local-time parsing enters the calculation. The review record creation timestamp is metadata only.
Sources
- U.S. Naval Observatory · Leap years and the Gregorian calendar ↗
- HTML Standard · Calendar date syntax ↗
Use the assumptions, worked example and sources to interpret your result. Estimates do not replace professional advice.
How to use this calculator
- Choose a starting date, then select add or subtract.
- Enter a nonnegative whole-number offset and select days or weeks. Changing the unit clears the offset; enter the quantity for the new unit.
- Calculate the result date and weekday. Inspect the signed calendar-day shift and the documented limits.
Common questions
Is the start date day one?
This is an offset, not an inclusive count. Adding zero returns the same date; adding one returns the following calendar date.
Can I enter a negative number to subtract?
Choose subtract and enter a nonnegative magnitude. The tool rejects negative offsets to avoid an ambiguous double negative.
Are weekends and holidays skipped?
No. Every calendar day counts, including weekends, holidays and leap days. A week always means seven calendar days.
Why did the offset clear when I changed units?
Two days and two weeks mean different shifts. Clearing the quantity asks you to enter the intended value instead of silently changing its meaning.
Report a problem or suggest a calculator
Found a confusing result, a missing option, or an idea for a new calculator? Send it privately to the site owner.
Opening the form loads Cloudflare Turnstile, a spam check that processes connection and device information. Privacy details.