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
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
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.
days = (end - start) / 86_400_000Methodology
- Parse both dates as ISO 8601 calendar dates in UTC and measure whole days, or add a whole-day offset.
- Use the real length of each month and year (including leap years) rather than a fixed 30-day month.
- 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
- Enter a start date.
- Enter an end date to measure a difference, or a number of days to add.
- 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
{
"start": "2026-01-01",
"end": "2026-03-01"
}Add 30 days
{
"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
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.