ToolActToolAct

Date Add/Subtract Calculator

Add or subtract days, weeks, months, years from a date

Add or subtract days from a date

What is a Date Add/Subtract Calculator?

A date add/subtract calculator finds a target date by moving a starting date forward or backward by a chosen number of days, weeks, months, or years. It helps when you need a renewal date, follow-up date, contract deadline, warranty end date, or reminder without counting a calendar by hand. The tricky part is not adding days, but handling real calendar boundaries: months have different lengths, years can be leap years, and a date such as January 31 may not exist in the next month. This tool gives a practical calendar result for quick planning. It counts calendar time only, so business-day rules, holidays, regional regulations, and legal deadlines still need separate verification.

How to Use

How to use

  1. Enter the start date
  2. Select add (forward) or subtract (backward)
  3. Enter the value and select a unit (day/week/month/year)
  4. Click 'Calculate result' to see the target date

Date Rules

  • Month and year calculations can land on shorter months; check how your business rule handles dates such as January 31 plus one month.
  • For deadlines, confirm whether weekends, holidays, or end-of-day cutoffs should change the final date.

Use Cases

Calculate a deadline from a known start datePick a start date, choose add or subtract, and apply days, weeks, months, or years to produce a single resulting date for warranties, renewals, follow-ups, or delivery estimates. Because month-end rollover is handled by the browser's date utility, edge cases such as January 31 plus one month resolve to February 28 or 29 without any server-side calendar lookup.
Use quick offsets for common planning windowsAfter a result appears, the +7, +30, +90 days and +1, +3 months, +1 year shortcuts make it fast to compare common review periods without retyping values. The start date and the chosen offset stay inside the page; no request is sent to a backend, so anniversaries, probation periods, visa applications, or medical follow-up dates can be calculated on a shared or borrowed device without exposing the underlying input.
Remember that calendar arithmetic is not a business-day ruleThe tool works with calendar dates and month/year rollovers through the date utility. It does not account for holidays, weekends, company calendars, or jurisdiction-specific deadline rules. Record the start date, offset, and resulting date together so the calculation can be understood later.
Recheck month-end rollover like Jan 31 plus one monthWhen the start day exceeds the target month's length, confirm how the calculator handles the rollover so subscription renewals and contract anniversaries do not silently shift to a different date. Test edge cases such as January 31 plus one month against February's actual length, or March 31 minus one month against a 31-day February in a leap year, before using the result in a billing or HR system.
Pair the result with a timezone for distributed teamsRecord the reference date together with an explicit timezone or UTC offset, since a deadline stored without context can be off by a day once reviewers in other regions re-interpret it. For example, a contract end date stated as '2026-07-15' can mean very different instants for a team in Tokyo versus one in Los Angeles, so storing the offset alongside the date prevents the silent day-shift that often happens during cross-region handoffs.

Technical Principle

