Date Calculator

Compute the number of days between two dates or add a number of days to a date.

  • Runs locally in your browser
  • No upload required

Try it

From
2026-01-01
Days
59
Weeks
8.43

Supported formats

Input
date, number
Output
date, number

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

2026-01-01 to 2026-03-01 is 59 day(s).

How it works

  • Parsed both dates as UTC instants.
  • Subtracted the start from the end and divided by 86,400,000 ms per day.
  • Rounded to the nearest whole day.
textSelect to copy
days = (end - start) / 86_400_000

Methodology

  1. Parse both dates as ISO 8601 calendar dates in UTC and measure whole days, or add a whole-day offset.
  2. Use the real length of each month and year (including leap years) rather than a fixed 30-day month.
  3. Report whole days and weeks explicitly; calendar units such as months are never guessed from a day count.

Time model

  • Time source: an explicit reference supplied by the visitor.
  • Timezone: Dates are treated as calendar dates with no timezone; date-only arithmetic is independent of the visitor's timezone. A date-time input with an offset is read as the instant it denotes.
  • Locale: ISO-8601 date input and output only; no locale-specific ordering or month names are applied.
  • Daylight saving: Day arithmetic counts whole calendar days, so daylight-saving transitions never change the result.
  • Reference date: A start date is required and an end date or day count is supplied explicitly; the tool never defaults to the current date.

Usage

  1. Enter a start date.
  2. Enter an end date to measure a difference, or a number of days to add.
  3. Read the result.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Difference in days

jsonSelect to copy
{
  "start": "2026-01-01",
  "end": "2026-03-01"
}

Add 30 days

jsonSelect to copy
{
  "start": "2026-01-01",
  "addDays": 30
}

Limitations

Difference vs. duration

A difference answers 'how many whole days elapsed?'. A duration in months or years depends on where you start, which is why this tool reports days and weeks explicitly rather than guessing calendar units.

Frequently asked questions

Does it handle leap years?
Yes. The calculation is calendar-based and uses the real length of each month.

Sources

  1. ISO 8601: Date and time format — ISO