Expert Reviewed
Marcus Webb, B.Eng, Applied Mathematics SpecialistUpdated June 1, 2026Our Standards →

Last updated:

Date Adder Calculator

Add or subtract days, weeks, months, and years from any date. Free date adder calculator for deadlines, due dates, project planning and future date calculati...

Date Adder/Subtractor

Ad-FreeAI-Powered

Add or subtract days, months, and years from any date. Features countdown timer, recurring events, and quick presets for deadlines and planning.

Details

Quick Presets

📋 More Presets
🎯 Life Events

Enter values above to see results.

Want to learn more? Browse our calculation guides and tutorials →

Reviewed by CalculatorApp.me Editorial Team

Date Addition & Subtraction: The Complete Guide

Month clamping, business day rules, Julian Day arithmetic, and ISO 8601 date math explained.

365/366

Days in ordinary vs. leap year

97/400

Leap years in every 400-year Gregorian cycle

ISO 8601

International date arithmetic standard (YYYY-MM-DD)

Business days

Mon–Fri only; exclude weekends & public holidays

What Is Date Addition?

Date addition calculates the future or past date that results from adding or subtracting a number of days, weeks, months, or years to a starting date. While adding days is straightforward arithmetic, adding months and years requires month-end clamping — ensuring the resulting date falls within the valid range of the target month.

For example: January 31 + 1 month cannot be February 31 (February has 28 or 29 days). The correct result is February 28 (or 29 in a leap year). This clamping behavior is defined in RFC 5545 (iCalendar) and is implemented consistently in ISO 8601-compliant libraries.

Business day addition is a separate calculation — it skips weekends (Saturday and Sunday) and often public holidays, which vary by country and jurisdiction. Finance and law rely heavily on business day counting for payment deadlines, contract terms, and court filing timelines.

Date Arithmetic Formulas

Add Days via Julian Day Number
JDN(Y,M,D) = D - 32075
  + 1461 × (Y + 4800 + (M-14) ÷ 12) ÷ 4
  + 367 × (M - 2 - (M-14) ÷ 12 × 12) ÷ 12
  - 3 × ((Y + 4900 + (M-14) ÷ 12) ÷ 100) ÷ 4

// Add days:
newJDN = JDN(startDate) + daysToAdd
// Convert back to calendar date

Julian Day Number converts any Gregorian date to an integer, making day addition trivially simple.

Month-end Clamping
function addMonths(date, n) {
  const result = new Date(date);
  const targetMonth = result.getMonth() + n;
  result.setMonth(targetMonth);

  // Clamping: if month overflowed,
  // set to last day of target month
  if (result.getMonth() !== ((targetMonth % 12) + 12) % 12) {
    result.setDate(0); // last day of prev month
  }
  return result;
}

JavaScript's Date handles most clamping automatically. Always verify month didn't overflow for Jan 31, Mar 31, etc.

Business Day Addition
function addBusinessDays(date, days) {
  let count = 0;
  const result = new Date(date);
  while (count < days) {
    result.setDate(result.getDate() + 1);
    const dow = result.getDay(); // 0=Sun, 6=Sat
    if (dow !== 0 && dow !== 6
        && !isPublicHoliday(result)) {
      count++;
    }
  }
  return result;
}

Public holidays require a country-specific list. For US: New Year's, MLK Day, Presidents Day, Memorial Day, Independence Day, Labor Day, Thanksgiving, Christmas.

Leap Year Rule
function isLeapYear(year) {
  return (year % 4 === 0
    && year % 100 !== 0)
    || (year % 400 === 0);
}

// Examples:
// 2024 → true  (div by 4)
// 1900 → false (div by 100, not 400)
// 2000 → true  (div by 400)

The Gregorian calendar adds one leap day every 4 years, skips every 100, then adds it back every 400. This keeps the calendar aligned with the solar year to within 26 seconds/year.

Month-end Clamping Examples

Starting DateOperationNaive ResultClamped ResultReason
Jan 31+ 1 monthFeb 31Feb 28 (or 29*)February has 28/29 days
Mar 31+ 1 monthApr 31Apr 30April has only 30 days
Oct 31+ 1 monthNov 31Nov 30November has only 30 days
Feb 29 (leap)+ 1 yearFeb 29Feb 28Next year may not be leap year
Jan 31+ 3 monthsApr 31Apr 30April has only 30 days
Feb 28+ 1 day (leap year)Feb 29Feb 29Valid — leapyear has Feb 29

* Feb 28 if common year; Feb 29 if leap year. Clamping to the last valid day of the target month is the ISO 8601 and RFC 5545 convention.

