SShiftHours
Time calculations

How to Calculate Hours Between Two Times

To calculate hours between two times, find the difference between the start and end time. If the shift crosses midnight, treat the end time as occurring on the following day, then subtract any unpaid break.

Practical timekeeping guide · ShiftHours

1. Subtract the start time from the end time

For a shift from 8:15 AM to 4:45 PM, the elapsed time is 8 hours and 30 minutes. One easy method is to convert each time to minutes after midnight, subtract the start value from the end value, and convert the result back into hours and minutes.

8:15 AM is 495 minutes after midnight and 4:45 PM is 1,005 minutes after midnight. The difference is 510 minutes, which equals 8 hours and 30 minutes.

2. Handle a shift that crosses midnight

For a 10:00 PM to 6:00 AM shift, the end clock time is earlier than the start clock time, but the shift lasts 8 hours because it ends on the next day. Add 24 hours to the end-time value before subtracting the start time.

When using ShiftHours, select the overnight option if needed. Confirm the date as well as the clock time if you are entering records into a timesheet.

3. Subtract unpaid breaks

If the 8-hour-30-minute shift includes a 30-minute unpaid break, net time is 8 hours. Subtract breaks after finding the full elapsed duration, and only subtract breaks that should be excluded from paid working time.

For several shifts, calculate the net duration of each one and then add the results. This reduces confusion when shifts have different break lengths.

Check your answer

The result should make sense for the schedule. A 9 AM to 5 PM shift spans 8 hours, not 9. A 9 AM to 5:30 PM shift spans 8 hours and 30 minutes before breaks.

Use the free work hours calculator to check the arithmetic, including decimal-hour output.

Calculate your own shift

Use the free ShiftHours work hours calculator to calculate shift length, subtract unpaid breaks, and view decimal hours. For weekly totals, try the weekly calculator.

Worked example: compare elapsed and net time

A shift from 8:15 AM to 4:45 PM lasts 8 hours and 30 minutes. After a 30-minute unpaid break, net time is 8 hours. In minutes, that is 510 elapsed minutes minus 30 break minutes = 480 work minutes.

Related resources

Open the work hours calculator · Browse all ShiftHours articles · Decimal hours chart