Date Calculator

Math

Add or subtract days, months or years, and calculate the days, weeks, hours and minutes between two dates. Calendar-day arithmetic only: weekends and public holidays are included; month arithmetic clamps to the last valid day of the target month.

Add / subtract
Base date
+ days
+ months
+ years
2026-11-22Sunday
Difference
From
→
To
100days
14weeks
2,400hours
144,000minutes

About Date Calculator

"What date is 45 days after delivery?" "How many weeks until the contract expires?" "How many hours till launch?" Counting these on your fingers is error-prone, especially across month and year boundaries. This tool offers two independent modules: date add/subtract, which shifts a base date by days, months, and years and shows the resulting weekday; and date difference, which reports the days, weeks, hours, and minutes between two dates. A mature date library handles leap years and varying month lengths, so results stay accurate. For example, between 2026-01-01 and 2026-08-25 you get 236 calendar days, or 33 weeks 5 days. Weekends and public holidays are included; subtract them separately when you need a working-day figure.

Time zones are the most common source of drift, especially when handling dates without times. One instant falls on different dates in different zones, so two systems using different zones disagree by a day around midnight, and with date-only input an implicit zone assumption changes the arithmetic. Unify the zone before computing rather than tuning the algorithm.

Month arithmetic needs an explicit boundary rule or the result is unintuitive. When the starting day exceeds the target month length, say the thirty-first plus one month landing on a thirty-day month, implementations either roll back to that month last day or overflow into the next month first day, differing by days. Confirm the convention before using it for billing or subscription cycles.

Working-day figures need holiday data that cannot be derived from the date itself. This tool counts calendar days and has no working-day mode; if you need working-day results, maintain an updatable holiday table and account for shift arrangements. Working and calendar days differ, shift arrangements exist, and holidays vary by region, so any automatic exclusion must rest on an updatable date table. Treat it as configuration rather than a built-in constant, so it can be refreshed before the next year arrives.

Daylight saving creates skipped or repeated hours on some dates. In regions that observe it the local clock is discontinuous that day, so adding hours can land on a time that does not exist or occurs twice, while adding days is usually unaffected. For hour-level arithmetic across such a boundary, compute on the absolute timeline rather than adding to local clock times.

Timestamp units and epochs must be stated explicitly, a frequent integration incident. The same digits may mean seconds under one convention and milliseconds under another, three orders of magnitude apart, and a different epoch leaves the integer unrecognisable. State the unit and epoch alongside the value rather than relying on both sides assuming the same.

Finally, separate storage from presentation, the structural fix that avoids most of these problems. Store in an unambiguous form — an absolute time with a zone, or a plain date field — and render according to the user zone and habit at display time. Mixing the two, such as storing a locally formatted string directly, breaks immediately across zones and is hard to repair afterwards.

How It Works Internally

The difficulty in date arithmetic is not the maths but the boundary convention: whether both the start and end dates are counted changes the answer by a full day, and months and years are not fixed lengths, so multiplying months by thirty is wrong. A working-day convention must also skip weekends and public holidays, which vary by year and region and need a maintainable calendar.

Input2026-01-31 plus 1 month
Output2026-02-28 (calendar advance rather than adding 30 days; the convention for missing days must be stated)

Measured on This Page

Month-end clamp2024-01-31 +1 month → 2024-02-29 (leap-year February end) — not 03-02 or an overflow
Leap-year difference2024-01-01 → 2025-01-01 = 366 days, displayed exactly
Day shifting+7 days → 2024-01-08, echoed back in ISO format
Underlying librarydate-fns addDays/addMonths/differenceInDays — no hand-written date arithmetic
Multi-granularityDifferences shown as days/weeks/hours/minutes at once

Adding months across month ends is the classic date bug: a naive implementation overflows 01-31 +1 month into early March (02-31 → 03-02/03), while the correct semantics clamp to the target month's last day (2024-02-29 here) — measured as the latter. The difference counts calendar days (366 includes the leap day), not business days, and cross-timezone scenarios are out of scope (inputs are timezone-less dates).

How this was measured: Three cases cross-checked against Python datetime: 2024-01-31 +1 month (month-end clamp), 2024-01-01→2025-01-01 difference (leap year, 366 days), and 2024-01-01 +7 days. · Measured 2026-10-30

How to Use

  1. Open "Date Calculator"
  2. Pick a base date and add days, months, or years
  3. The shifted date appears immediately above
  4. Enter start and end dates to compare them
  5. Copy either result with its icon

Use Cases

  • Deadline math — Add the agreed days to a signing date to find the exact expiry or acceptance date.
  • Countdown — Compute days and hours from today to release to plan the sprint pace.
  • Billing cycle — Add a month or year to the start date to find the next renewal date.
  • Tenure count — Use date difference to total the days or weeks since the hire date.
  • Milestone planning — Add months step by step from kickoff to lay out each phase delivery.
  • Sprint planning — Calculate end dates from start dates for each sprint to align release timelines.
  • Timezone offset — Add or subtract timezone hours from a UTC timestamp to get local delivery times.

FAQ

How is month-end handled when adding "1 month"?

It follows the date library standard: adding a month to Jan 31 lands on the end of February since Feb lacks a 31st. For cross-month shifts, check the resulting weekday to catch boundary surprises.

Does the difference account for leap years and leap seconds?

It correctly handles leap years (Feb 29), so day counts are accurate. Leap seconds are not involved; second-level precision does not affect everyday date math.

Does the day difference include both endpoints?

It computes the full interval (the gap) between the two dates, not an inclusive count of both ends. Add 1 if you need the inclusive figure.

Can I add days, months, and years together?

Yes. The fields apply in sequence: days first, then months, then years; the order affects month-end and leap-day boundaries, so verify step by step for complex rules.

How do I turn the result into a timestamp?

The tool outputs a standard date and ISO format. For a Unix timestamp, paste the result date into our timestamp converter to switch between them.

The result is off by one day. What is the cause?

Usually the inclusion rule was never agreed. Whether a thirty-day addition counts the start date, the end date, or both changes the answer by a full day; timezone is the other cause, since one instant can correspond to different calendar days in different zones. Agreeing the convention and writing the inclusion rule down beats arguing about the result afterwards, especially across teams.

Does the date difference exclude weekends or holidays?

No. It counts calendar days, so weekends and public holidays are included; subtract them separately against the local calendar when you need a working-day figure.