How to use
- Type or paste a Start and an End date: a date on its own (
2025-01-15) or with a time (2025-01-15T10:30:00). Or click a Quick range: until the end of this year, since its start, or today plus 30 or 90 days. - Pick Interpret as (UTC or your browser's local time) for whichever inputs have no time zone of their own.
- Read the headline sentence for the calendar breakdown, the timeline under it (month or year marks, and a red today marker when today falls inside the range), and the totals in days, weeks, weekdays, hours, minutes and seconds. Click any total to copy it.
- Use ⇅ to swap the two dates, Set end to now for "how long ago/until", or Copy result to take the whole answer.
A calendar-aware answer, not just a millisecond count
The gap between two dates has two honest answers that don't agree: "exactly how many seconds/days/weeks apart" (a fixed number, easy to compute) and "how many years, months and days" (a calendar concept, where the same number of days means a different number of months depending which months they fall in). This tool gives both: a plain-English calendar breakdown as the headline, and exact totals in every fixed unit underneath it, rather than picking one and hiding the other.
Example
2025-01-15 to 2025-06-01T14:30:00 is:
4 months, 17 days, 14 hours and 30 minutesThat's also 137 days, 19 weeks, and 98 weekdays (Monday-Friday) in total.
Options explained
- Interpret as: UTC / Local time only matters for whichever of your two inputs has no time zone written into it (see the FAQ).
- ⇅ (swap) exchanges Start and End; the totals are identical either way, since the calculation always uses the absolute gap.
- Quick ranges fill both dates from your own calendar's today (not UTC), as plain dates, so they are then read under the Interpret as setting like typed dates. "Until end of year" ends on 31 December, the start of that day, so it does not count 31 December itself as a full day.
- The timeline marks days for a range under about two months, months up to about three years, and years beyond that, thinned so the labels never crowd (every 10th year over a long span).
- Set end to now fills End with the current instant, for a quick "how long ago was Start" or, if Start is in the future, "how long until Start".
- Load sample inserts the worked example above; Clear empties both fields.
Edge cases and common errors
- Both fields are required. Leaving either one empty stops with "Enter both a start and an end date." rather than guessing a default for the missing side.
- Unparseable dates. Free text that matches no recognised shape, like
not a date, stops with "Start date: Could not parse that as a date. Try ISO 8601, e.g. 2025-01-15 or 2025-01-15T10:30:00.", the same parser (and the same accepted formats) as the Unix Timestamp Converter. - End before start is handled, not rejected: see the FAQ.
- The month/day edge case (31 January to 1 March and similar) is explained in the FAQ; every field in the breakdown is guaranteed non-negative.
- Weekdays counts whole calendar days only (Monday through Friday, UTC-day boundaries), not partial days; a span that starts mid-afternoon still counts that day if it's a weekday.
Do the same thing in code
// JavaScript: total days is straightforward; a real calendar (years/months/days)
// breakdown needs month-length-aware logic like this page's own src/lib/date-diff.ts
const ms = new Date('2025-06-01') - new Date('2025-01-15');
const days = Math.floor(ms / 86400000);
# Python: dateutil.relativedelta gives a real calendar breakdown out of the box
from dateutil.relativedelta import relativedelta
from datetime import date
relativedelta(date(2025, 6, 1), date(2025, 1, 15))Working with a raw Unix timestamp instead of a date string? The Unix Timestamp Converterconverts it to a date first. Paste that result straight into either field here.