Understanding date differences
The gap between two days.
A simple question with three plausible answers — and only one is what you actually wanted.
Inclusive or exclusive of the endpoints?
From Monday to Wednesday: is that two days or three? Both answers are correct under different conventions. Exclusive of the start (the JavaScript-default approach used by most software) gives you 2 — the gap from one moment to another. Inclusive of both gives you 3 — useful when you're counting hotel nights backwards or asking how many days you'll be at a conference. This tool uses exclusive of the end, which matches how project-management software measures spans.
days = (end − start) ÷ 86 400 000
Calendar months are not fixed.
The total-days figure is exact: every day is 24 hours, every hour is 60 minutes, the count is unambiguous. The total-months figure is approximate by design. We count how many calendar boundaries you've crossed — January to February counts as one month, regardless of whether that month had 28 or 31 days. If you need an "average month" figure for billing or modelling, divide total days by 30.4375.
Years, months, days — the breakdown.
When the breakdown reads "5 years, 3 months, 12 days," it means: 5 whole anniversaries have passed, plus 3 whole monthly rollovers since the last anniversary, plus 12 days since the last monthly rollover. This is the way humans say durations, but it's not unique — "63 months and 12 days" describes the same gap, and "1 938 days" is the same again. The tool surfaces all three because each is right for a different audience.
Time zones and daylight saving.
A "day" is not always 24 hours. Twice a year, in zones that observe daylight saving, you get one 23-hour day and one 25-hour day. The total-hours figure above accounts for this when both endpoints are in the same zone — but if you're measuring across zones (departure and arrival times of a flight, say), the answer in hours can differ from the answer in days × 24 by the offset difference. Pick one zone for both ends to keep the maths clean.
Leap years, leap seconds.
Leap years matter: any span that crosses 29 February gains an extra day, and the total-days figure reflects this faithfully. Leap seconds — the rare extra second inserted into UTC to keep atomic time aligned with Earth's rotation — are ignored, both here and in nearly all software. They shift the total-seconds figure by at most one or two for a multi-year span. For human purposes, they don't matter; for spacecraft navigation, they do.
Negative gaps and order of arguments.
The tool always reports a positive gap, regardless of which end you put in "From" and which in "To". If you need a signed difference (negative when the second date is earlier), do the subtraction yourself with a Unix timestamp — that's the easiest unambiguous way to talk about ordering between calendar moments.