Date Calculator: Find Duration & Add/Subtract Dates

Calculate the duration (years, months, days) between two dates, or find a new date by adding or subtracting time. Accurate, accessible, and mobile-friendly.

How to Use This Calculator

Select the mode that matches your goal, enter the relevant dates, and click Calculate. The duration tab compares two dates while the add/subtract tab instantly moves the start date by the amounts you enter.

  • Choose either Calculate Duration or Add / Subtract Time so the inputs below match your task.
  • When finding a duration, supply both a start and end date and decide whether the end day should be counted.
  • When altering a date, pick add or subtract, then enter years, months, weeks, or days.
  • Hit Calculate or make edits—results rerun automatically after a short delay.
  • Reset restores today's date plus clears all time offsets.

Methodology

The engine parses ISO date inputs so time zone quirks are avoided. For duration mode it swaps dates when needed, converts milliseconds to whole days, and walks the calendar to count years, months, and days. Including the end day simply adds one more day before adjusting the breakdown.

For add/subtract mode the calculator adds years and months first, guarding against month-end rollovers by snapping to the last valid day when the original day does not exist. Weeks convert to days, and the final day-level adjustment applies with the chosen direction.

Numbers are rendered with localized thousands separators and the interface never shows NaN because every input is validated before rendering results.

Full original guide (expanded)

Audit: Complete
Formula (extracted text)
$TotalDays = \lfloor \frac{Timestamp_{End} - Timestamp_{Start}}{1000 \times 60 \times 60 \times 24} \rfloor

This section shows the formulas used by the calculator engine, plus variable definitions and units.

No variables provided in audit spec.

Sources (authoritative):
Changelog
Version: 0.1.0-draft · 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn

Why use this calculator

  • Get two tools in one: Duration and Add/Subtract.
  • Calculations are instant and handle leap years automatically.
  • Smart logic prevents common errors, like month-end rollovers.
  • Fully accessible (WCAG 2.1) and mobile-first design.

Related time tools

Formulas

Duration difference:

$TotalDays = \lfloor \frac{Timestamp_{End} - Timestamp_{Start}}{1000 \times 60 \times 60 \times 24} \rfloor

Breakdown logic: Subtract years, months, then days while borrowing as needed; including the end day bumps the count before the final normalization.

Citations
Changelog
  • 0.1.0-draft — 2026-01-19: Initial draft (review required).
Verified by Ugo Candido Last Updated: 2026-01-19 Version 0.1.0-draft
Version 1.5.0