How to calculate hours worked
The method payroll uses, step by step, with a full week worked through.
What is the formula for hours worked?
The formula is clock-out time minus clock-in time, minus any unpaid breaks. Do that for each day and add the days up. A shift from 8:15 AM to 4:45 PM with a 30-minute unpaid lunch is 8 hours 30 minutes minus 30 minutes, which is exactly 8 hours.
Step 1: Put both times on the same clock
Most arithmetic mistakes on timesheets come from mixing AM and PM. Convert both times to the 24-hour clock first. Add 12 to any afternoon or evening hour, so 4:45 PM becomes 16:45. Morning times stay as they are, except anything from 12:00 to 12:59 AM, which becomes 0:00 to 0:59.
If you want plain numbers, go one step further and count minutes since midnight. Multiply the hour by 60 and add the minutes:
- 8:15 is 8 × 60 + 15 = 495 minutes
- 16:45 is 16 × 60 + 45 = 1,005 minutes
Step 2: Subtract the clock-in time from the clock-out time
1,005 − 495 = 510 minutes. Divide by 60 for hours: 510 ÷ 60 is 8 with 30 left over, so the shift spans 8 hours 30 minutes.
You can also subtract hours and minutes separately. When the clock-out minutes are smaller than the clock-in minutes, borrow an hour. For a shift from 9:40 to 17:15, 15 is less than 40, so rewrite 17:15 as 16:75. Then 16:75 − 9:40 = 7:35.
Step 3: Take off unpaid breaks
Not every break comes off. Under federal rules, short rest breaks of about 5 to 20 minutes are counted as hours worked (29 CFR 785.18). A meal period is not work time if you are completely relieved of duty, and it is ordinarily 30 minutes or longer (29 CFR 785.19). If you eat at your desk while answering the phone, that time is work time and should be paid.
In the example, the 30-minute lunch is unpaid: 510 − 30 = 480 minutes, or 8:00.
Some states set their own meal and rest break rules. The guide to unpaid lunch break rules covers them.
Step 4: Add up the week
Here is a realistic week with uneven punches:
| Day | In | Out | Unpaid break | Hours |
|---|---|---|---|---|
| Mon | 8:15 AM | 4:45 PM | 30 min | 8:00 |
| Tue | 8:02 AM | 5:10 PM | 30 min | 8:38 |
| Wed | 7:55 AM | 4:30 PM | 45 min | 7:50 |
| Thu | 8:10 AM | 6:25 PM | 30 min | 9:45 |
| Fri | 8:00 AM | 2:20 PM | none | 6:20 |
| Total | 40:33 |
There are two ways to add it up. In minutes: 480 + 518 + 470 + 585 + 380 = 2,433 minutes. That is 40 hours (2,400 minutes) plus 33 minutes. Or add the hours and minutes in separate columns: 8 + 8 + 7 + 9 + 6 = 38 hours, and 0 + 38 + 50 + 45 + 20 = 153 minutes. 153 minutes is 2 hours 33 minutes, so the total is 40:33 either way.
Step 5: Convert to decimal hours for payroll
Payroll systems usually want decimal hours. Divide the leftover minutes by 60: 33 ÷ 60 = 0.55. The week is 40.55 hours.
A common mistake is to write 40:33 as 40.33. That drops 0.22 hours, about 13 minutes. Here those minutes are overtime, so at $20.00 an hour the mistake costs 0.22 × $30.00 = $6.60.
Step 6: Work out the pay
Under the Fair Labor Standards Act, hours over 40 in a workweek are paid at no less than 1.5 times the regular rate (29 U.S.C. 207(a)(1)). Each workweek is counted on its own (29 CFR 778.104), so a short week can't offset a long one.
At $20.00 an hour:
- Regular: 40 × $20.00 = $800.00
- Overtime: 33 minutes at $30.00 an hour = 33 × $30.00 ÷ 60 = $16.50
- Gross: $816.50
Working from minutes avoids rounding errors. Rounding to decimals first and multiplying afterwards can be off by a few cents.
Overnight shifts
When a shift ends after midnight, the clock-out time is smaller than the clock-in time. Add 24 hours to the clock-out time before subtracting. For 10:00 PM to 6:30 AM: 6:30 + 24:00 = 30:30, and 30:30 − 22:00 = 8:30. In minutes: 390 + 1,440 − 1,320 = 510.
The calculator counts an overnight shift on the day it started. For overtime, what matters is which workweek the hours fall in. If a shift crosses the end of your workweek, the hours after the boundary belong to the next week.
Mistakes that cost money
- Reading 8.30 as 8 hours 30 minutes. In decimals, 8 hours 30 minutes is 8.50.
- Rounding each day before adding. Small roundings add up. Keep exact minutes until the end.
- Averaging two weeks. 44 hours plus 36 hours is not "80, so no overtime". The 44-hour week has 4 hours of overtime.
- Taking off short breaks. A 10-minute break is normally paid work time under federal rules.
Why keeping your own record helps
Employers covered by the FLSA must keep records of hours worked each workday and each workweek for non-exempt employees (29 CFR 516.2). Your own record is still worth having. If a paycheck looks short, a dated timesheet with in and out times is the first thing a payroll office or the Wage and Hour Division will ask for.
Open this week in the calculator
Last reviewed: Our sources and method
Frequently asked questions
How do I calculate hours worked in Excel?
Put the clock-in time in A2 and the clock-out time in B2, formatted as times. =(B2-A2)*24 gives decimal hours. For shifts that cross midnight, use =MOD(B2-A2,1)*24. To take off a break entered in minutes in C2, subtract C2/60.
How many hours is 9 to 5?
8 hours from 9:00 AM to 5:00 PM. With a 30-minute unpaid lunch it is 7.5 hours, and with a 1-hour unpaid lunch it is 7 hours. Paid breaks don't come off.
Do paid breaks count as hours worked?
Yes. Under federal rules, short breaks of about 5 to 20 minutes count as hours worked (29 CFR 785.18). Only bona fide meal periods, where you are fully relieved of duty, can be left out (29 CFR 785.19).
How do I convert 7 hours 20 minutes to decimal?
Divide the minutes by 60: 20 ÷ 60 = 0.33. Add the hours to get 7.33. To check, 0.33 × 60 = 19.8, which rounds back to 20 minutes.
Does my commute count as hours worked?
Normally no. Ordinary travel from home to work and back is not work time under federal rules (29 CFR 785.35). Travel between job sites during the workday is work time.