Time Duration Calculator
Measure a clock span, including overnight, or add and subtract hh:mm durations. 09:00 to 17:00 is 8:00. A 30-minute break makes it 7:30.
Processed entirely in your browser — nothing you enter here is ever uploaded.
Result
About this tool
Between-times reads two clock fields, HH:MM, hours 0–23 and minutes 0–59. 09:00 to 17:00 is 480 minutes. The primary line is 8:00. Decimal hours are 8, and total minutes are 480. A break of 30 is subtracted after the span is known, so the net is 450 minutes, the line is 7:30, and decimal hours are 7.5. The cards then include a 'without break' card of 8:00. A break longer than the gross span is rejected. A negative break is rejected. An empty break is zero. 21:00 to 05:00 is negative before the overnight rule, so 24 hours are added and the span is 8:00, 480 minutes, and the detail line uses the overnight note. 09:00 to 09:00 is zero, not a 24-hour day, because the overnight rule tests for a strictly earlier end.
The duration mode parses hh:mm with up to four hour digits and minutes 00–59. 1:30 plus 2:45 is 4:15, 255 minutes, 4.25 hours. 2:00 minus 3:30 is −1:30. The sign is on the front of the hh:mm text. The detail line reprints the two inputs and the operator. Decimal hours are rounded to two fraction digits for display. The underlying minute count is an integer, because both parsers return whole minutes. There is no seconds field and no date, so a span that crosses more than one midnight is not representable in the clock mode. Use the duration mode for a total such as 30:00.
Preset pages set the mode to between-times and fill a pair: 09:00–17:00, 08:00–16:00, 07:00–15:00, or 21:00–05:00. They do not type a break, so the first result on those pages is the gross span until you enter one and run again. Copy copies the primary hh:mm line. The calculator does not know lunch laws, time zones, or a punch clock. 09:00 to 17:00 is eight hours on the clock even when the civil day has a daylight-saving change.
22:00 to 06:00 is 8:00 for the same reason as 21:00 to 05:00: the raw minute difference is negative, then 1440 minutes are added. 23:30 to 00:15 is 45 minutes. A break of 45 on that span is allowed, because a break is rejected only when it is strictly longer than the gross span, and the net line is 0:00 while the without-break card still shows 0:45. A break of 46 is the error. The duration-mode detail line reprints both inputs with the plus or minus between them.
Example. 09:00 to 17:00 is 8:00, 480 minutes, 8.00 hours. A 30-minute break makes 7:30, 450 minutes, 7.50 hours. 21:00 to 05:00 is an overnight 8:00.
Limit. Clock times are 00:00–23:59. A break longer than the span is rejected. 09:00 to 09:00 is zero, not 24 hours. Durations can be negative when you subtract.
Frequently asked questions
How long is 9:00 to 5:00?
09:00 to 17:00 is 480 minutes. The line reads 8:00, decimal hours 8, total minutes 480. Type 30 in the break and the net is 450 minutes, 7:30, 7.50 hours, and a separate card still shows the 8:00 gross span.
How is 9:00 pm to 5:00 am counted?
21:00 to 05:00 is earlier on the clock, so 24 hours are added. The span is 8:00. The detail line uses the overnight note. 09:00 to 09:00 stays 0, because the end is not earlier.
Can I add two durations?
Yes. 1:30 plus 2:45 is 4:15, 255 minutes, 4.25 hours. 2:00 minus 3:30 is −1:30. Hour digits can run past 24, up to four digits. Minutes must be 00–59.
Do the presets include a lunch break?
No. They fill the clocks only: 09:00–17:00, 08:00–16:00, 07:00–15:00, or 21:00–05:00. The break stays empty, which means zero, until you type one and run again.