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.

Duration
2 days, 3 hours, 20 minutes
Total days2.139
Total hours51.33
Total minutes3,080
Total seconds184,800
HH:MM:SS51:20:00
Results update as you type

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

  • startStart date and time.
  • endEnd date and time.
  • durationElapsed time between start and end.

Step-by-step calculation

  1. Combine start date with start time into one timestamp; do the same for end.
  2. Subtract: ms = end − start.
  3. Break the milliseconds into days, hours, minutes, and seconds.
  4. 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

  1. Enter the start date and time.
  2. Enter the end date and time.
  3. 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

Last updated: June 22, 2026 · Checked against standard formulas and sample test cases. Treats both date-times in the local time zone; raw timestamp subtraction automatically respects DST transitions.