History of Calendar Arithmetic

46 BC

Julius Caesar introduces the Julian Calendar

Julius Caesar reformed the Roman calendar by adding February 29 every 4 years, creating a 365.25-day year — the first systematic approach to calendar arithmetic.

1582

Gregorian Calendar reform

Pope Gregory XIII corrected the Julian Calendar's accumulated 10-day drift by skipping leap years on century years (except multiples of 400), producing today's 365.2425-day year.

1858

Julian Day Number standardized

John Herschel's Julian Day Number system was adopted by astronomers as a continuous count of days from January 1, 4713 BC — making date subtraction a simple integer operation.

1988

ISO 8601 first published

The International Organization for Standardization published ISO 8601, standardizing date formats (YYYY-MM-DD), durations (P1Y2M3DT4H), and interval notation for international use.

1998

RFC 2445 (iCalendar) defined business day rules

The iCalendar standard formalized recurrence rules (RRULE), including business day and exclusion date handling, enabling calendar software interoperability.

2014

JavaScript Temporal API proposal

TC39 began work on the Temporal API to replace JavaScript's broken Date object, bringing correct ISO 8601 arithmetic, time zones, and calendar systems to web browsers.

Key References

Date Arithmetic Myths vs. Facts

Adding one month always adds exactly 30 days.

Months have 28, 29, 30, or 31 days. Adding one month means advancing the month component, not adding 30 days. January 15 + 1 month = February 15, not February 14.

Every 4 years is a leap year.

The full Gregorian rule is: divisible by 4 AND (not divisible by 100 OR divisible by 400). So 1900 was NOT a leap year, but 2000 was. The next century-exception is 2100.

Business day rules are universal.

Business days are Mon–Fri minus public holidays — and public holidays are jurisdiction-specific. What is a business day in New York may be a holiday in London, limiting cross-border deadline calculation.

Time zones don't matter when adding days.

They do when near DST transitions. Adding 1 day at 1:30 AM on a 'spring forward' night may produce unexpected results. Use UTC or date-only arithmetic (no time component) for pure day addition.

Frequently Asked Questions

What is the difference between adding days and adding months?
Adding days moves the date forward by a fixed number of calendar days. Adding months advances the month component, with month-end clamping applied if the target date exceeds the month length.
What happens when you add 1 month to January 31?
The result is clamped to February 28 (or February 29 in a leap year). ISO 8601 and most programming libraries follow this clamping convention.
What is a business day?
A calendar day that is not a Saturday, Sunday, or public holiday. Business days vary by jurisdiction — the US has 10 federal holidays; the UK has 8 bank holidays per year.
How does the Julian Day Number help with date addition?
JDN converts any date to an integer (days since Jan 1, 4713 BC). Adding days becomes integer addition. Convert back to a calendar date via the reverse formula.
What is the T+2 settlement rule in finance?
Stock trades in the US settle T+2, meaning payment and delivery occur 2 business days after the trade date. Weekends and NYSE holidays are excluded from counting.
How do I add months correctly in JavaScript?
Use date.setMonth(date.getMonth() + n). JavaScript's Date handles clamping for most cases, but verify the resulting month hasn't overflowed (a sign that clamping occurred differently than expected).
What is the ISO week number?
ISO 8601 defines Week 1 as the week containing the first Thursday of the year. ISO weeks always start on Monday. Week 1 of 2025 starts January 6, 2025.
What is a leap second?
An occasional 1-second adjustment to UTC to compensate for Earth's irregular rotation, managed by the IERS. Leap seconds are being discontinued after 2035 per ITU decision.
How far in the future can date calculators compute?
Most Gregorian calendar rules are perpetually valid. JavaScript's Date object handles years 100,000,000 BC to 100,000,000 AD. For historical dates before 1582, switch to the Julian calendar.
Can I add negative days?
Yes — adding negative days or months is equivalent to subtracting. Most calculators and date libraries accept negative values for the offset.
What is the difference between duration and interval in ISO 8601?
A duration is length of time (P30D = 30 days). An interval is a specific start–end time range (2025-01-01/2025-03-31). The date adder works with durations.
What is the proleptic Gregorian calendar?
The proleptic Gregorian calendar extends Gregorian rules backward before October 15, 1582 — the date the Gregorian calendar was first adopted. Most modern date libraries use the proleptic Gregorian calendar for historical date arithmetic.

References

Related Calculators

Explore All Tools

Calculators for finance, health, math, engineering, and more — all free.

Browse All Tools →