Date arithmetic in this tool is built on the proleptic Gregorian calendar as implemented by the ECMAScript Date object. Months in JavaScript are 0-indexed (January is 0, December is 11), which is the single biggest source of off-by-one bugs in date code. Adding days is straightforward: new Date(d.getTime() + n * 86_400_000). Adding months is harder because months have 28, 29, 30, or 31 days: the standard idiom date.setMonth(date.getMonth() + n) overflows when the resulting month is shorter than the source day, so January 31 + 1 month produces March 3 rather than February 28 (the engine carries the extra 3 days forward into March). This tool detects the overflow by comparing date.getMonth() after setMonth and clamps the day to the last day of the target month when needed, matching the behavior of moment.js, date-fns, and Temporal's Plain Date.add(). Leap years follow the standard Gregorian rule: a year is a leap year if it is divisible by 4, except for centuries, which must also be divisible by 400. So 1900 and 2100 are common years, while 2000 was a leap year and 2024 is too. This matters whenever a calculation crosses February 29: January 29 + 1 month + 1 month in 2023 gives March 29, but in 2024 the rollover hits February 29 (a valid date) and then March 29, with no clamping needed. The Year 1582 cutoff for the Julian-to-Gregorian transition is ignored here because the proleptic Gregorian extends the rules backward indefinitely; dates before October 15, 1582 are technically anachronistic but still compute correctly for modern purposes. Timezone handling is a separate dimension: Date stores a UTC instant internally and applies the host system's IANA timezone (e.g. America/New_York, Asia/Shanghai) only when calling .getDate(), .getMonth(), or .toLocaleString(). Two pitfalls follow: (1) a date constructed from an ISO string without a Z suffix ("2026-06-10") is parsed as midnight UTC, but "2026-06-10T00:00:00" without the Z is parsed as local-time midnight, and the same date.getDate() can return 9 or 10 depending on the user's offset; (2) DST transitions in spring (skip 02:00-03:00) and autumn (repeat 01:00-02:00) make some arithmetic ambiguous, so a "+24 hours" addition can land on a wall-clock that is 23 or 25 hours away. For business-day, weekday-only, or holiday-aware arithmetic, the calendar result here must be post-processed against a region-specific holiday list (e.g. through the date-holidays npm package or a custom calendar) rather than relying on the plain rollover.

  • JS Date months are 0-indexed: January = 0, December = 11; off-by-one is the most common mistake.
  • setMonth overflow: Jan 31 + 1 month gives Mar 3, not Feb 28; tool clamps to month-end by comparing getMonth() after setMonth.
  • Leap year: divisible by 4, but century years must also be divisible by 400 (so 1900 no, 2000 yes, 2024 yes).
  • ISO 8601 without Z ("2026-06-10T00:00:00") parses as local time; with Z it is UTC - getDate() can return different days.
  • DST transitions create 23-hour and 25-hour days; +24h addition is not always +1 calendar day.
  • Day-level math is exact via getTime() + n * 86_400_000; longer units cascade through setMonth/setFullYear with clamping.
  • Business-day and holiday-aware arithmetic must be layered on top via a region-specific calendar table - not in the engine itself.

Examples

Add 90 days to a start date (trial / OKR review)

Start date : 2026-01-15 (Thursday)
Operation  : + 90 days
Result     : 2026-04-15 (Wednesday)
Use case   : 90-day trial period end, Q1 OKR review

Subtract 6 months from today

Start date : 2026-06-11
Operation  : - 6 months
Result     : 2025-12-11
Use case   : Look back six months for renewal or churn analysis

Add 2 years 3 months 5 days (visa expiry)

Start date : 2026-01-15
Step 1 : + 2 years   -> 2028-01-15
Step 2 : + 3 months  -> 2028-04-15
Step 3 : + 5 days    -> 2028-04-20
Result     : 2028-04-20

Month-end rollover: Jan 31 + 1 month

Start date : 2026-01-31
Operation  : + 1 month
Result     : 2026-02-28  (Feb has 28 days in 2026)

Leap year check:
Start date : 2028-01-31
Operation  : + 1 month
Result     : 2028-02-29  (2028 is a leap year)

Subtract 14 days for a billing reminder

Subscription renewal : 2026-07-01
Operation            : - 14 days
Send reminder on     : 2026-06-17

FAQ

How does adding 'months' work for end-of-month dates?

Months don't all have the same number of days, so adding 1 month to Jan 31 is ambiguous. The calculator follows the standard convention: clamp to the last day of the target month - Jan 31 + 1 month = Feb 28 (or 29 in leap years). This matches Excel's EDATE function.

Are weekends and holidays counted?

By default yes - 'add 5 days' adds 5 calendar days. For business-day calculations (skipping weekends and optionally holidays) use the dedicated 'Workday Calculator' tool; this page is for raw calendar arithmetic.

Can I add years, months, weeks, and days at once?

Yes. The result applies them in the order years → months → weeks → days, which is the convention used by most date libraries including JavaScript's Temporal proposal. This order matters: '1 month and 30 days' added to Jan 1 lands differently than '30 days and 1 month'.

How does it handle daylight saving time?

The calculation operates on calendar dates, not absolute time, so adding 'one day' across a DST transition still produces the same time-of-day in the local zone. If you need 24-hour-precise arithmetic, switch the unit to hours instead of days.

What's the supported date range?

JavaScript Date covers ±100,000,000 days from 1970, which is roughly years -271,821 to 275,760. The calculator handles any historical or far-future date in that range. For dates before the Gregorian calendar reform (1582), be aware that local civil calendars differ.

Why is subtracting two dates different from adding negative days?

They aren't - subtracting N days is the same as adding -N. If you want the difference between two dates use the 'Date Difference' tool. This page is one-direction arithmetic: start date plus or minus a duration.

Is my data uploaded?

No. The calculation runs in your browser. Inputs are cleared on page refresh.