Work Hours Between Calculator
Working out hours worked from a clock-in and clock-out time is easy to get wrong, especially across midnight or with unpaid breaks. This calculator takes a start time, an end time, and unpaid break minutes, then returns the gross time between the two clock times and the paid hours after the break is deducted, in both hours-and-minutes and decimal form. Overnight shifts are handled automatically: if the end time is earlier than the start time, the shift is assumed to cross midnight.
Hours worked formula
start minutes = start hour * 60 + start minute
end minutes = end hour * 60 + end minute
if end < start: end minutes += 1,440
gross minutes = end minutes - start minutes
paid minutes = gross minutes - unpaid break
paid hours = paid minutes / 60
Times are converted to minutes since midnight. When the end time is earlier than the start time, a full day (1,440 minutes) is added so an overnight shift comes out positive. The unpaid break is then subtracted to give paid time.
Worked example
For a clock-in at 09:00, clock-out at 17:30, and a 30-minute unpaid break: start = 540 minutes, end = 1,050 minutes, gross = 510 minutes (8.50 hours). Paid minutes = 510 - 30 = 480, which is 8.00 hours, or 8:00 in hours and minutes.
Hours worked: frequently asked questions
How do I calculate hours worked between two times?
Convert both the start and end times to minutes since midnight, subtract the start from the end, then subtract any unpaid break minutes. Divide the result by 60 to get hours. If the end time is earlier than the start time, the shift crossed midnight, so add 24 hours (1,440 minutes) before subtracting.
Does this calculator handle overnight shifts?
Yes. If the clock-out time is earlier than the clock-in time, the calculator assumes the shift ran past midnight into the next day and adds 24 hours automatically. For example, clocking in at 22:00 and out at 06:00 is counted as 8 hours, not a negative result.
How are unpaid breaks handled?
Enter the total unpaid break time in minutes. It is subtracted from the gross time between clock-in and clock-out to give paid hours. Paid breaks should not be entered here, since they remain part of paid time. Whether a break is paid depends on your jurisdiction and employer.
Why show decimal hours as well as hours and minutes?
Payroll systems and invoices usually use decimal hours, where 30 minutes is 0.50 hours and 15 minutes is 0.25 hours. Showing both the hours-and-minutes form and the decimal form lets you read the result naturally and also enter it into time sheets without converting by hand.
Sources and method
- The calculation is direct clock arithmetic on the times you enter and is computed exactly by this tool.
- Whether a break is paid and how overtime is treated depend on your jurisdiction and employer; this tool only computes the time difference you describe.
Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.