How do you calculate hours worked between two times?
Write each clock time as hours and minutes counted from midnight, then subtract the start from the end. So 9:15 becomes 9h 15m, 17:45 becomes 17h 45m, and typing 17h 45m - 9h 15m gives 8 Hours 30 Minutes. The calculator does the borrow. It works for same-day shifts; for an overnight, add 24h to the end.
The trick is to treat each clock time as a duration counted from midnight. Quarter past nine in the morning is 9h 15m into the day; quarter to six in the evening is 17h 45m. Subtract one from the other and you have the shift length, with the awkward minute borrow handled for you. This holds as long as both times fall on the same day.
Step by step
Write each clock time as hours and minutes
Count from midnight on a 24-hour clock. 9:15 in the morning is 9h 15m. 5:45 in the evening is 17:45, which is 17h 45m. Afternoon and evening times pass 12, so 2 p.m. is 14h, not 2h.
Subtract the start from the end
Put the later time first and subtract the earlier one: 17h 45m - 9h 15m. The calculator borrows across the hour for you, so you skip the carry-the-minutes step. The answer is the shift length.
For an overnight shift, add 24h
When the clock-out is the next morning, add a day to it. A 22:00 to 06:00 shift is 6h + 24h - 22h, which comes to 8 Hours. The +24h carries the end time past midnight so the subtraction stays positive.
Subtract breaks and pick a format
Take off an unpaid lunch with another minus, like 17h 45m - 9h 15m - 30m. Choose Hour Minute for payroll, or chain whole shifts with + to total a day or a week.
Worked examples
17h 45m - 9h 15m=8 Hours 30 MinutesA 9:15 to 17:45 shift, by subtracting the two clock times written as durations from midnight.
17h 45m - 9h 15m - 30m=8 HoursThe same shift with a 30-minute unpaid lunch removed.
6h + 24h - 22h=8 HoursAn overnight 22:00 to 06:00 shift: add 24h to the 6 a.m. clock-out.
8h 30m + 7h 45m=16 Hours 15 MinutesAdd two finished shift lengths into a running total.
Try it yourself
Type hours, minutes, days, weeks, months, years, or seconds, as full words or shorthand (h m d w), with + - * /. Pick how the answer reads with Show result as up top. It all runs in your browser. Drag the card’s right edge to make it wider.
Common questions
Can I just type the clock times like 9:15 and 17:45?
Not with a colon, but you get the same answer a different way. Write each time as hours and minutes from midnight (9:15 is 9h 15m, 17:45 is 17h 45m) and subtract: 17h 45m - 9h 15m gives 8 Hours 30 Minutes. This works for any two times in the same day.
How do I handle a shift that crosses midnight?
Add 24h to the clock-out time, since it falls the next day. A 22:00 to 06:00 shift is 6h + 24h - 22h, which is 8 Hours. Without the +24h the subtraction would go negative, because 6 is less than 22.
How do I subtract a lunch break?
Add another minus to the same line. A 9:15 to 17:45 shift with a 30-minute lunch is 17h 45m - 9h 15m - 30m, which gives 8 Hours. Chain more minus signs to remove several breaks.
A warehouse worker reads clock-in and clock-out times off a paper card and needs the paid hours per shift, lunch removed, before submitting the week.