StatGardenREF. DESK
Calculators/Everyday/Hours calculator
Everyday

Hours calculator calculator

Hours and minutes between two clock times, including overnight spans.

What this calculator does

An hours calculator answers how many hours pass between a start time and an end time. Enter both clock times and the gap comes back in hours and minutes, as a decimal figure, and in total minutes and seconds, which covers most of what "how many hours" questions actually need.

The one detail that trips up a manual count is a span that crosses midnight, such as a start time late at night and an end time the next morning. This calculator adds a full day automatically whenever the end time is earlier on the clock than the start time, so an overnight gap still comes out correct.

The formula

FormulaHours = (end time − start time), adding 24 hours if the end time is earlier in the clock than the start time

The end time is converted to minutes past midnight and the start time is subtracted from it. If that comes out negative, meaning the end time is earlier in the day than the start time, a full 24 hours is added first, which accounts for the span running past midnight into the next day.

TermMeaning
Start timeThe clock time the span begins at.
End timeThe clock time the span ends at.
Unpaid breakAny time in the middle to subtract from the total, such as a lunch break.

The inputs explained

FieldWhat to enter
Start timeThe time the span starts at, on a 24-hour clock.
End timeThe time the span ends at.
Unpaid break (minutes)Minutes to subtract from the total, if any time in the middle should not count.

When to use it

Checking how many hours between two times

The plain question, how many hours between a start and end time, comes up for appointments, travel and study sessions as often as it does for work.

A shift that runs past midnight

An overnight shift, an evening event that runs late, or a flight that lands the next day all need the midnight crossing handled automatically rather than producing a negative number.

Converting a time span to a decimal figure

Some booking systems and spreadsheets want hours expressed as a decimal, such as 8.50 rather than 8 hours 30 minutes, which the decimal figure gives directly.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How many hours fall between a 9am start and a range of finish times

A 9:00 start time against a range of finish times through the day and into the evening.

Fixed 9:00 start time
End timeHours between the two timesCrosses midnight?
12:003 h 0 mNo
15:006 h 0 mNo
17:308 h 30 mNo
19:0010 h 0 mNo
22:0013 h 0 mNo
02:0017 h 0 mYes, counted into the next day
The gap grows steadily as the end time moves later in the day; the final row, an end time of 02:00, is earlier on the clock than the 9:00 start, so a full day is added and the span is correctly read as running past midnight.

Questions

How do I calculate hours worked with a break subtracted?

Enter the start and end time, then enter the length of the unpaid break in minutes; it is subtracted from the raw span before the hours are shown.

What happens if the end time is earlier than the start time?

The calculator treats that as an overnight span and adds a full 24 hours before working out the gap, so an end time of 06:00 after a start time of 22:00 correctly comes out as 8 hours rather than a negative figure.

Is this the same as a timesheet calculator?

This is a plain hours-between-two-times calculator. For a full timesheet with days worked, an hourly rate and overtime, see the timesheet and pay calculator.

How do I convert the result to minutes or seconds instead of hours?

The total is shown in minutes and seconds alongside the hours and minutes figure, so no separate conversion is needed.

For a full shift including pay, overtime and days worked, use the timesheet and pay calculator. To add or subtract a duration rather than compare two clock times, see the time duration calculator.