CalcHive › Time › Time Duration Calculator

Time Duration Calculator

By Jason Smith · Updated October 22, 2026

Duration is end minutes minus start minutes, unless Next day is checked.

Each clock time becomes hours times 60, plus minutes. Without Next day, the end has to be later on the same clock. With Next day, the span crosses midnight.

Examples: 09:15 → 12:00 = 2h 45m · 22:30 → 06:15 (next day) = 7h 45m

The three lines for one pair of times

A clock time is hours × 60 + minutes. If Next day is unchecked, duration = end − start. If it is checked, duration = (24 × 60 − start) + end. A negative duration is rejected. The duration line is whole hours and the leftover minutes. The minutes line is the duration rounded to a whole minute. The hours line is the duration divided by 60, rounded to three decimals. The range line repeats the two times and adds "(next day)" only when the box is checked. Nothing is subtracted for a break.

Each row is one run. Hours, minutes, and the duration line are the panel.
StartEndNext dayDuration lineMinutesHours
09:0017:30off8h 30m5108.5
08:1511:45off3h 30m2103.5
09:0009:00off0h 0m00
09:0009:00on24h 0m144024
22:0006:00on8h 0m4808

09:00 is 9 × 60 = 540 minutes. 17:30 is 17 × 60 + 30 = 1050. The difference is 510 minutes, which is 8 hours and 30 minutes, and 510 ÷ 60 = 8.5 hours. 08:15 to 11:45 is 210 minutes, 3h 30m, and 3.5 hours. The same clock time with the box off is 0h 0m. That is a zero-length span, not a missing entry. The panel still opens.

An earlier end time needs the Next day box

22:00 to 06:00 with Next day unchecked does not produce a duration. The warning reads: End time is earlier than start time. Check "Next day" for overnight calculations. The script will not guess that you crossed midnight. Checking the box uses (24 × 60 − start) + end. 24 × 60 = 1440. 22:00 is 1320 minutes, so 1440 − 1320 = 120 minutes remain until midnight, plus 06:00 as 360 minutes, which is 480 minutes. The lines are 8h 0m, 480 minutes, and 8 hours, and the range reads 22:00 → 06:00 (next day).

The same clock time with the box on is a full day: 24h 0m, 1440 minutes, and 24 hours. Leaving the box on for an ordinary afternoon span adds that extra day. 09:00 to 17:30 with the box on is not the 8h 30m row. Turn the box on only when the end is on the following date. A week of shifts, with breaks and a threshold, is the Time Card Calculator. That page crosses midnight on its own. This page does not.

Minutes, not a payroll rule

The hours line can show a decimal, as 8.5 and 3.5 do, because it divides minutes by 60. It is not a pay rate and it is not a rounding rule from a time clock. 510 minutes stay 510 on the minutes line. Two spans are two runs. Add the minutes lines yourself if you need a sum. This page stores nothing, has no date, and will not subtract a lunch. If the end is earlier and you did not cross midnight, the times are swapped. Fix the clocks rather than checking Next day, or the duration gains a day you did not work.

← Back to Time calculators