Free Online Date Interval Calculator tool icon
Date Interval

Date Interval Calculator

Two modes: difference between dates, or add/subtract an interval. One‑click copy. Runs locally.

Tip: Everything runs locally in your browser.

Converter Result

Select a mode and fill the form. Click Calculate to see results here.

Calculation Principles & Formulas

The Date Interval Calculator operates in two modes: 1. Date Difference: Calculates the total time span (years, months, days) between two dates. 2. Add/Subtract Interval: Calculates a target date by adding or subtracting years, months, weeks, or days from a start date.

[Formulas] 1. Date Difference (A - B): Total Days = (End Date - Start Date in ms) / 86,400,000 Breakdown: Calculated sequentially (Full Years → Full Months → Remaining Days). (If 'Include end date' is checked, Total Days + 1) 2. Add/Subtract Interval: Target Date = Start Date + (Years × 12 + Months) months + (Weeks × 7 + Days) days Note: Month additions handle varying days in months and leap years (e.g., Jan 31 + 1 month = Feb 28 or 29).

Note: All calculations follow the Gregorian calendar rules.

How to Use

  • Select calculation mode: Date Difference (interval between two dates) or Add/Subtract Interval (modify a base date).
  • In Date Difference mode, pick start and end dates, toggle 'Include end date', and click 'Calculate'.
  • In Add/Subtract mode, set the base date and input years/months/weeks/days to add (use negative numbers to subtract).
  • View results including total days, total weeks, Y/M/D breakdown, or the target date and weekday.
  • Click the copy icon next to any result to copy it to your clipboard.

Tips

  • Handles leap years and varying month lengths automatically.
  • In Add/Subtract mode, use negative numbers to calculate past dates.
  • All calculations are performed locally in your browser. No data is uploaded to any server.