Work Hours Calculator
Calculate the hours between two times, or hours worked from clock-in and clock-out times minus unpaid breaks, in decimal hours and hours and minutes, even across midnight.
Updated Nov 27, 2026Formula and worked examples belowHow we check the math
How it is calculated
Both times are converted to minutes after midnight and subtracted. If the end time is earlier than the start time, like 10 PM to 6 AM, the end is treated as the next day and 24 hours are added, so overnight shifts work without any extra setting. Unpaid breaks are then subtracted to get hours worked. The result is shown in decimal hours, the format payroll and timesheets use (7 hours 45 minutes is 7.75), and in hours and minutes. Paid breaks shouldn't be subtracted, because they count as time worked.
Formula
Time between = End time - Start time (add 24 hours if the end time is earlier, meaning it's the next day). Hours worked = Time between - Unpaid breaks. Decimal hours = Minutes ÷ 60.
Worked examples
Each one is run through this calculator's code before it's published.
- 01
9:00 AM to 5:30 PM, 30-minute unpaid lunch
8.00 hours worked (8h 30m between the times)
- 02
Hours between 9:15 AM and 2:40 PM
5.42 hours (5h 25m)
- 03
Overnight: 10:00 PM to 6:30 AM, 30-minute break
8.00 hours worked
- 04
8:00 AM to 4:30 PM, 45 minutes of unpaid breaks, $22/hour
7.75 hours worked (7h 45m), $170.50 estimated pay