Advertisement

Time duration calculator

Enter a start date and clock time and an end date and clock time, each with its own UTC offset. The difference is shown in seconds, decimal hours and hours, minutes and seconds.

Calculator

Signed hours east of UTC: -4 for Eastern daylight time, -5 for Eastern standard time, 0 for UTC.

Signed hours east of UTC. Give each instant its own offset so daylight-saving clock changes are counted.

Elapsed seconds
9,900
Decimal hours
2.750000
Duration (HH:MM:SS)
02:45:00

Advertisement

How this calculator works

Each reading is converted to seconds on a uniform time scale by combining its calendar date, its local clock fields and its signed UTC offset. Subtracting the two gives the elapsed time. Because the offsets are explicit, an overnight shift is counted from the real end instant instead of assuming a fixed 24-hour span, and a repeated or skipped local hour around a daylight-saving change is handled without guessing the region.

Formula

For a reading x, U(x) = 86400 x (O(date) - 1) + 3600h + 60m + s - offset_seconds, where O is the Gregorian day number. seconds = U(end) - U(start); decimal_hours = seconds / 3600; duration uses whole hours, then minutes and seconds from the remainder.

Worked example

Start 2026-10-31 at 22:30 with offset -04:00 and end 2026-11-01 at 01:15 with offset -04:00: 9900 seconds, 2.750000 hours, or 02:45:00. Start 2024-03-10 at 01:30 with offset -05:00 and end at 03:30 with offset -04:00: 3600 seconds, because the clocks sprang forward.

Advertisement

Frequently asked questions

Why does an overnight shift not always add 24 hours?

The end date is supplied explicitly. If the end instant is before the start instant in UTC, the calculator reports an error rather than silently assuming the next day.

What UTC offset should I use?

Hours east of UTC: -5 for Eastern standard time, -4 for Eastern daylight time, and 0 for UTC. Use the offset in force at each reading, so a span across a clock change can have two different offsets.

Are leap seconds included?

No. The time scale treats every day as 86400 seconds, so the result is exact whole seconds on that uniform scale.

Sources

Advertisement