Hours calculator
How many hours and minutes between two times, with breaks and overnight shifts.
Quick answer: subtract the start time from the end time. 9:00 AM to 5:00 PM is 8 hours.
How to calculate hours between two times
- Convert both times to 24-hour time. 5:00 PM becomes 17:00.
- Subtract the start time from the end time: 17:00 − 9:00 = 8:00.
- If the end time is smaller, the shift crosses midnight: add 24 hours to the end time first.
- Subtract any unpaid break.
Example: 10:30 PM to 7:00 AM → 31:00 − 22:30 = 8 hours 30 minutes.
Common shifts
Frequently asked questions
How many hours is 9 to 5?
9:00 AM to 5:00 PM is 8 hours. With a 30-minute unpaid lunch it is 7.5 hours; with a 1-hour lunch it is 7 hours.
How many hours is 8am to 5pm?
9 hours. With a 1-hour unpaid lunch it is 8 hours of paid time.
How do I count hours across midnight?
Add 24 hours to the end time, then subtract. 11 PM to 7 AM is (7 + 24) − 23 = 8 hours.