How to calculate hours worked
You only need a start time, an end time, and any unpaid break. The calculator below does the arithmetic, including overnight shifts and overtime. Here is the method, with worked examples you can check by hand.
The basic formula
For one shift:
Hours worked = (end time − start time) − unpaid break
If the end time is earlier than the start time, the shift crossed midnight: add 24 hours to the end time, then subtract. Add each shift in the same pay period to get the week total.
Worked example: a standard weekday
You clock in at 9:00 a.m., clock out at 5:30 p.m., and take a 30-minute unpaid lunch.
- Elapsed time: 5:30 p.m. − 9:00 a.m. = 8 hours 30 minutes
- Minus lunch: 8:30 − 0:30 = 8 hours (8.00 decimal hours)
Five of those days is 40 hours, which is a common full-time week in the United States.
Worked example: overnight shift
You work 10:00 p.m. to 6:30 a.m. with no unpaid break.
- 6:30 a.m. is earlier than 10:00 p.m., so add 24 hours: 6:30 a.m. + 24 hours = 30:30 from the previous midnight
- 30:30 − 22:00 = 8 hours 30 minutes (8.50 decimal hours)
The calculator on this page treats an end time on the next morning the same way, so you can type 10pm and 6:30am without doing that step yourself.
Convert minutes to decimal hours
Payroll systems usually want decimal hours, not hours and minutes. Divide minutes by 60:
| Minutes | Decimal hours | Example |
|---|---|---|
| 15 | 0.25 | 7 hours 15 minutes = 7.25 h |
| 20 | 0.333… | 7 hours 20 minutes ≈ 7.33 h |
| 30 | 0.50 | 7 hours 30 minutes = 7.50 h |
| 45 | 0.75 | 7 hours 45 minutes = 7.75 h |
To go the other way, multiply the decimal by 60: 0.75 × 60 = 45 minutes.
Add a week, then overtime
Add every shift in the workweek, then split regular and overtime hours. Under the usual U.S. federal rule, overtime starts after 40 hours in a single workweek, at 1.5 times the regular rate. Weeks are not averaged together.
Example: you earn $20 an hour and work 50 hours in one week.
- Regular: 40 × $20 = $800
- Overtime: 10 × $20 × 1.5 = $300
- Gross pay: $1,100
If the next week is only 30 hours, that week has no overtime. The two weeks together are 80 hours, but you still have 10 overtime hours from week one, not zero. See the overtime rules and examples for daily overtime and a two-week walkthrough.
Related guides
Hours worked with a lunch break · Overtime pay calculator and rules · Weekly timesheet template · Time card calculator
Questions people ask
How do I calculate hours worked from start and end times?
Subtract the start time from the end time to get the elapsed time, then subtract any unpaid break. 9:00 a.m. to 5:30 p.m. is 8 hours 30 minutes; a 30-minute unpaid lunch leaves 8 hours worked.
How do I convert minutes to decimal hours for payroll?
Divide the minutes by 60. 15 minutes is 0.25 hours, 30 minutes is 0.50, 45 minutes is 0.75, so 7 hours 45 minutes is 7.75 hours.
What if my shift goes past midnight?
Add 24 hours to the end time before you subtract. A shift from 10:00 p.m. to 6:30 a.m. is 8 hours 30 minutes, not a negative number.
Do I include my lunch break in hours worked?
Only if the lunch is paid. An unpaid lunch is subtracted from the elapsed time between clock-in and clock-out. A paid break usually stays in the total. Follow the rule your workplace uses.