"How long?" can mean elapsed time, calendar distance, or moving a date by a duration. Rather than returning only a large number of milliseconds, the calculator separates those questions so you get the kind of answer the task calls for.
Pick the right type of answer
- Choose Between dates to find the span between two selected calendar dates.
- Use Breakdown to express a duration in days, hours, minutes, seconds, or ISO 8601 format.
- Choose Add / Subtract to move a date forward or backward by a duration and see the resulting weekday and timestamp.
Calendar time is not always 24-hour time
An elapsed 24 hours is always 86,400 seconds. But "tomorrow at the same local time" can represent a different elapsed duration when daylight saving time changes the clock. For scheduling and human-facing dates, use the selected timezone and calendar-aware arithmetic. For measurement and latency, use elapsed time.
Inclusive date counts are another common trap. January 1 to January 5 crosses four midnight boundaries. If a policy counts both calendar dates, state that explicitly and include the endpoints deliberately.
Frequent questions:
- Q: How many days are between two dates?
- A: Calculate (end_epoch_ms − start_epoch_ms) / 86,400,000. The calculator shows the result as both an unrounded float and a calendar breakdown such as 'X years, Y months, Z days'. The endpoints can use different timezones; the underlying calculation runs in UTC.
- Q: Why does 'months' have decimals?
- A: Months vary from 28 to 31 days. The 'Months (avg)' row divides elapsed milliseconds by 365.2425 ÷ 12 days, which makes durations uniformly comparable. For an exact calendar-month count, use the 'Months' row in the right-hand Calendar breakdown column.
- Q: Does this handle daylight saving time?
- A: Yes. Each endpoint is converted to a UTC instant in its selected timezone before subtraction, so daylight saving time transitions on either side of the interval are handled automatically. The calendar breakdown matches what wall-clock arithmetic would produce.