Time Duration Calculator
Find the elapsed time between two date-times. Handles overnight and multi-day spans with results in days, hours, minutes, and seconds.
What this calculator does
This calculator returns the elapsed time between any two date-times. It supports overnight and multi-day intervals, and reports the result as a human-readable phrase plus totals in days, hours, minutes, and seconds.
Formula
duration = end − start (millisecond difference)
days = floor(duration / 86,400,000), then hours, minutes, and seconds from the remainder.
Variable definitions
start— Start date and time.end— End date and time.duration— Elapsed time between start and end.
Step-by-step calculation
- Combine start date with start time into one timestamp; do the same for end.
- Subtract:
ms = end − start. - Break the milliseconds into days, hours, minutes, and seconds.
- Also report total hours, total minutes, and total seconds for convenience.
Worked example
Start: June 20, 2026 22:30. End: June 23, 2026 01:50.
- Difference = 2 days, 3 hours, 20 minutes
- Total hours = 51.33 h
- Total minutes = 3,080 min
- Total seconds = 184,800 s
How to use this calculator
- Enter the start date and time.
- Enter the end date and time.
- Read the human-readable duration and the totals.
Common mistakes
- Swapping start and end: the calculator flags negative durations. Re-enter in correct order.
- Ignoring date when crossing midnight: always include the end date for overnight spans — relying on time alone leads to off-by-24-hours errors.
- Mixing time zones: normalize to one zone before entering values.
Frequently asked questions
›How is time duration calculated?
Duration = end date-time − start date-time. The calculator subtracts the two timestamps in milliseconds, then breaks the result into days, hours, minutes, and seconds.
›Does it handle overnight or multi-day spans?
Yes. Because both dates are part of the input, the calculator handles overnight shifts, weekend spans, and durations of any length without ambiguity.
›What if my end is earlier than my start?
The calculator flags the input as invalid. Swap the values, or use the Hours Calculator with the overnight option for shift-style inputs that cross midnight without a date.
›Are time zones supported?
Both date-times are treated in the same local time zone. The calculator does not auto-convert between zones; if your start and end are in different zones, normalize them first.
›How precise is the result?
Inputs are minute-precision (HH:MM). Totals in seconds assume :00 seconds. For sub-minute precision, use timestamp tools designed for it.
›Why do days, hours, minutes not add to the same total hours?
They do — the breakdown is just the same number expressed in mixed units. 2 days 3 hours = 51 hours = 3,060 minutes.
›Does daylight-saving time affect the duration?
The calculator uses raw timestamp math, which already accounts for DST shifts in the host's local time zone — a spring-forward day shows 23 hours, fall-back shows 25.
Related calculators
- Hours CalculatorWork hours between start and end, minus breaks.
- Days Between Dates CalculatorCount days, weeks, and months between two dates.
- Age CalculatorExact age in years, months and days.
- Chronological Age CalculatorRecords-style age between birth and reference date.
- Tip CalculatorCalculate gratuity, total, and per-person share.
- Standard Deviation CalculatorMean, variance, and standard deviation with steps.