Time Duration Calculator

Find the time between two clock times (overnight aware), add or subtract hours and minutes from a time, or convert h:mm:ss to decimal hours and minutes.

Interactive calculator · Method TIME-DURATION-1.0 · Last reviewed: 2026-11-04

Calculate your scenario

Clock times become seconds after midnight (12 AM = 00:00, 12 PM = 12:00).

Your inputs

Try an example

Default worked example. Edit the inputs to calculate your scenario.

Default worked example

Duration 8:30:00
Decimal hours 8.5 h
Total minutes 510 min
Total seconds 30,600 s
Resulting clock time 17:30:00 (5:30:00 PM)
Day offset 0 days (same day)

End 17:30:00 (5:30:00 PM) − start 09:00:00 (9:00:00 AM) = 8:30:00.

How to use the calculator

Pick a task. For a difference, enter the start and end times and the overnight rule; to add or subtract, enter a start time and the duration; to convert, enter the duration in any mix of hours, minutes and seconds (decimals allowed).

What the result means

From 09:00 to 17:30 is 8 hours 30 minutes: 8.5 decimal hours or 510 minutes.

Formula and units

Clock times become seconds after midnight (12 AM = 00:00, 12 PM = 12:00). Difference = end − start; with the next-day rule, 24 hours are added when the end is earlier than the start. Adding a duration gives start ± (hours × 3,600 + minutes × 60 + seconds); the clock time is that total modulo 24 hours and the day offset is how many midnights were crossed. Decimal hours = seconds ÷ 3,600 and minutes = seconds ÷ 60.

Worked examples

09:00 to 17:30: Start time (e.g. 09:00, 21:15:30 or 9:00 PM): 09:00 clock time; End time (difference only): 17:30 clock time; Duration hours (add/subtract and convert): 1 h; Duration minutes: 30 min; Duration seconds: 0 s; Task: diff; If the end is earlier than the start: next; Add or subtract (add/subtract task): add.
Example result: Duration: 8:30:00; Decimal hours: 8.5 h; Total minutes: 510 min; Total seconds: 30,600 s; Resulting clock time: 17:30:00 (5:30:00 PM); Day offset: 0 days (same day).

Night shift 10:00 PM to 6:15 AM: Start time (e.g. 09:00, 21:15:30 or 9:00 PM): 10:00 PM clock time; End time (difference only): 6:15 AM clock time; Duration hours (add/subtract and convert): 1 h; Duration minutes: 30 min; Duration seconds: 0 s; Task: diff; If the end is earlier than the start: next; Add or subtract (add/subtract task): add.
Example result: Duration: 8:15:00; Decimal hours: 8.25 h; Total minutes: 495 min; Total seconds: 29,700 s; Resulting clock time: 06:15:00 (6:15:00 AM); Day offset: +1 day (end on the next day).

Limitations and common mistakes

Elapsed wall-clock arithmetic on a plain 24-hour day: no time zones, daylight-saving shifts or leap seconds. A difference covers at most one overnight crossing; for spans of several days use the date and time tool. h:mm:ss displays round to the nearest second.

Treating 8:30 as 8.3 hours on a timesheet; 8 h 30 min is 8.5 decimal hours.

Sources and assumptions

Method TIME-DURATION-1.0; last formula review 2026-11-04. Sources and their supported claims. Calculation methodology.