CalcHub

Time Duration Calculator

Enter a start time and an end time and this calculator returns the duration in hours and minutes, plus the same figure as decimal hours, the format timesheets and payroll systems use. When the end time is earlier than the start time, the calculator assumes the span crosses midnight, which handles night shifts correctly.

Duration
8 h 30 min
Decimal hours (for timesheets)
8.5
Total minutes
510

The decimal conversion is where manual calculations usually go wrong: 7 hours 30 minutes is 7.5 hours, but 7 hours 20 minutes is 7.33 hours, not 7.2. Minutes are sixtieths of an hour, so every minute is worth about 0.0167 hours.

How it's calculated

Duration = end − start (+ 24 h if the end is past midnight) · Decimal hours = minutes ÷ 60

Both times are converted to minutes since midnight and subtracted. A negative difference means the span crosses midnight, so 24 hours are added. The decimal form divides total minutes by 60.

Worked example

A shift from 21:45 to 06:15 crosses midnight and lasts 8 hours 30 minutes, or 8.5 decimal hours. A workday from 08:50 to 17:20 lasts 8 hours 30 minutes as well; with a 45-minute unpaid lunch subtracted, the paid time is 7 hours 45 minutes, or 7.75 hours.

Frequently asked questions

How do I convert minutes to decimal hours?

Divide by 60. Fifteen minutes is 0.25 hours, 20 minutes is 0.33, 40 minutes is 0.67, and 45 minutes is 0.75. Payroll systems sometimes round to the nearest quarter hour instead.

How does the overnight calculation work?

When the end time is earlier than the start, the calculator assumes the next day: 22:00 to 06:00 is 8 hours. If you actually meant a span within one day, swap the times.

Does this handle breaks?

The result is the gross span between the two times. Subtract unpaid breaks yourself, or run the calculator separately for each worked block and add the results.

Why do timesheets use decimal hours?

Pay is hourly rate times hours, and multiplication needs a decimal number. 7 hours 45 minutes at $20 per hour is 7.75 × 20 = $155; treating it as 7.45 would underpay by $6.

Related tools