YourWorldTime

Duration calculator

Set a start and an end — each in its own time zone if they differ — and this reports the time that actually elapsed, including the days that are 23 or 25 hours long.

Start
End

Elapsed

Days
Hours
Minutes
Seconds

Why calendar arithmetic is not clock arithmetic

"One day later" and "24 hours later" are different instructions, and twice a year they give different answers. If a nightly job is scheduled for 02:30 local time, it runs twice on one autumn morning and not at all on one spring morning. If it is scheduled every 86,400 seconds, it drifts an hour away from 02:30 instead.

Neither behaviour is a bug; they answer different questions. The trouble starts when the code does one and the person expected the other. This calculator always answers the clock question — how much time actually passed — and shows the calendar days alongside it.

Common questions

Why does a day sometimes come out as 23 or 25 hours?
Because it was. On the day clocks spring forward, midnight to midnight is 23 hours; on the day they fall back it is 25. This calculator resolves both ends to absolute instants before subtracting, so it reports the time that actually passed rather than the time the calendar suggests.
Can the two ends be in different time zones?
Yes, and that is the point. A flight leaving Tokyo at 17:00 and landing in San Francisco at 09:30 the same morning took nine and a half hours, not minus seven and a half. Set each end to its own zone and the arithmetic works out.
Are leap seconds included?
No. Browsers do not expose them — the JavaScript clock ignores leap seconds entirely, so a span crossing one is reported a second short. Over the whole history of UTC that is 27 seconds in total, which matters for satellite navigation and for nothing you are likely to be measuring here.
What if the end is before the start?
It says so, and reports the magnitude anyway. A negative duration is usually a typo, and silently flipping the sign would hide it.