Date Add/Subtract Calculator
Add or subtract days, weeks, months, or years from any date. Outputs result date, day of week, ISO format, and days-from-today reference. Universal date arithmetic tool.
Date Add/Subtract Calculator
How to use the Date Add/Subtract Calculator
Pick your base date
The starting point for the calculation. Default: today. Click the date field to use your browser's native date picker. ISO 8601 format used internally; display follows your browser locale.
Choose Add or Subtract
Add: result is in the future relative to base date (e.g., "1 year from contract start"). Subtract: result is in the past (e.g., "30 days before deadline").
Enter years/months/weeks/days to shift
Combine any units. Example: 1 year + 6 months + 2 weeks = shift base date by that total. Most use cases need only one unit (e.g., 30 days, or 1 year). Leave unused fields at 0.
Read the result
Headline shows the resulting date in friendly format with day of week. Stats below show ISO 8601 format (for technical use), day of week (helpful for scheduling), and days-from-today (quick context check). Use ISO format for copying into spreadsheets, databases, or contracts.
Date arithmetic — the simple math that trips up software + spreadsheets
Adding or subtracting time periods from dates sounds trivial — and for short durations + simple units (days), it usually is. The complexity arrives with months, years, leap years, and month-end edge cases. "Add 1 month to January 31" — what's the answer? Some systems say February 28 (last day of next month); others say February 31 = March 3 (overflow); some throw an error. JavaScript's native Date — which is what this tool uses — takes the overflow route: the surplus days run on, so January 31 plus a month is 3 March. Excel and Google Sheets take the other one and clamp to 28 February. That is not a rounding difference; it is three days, on the kind of date that ends a notice period. SQL databases use yet other conventions. For most everyday calculations, the differences are invisible — but for contract math, financial calculations, and visa/permit deadlines, it pays to verify.
The month-end edge case
"Add 1 month to date X" is well-defined only when the resulting month has the same or more days than the source. Two conventions are in use and they give different answers. Clamping says Jan 31 + 1 month is 28 February, because that is the last day of the month you landed in; this is what Excel's EDATE does and what most contracts mean. Overflow says the surplus days run on into the following month, so Jan 31 + 1 month is 3 March. This tool overflows, because it uses JavaScript's native Date, and so do March 31 + 1 month (1 May, not 30 April) and May 31 + 1 month (1 July, not 30 June). Whenever that happens the tool says so on the result and shows you the clamped date as well, so you can take the one your agreement specifies. For legal documents: the "corresponding date" convention is standard in most common-law jurisdictions ("1 month later" means the same numbered day next month, or the last day of that month if the day doesn't exist). Civil law systems sometimes differ. When precision matters, consult the relevant jurisdiction's contract law conventions.
Adding "1 month" to January 31 lands on 3 March in this tool, and on 28 February under the clamping convention most contracts mean. The tool flags the difference whenever it arises — but if the date carries money or a legal obligation, the agreement should say which rule applies.
Why date math matters for ASEAN business
Common date arithmetic use cases across ASEAN markets: Employment contracts — notice periods, probation end dates, annual leave entitlement reset dates. Lease agreements — start + end dates, renewal notification deadlines. Visa + work permit math — Singapore EP/SP/Dependant's Pass validity (typically 2 years renewable); Malaysia MM2H + Employment Pass; Thailand 1-year non-immigrant visa. Banking + finance — loan maturity dates, FD rollover dates, mortgage amortisation. Contract law — 30-day cure periods, 90-day notice provisions, statutory limitation periods. Cross-border business adds complexity because different countries have different "1 month" conventions in law. Best practice for cross-border contracts: specify exact dates (Dec 31, 2026) rather than relative durations ("1 year after contract start") to eliminate ambiguity.
The ISO 8601 advantage
ISO 8601 (YYYY-MM-DD) is the unambiguous international date format. Why use it: (1) sorts correctly as plain text — 2025-04-03 sorts before 2025-12-01 alphabetically; (2) unambiguous across cultures — no debate about whether "03/04/2025" means March 4 or April 3; (3) used by ALL software databases + APIs natively; (4) accepted everywhere in technical + business documentation. This tool uses ISO 8601 internally + displays both ISO + friendly formats. Copy the ISO string when entering dates into spreadsheets, databases, or technical documents. Use the friendly format ("Wednesday, 3 April 2025") for human-readable communications.
Month-end overflow, ISO 8601, and where Excel and JavaScript disagree
Date math sounds trivial but causes more software bugs than almost any other category. Leap years + month lengths + DST all conspire.
Jan 31 + 1 month = 3 March here, not 28 February: JavaScript overflows the surplus days into the next month. The tool shows the clamped alternative alongside it.
ISO 8601 (YYYY-MM-DD) is the unambiguous global standard. Use for cross-border contracts + technical work.
Common contract use: 30 days notice = base + 30 calendar days. Working day variant uses Working Days Calculator.
Pregnancy due date: 280 days from last menstrual period. Standard medical math.
For loan + finance math, common: amortisation period (years), FD term (months), maturity (specific date).
Different jurisdictions handle "1 month" slightly differently in contract law — specify exact dates in cross-border contracts.
Excel and JavaScript disagree at month ends: Excel's EDATE clamps Jan 31 + 1 month to 28 February, JavaScript overflows it to 3 March. A spreadsheet and a script can give different answers for the same contract date.
Leap-year rule: divisible by 4, except century years not divisible by 400. 1900 not leap; 2000 was; 2100 won't be.
For business-day math (excluding weekends + holidays), use Working Days Calculator instead.
Frequently Asked Questions
-
Uses standard JavaScript Date behaviour, which OVERFLOWS rather than clamps: adding "1 month" to a date whose target month is shorter carries the surplus days into the following month. Jan 31 + 1 month = 3 March; March 31 + 1 month = 1 May. This does NOT match Excel or Google Sheets, whose EDATE clamps to the last day of the target month — so the two tools disagree on exactly these dates, and the tool warns you when you hit one. For legal contracts, this typically maps to the "corresponding date" convention used in common-law jurisdictions.
-
Yes. Adds + subtracts correctly across leap years. Feb 29 anniversaries follow the same overflow rule: 29 February 2024 + 1 year gives 1 March 2025, not 28 February. Jurisdictions and institutions differ on which they mean for a leap-day birthday, so check against the rule that governs your case.
-
Yes. Fill in multiple units; they're applied in order (years → months → weeks → days). 1 year + 6 months + 2 weeks = base + 18 months + 14 days, calculated step-by-step. Order matters slightly for edge cases — typically not noticeable in practice.
-
This tool adds CALENDAR days only. For "5 working days from today" calculations excluding weekends + ASEAN public holidays, use the Working Days Calculator. Common confusion: "30 days notice" in contracts is usually calendar days (this tool); "5 working days SLA" is business days (other tool). Verify which interpretation your contract requires.
-
Employment notice: today + 30 days = last working day. Lease expiry: lease start + 2 years = renewal deadline. Visa validity: visa start + 1 year = expiry. Loan maturity: loan disbursement + 5 years = maturity. Contract anniversaries: contract date + N years = renewal/review date. Pregnancy due date: last menstrual period + 280 days. Permit/license renewal: previous renewal + 2 years. Statute of limitations: incident date + N years = limitation deadline (varies by jurisdiction + cause of action).
-
No — this is calendar date math, not time-of-day. Time zones become relevant for hour/minute calculations across regions; for whole-day calculations (this tool), time zones aren't needed. For timezone conversion + scheduling across regions, use the Timezone Converter.
-
"30 days" alone is usually interpreted as calendar days in common-law jurisdictions (matches this tool). "30 working days" or "30 business days" requires excluding weekends + holidays — use the Working Days Calculator. Some jurisdictions + contract templates explicitly define "days" as calendar days unless otherwise specified. For unambiguous contracts: always specify "calendar days" or "working days" + the relevant working calendar (country).
-
For calendar date math (years/months/days), yes — matches Excel + Google Sheets behaviour for typical use cases. For hour/minute math across DST transitions or unusual edge cases (extreme dates 100+ years out, dates before 1970 in some browsers), specialised libraries (Luxon, date-fns, Day.js) handle additional edge cases. For everyday contract + scheduling math, this tool is sufficient.
-
No. All calculations run in your browser via JavaScript. Open DevTools → Network and confirm zero outbound requests. Dates stay on your device. Safe for confidential contract + personal date math.
-
Pair with: Date Difference Calculator for between-dates math; Working Days Calculator for business-day arithmetic; Week Number Calculator for ISO week numbers; Time Duration Calculator for hour/minute math; Age Calculator for birthday → today; Countdown Timer for event countdowns. External: Google Calendar, Notion, Todoist for persistent date tracking.
Method & sources
How it computes
Adding days or weeks moves the day number. Adding months or years moves the calendar field, which can overflow: 31 January plus one month has no 31 February, and JavaScript resolves that forward to 3 March (2 March in a leap year) rather than clamping to the month end.
What this tool implements
- Dates are read and written per RFC 3339 (YYYY-MM-DD).
- Month arithmetic follows ECMA-262 MakeDay (§21.4.1.28), which constructs a day number from year, month and day without clamping the day to the target month — the behaviour behind the 31 January result.
Sources
- Klyne G, Newman C. RFC 3339, Date and Time on the Internet: Timestamps (2002). https://www.rfc-editor.org/rfc/rfc3339.txt
- Ecma International. ECMAScript Language Specification, §21.4.1.28 MakeDay. https://tc39.es/ecma262/multipage/numbers-and-dates.html
Pick up where you left off
Stored only in this browser — never sent to our servers.