Quick answer: To calculate hours worked, subtract the start time from the end time, then subtract any unpaid breaks. Convert the leftover minutes to decimal by dividing by 60. A shift from 8:30 AM to 5:15 PM with a 30-minute unpaid lunch is 8 hours 45 minutes minus 30 minutes = 8 hours 15 minutes, or 8.25 hours.
The hours worked formula
hours worked = (end time − start time) − unpaid breaksThen divide any leftover minutes by 60 to get decimal hours.- Write both times in 24-hour format. 5:15 PM becomes 17:15. This removes AM and PM mistakes.
- Subtract the start from the end. 17:15 − 8:30 = 8 hours 45 minutes. If the minutes go negative, borrow 60 minutes from the hours.
- Subtract unpaid breaks. 8:45 − 0:30 = 8 hours 15 minutes.
- Convert to decimal. 15 ÷ 60 = 0.25, so the shift is 8.25 hours.
Calculate one shift
An end time earlier than the start time is treated as an overnight shift.
Hours worked
8.25hours
For a full week with a different break every day, the hours worked calculator totals each shift and the week.
Paid breaks versus unpaid breaks
Only unpaid breaks come off the total. Under federal rules the difference depends on length and whether the employee is truly off duty.
| Break type | Federal treatment | Subtract it? |
|---|---|---|
| Rest break, 5 to 20 minutes | Counted as hours worked (29 CFR 785.18) | No |
| Meal period, usually 30 minutes or more, fully relieved of duty | Not work time (29 CFR 785.19) | Yes |
| Meal period while still answering phones or watching equipment | Work time, because the employee is not relieved | No |
| On-call time at the workplace | Generally work time | No |
Federal law does not require breaks, but many states do. California, for example, requires a 30-minute meal period for shifts over five hours and paid 10-minute rest breaks for every four hours worked or major fraction of four hours.
Overnight shifts that cross midnight
When the end time is earlier than the start time, the shift ran past midnight. Add 24 hours to the end time before subtracting.
Example: a night shift
- Start 22:00 (10:00 PM), end 06:30 (6:30 AM).
- 06:30 is earlier than 22:00, so add 24 hours: 30:30.
- 30:30 − 22:00 = 8 hours 30 minutes.
- Subtract a 30-minute unpaid meal: 8 hours 0 minutes.
Result: 8.00 hours
In a spreadsheet, the MOD function handles midnight automatically: =MOD(B2-A2,1)*24 returns decimal hours whether or not the shift crosses midnight.
Adding up a weekly timesheet
Work out each day in minutes, add them together, then convert once. Rounding each day separately can shift the total by a few minutes.
| Day | In | Out | Unpaid break | Worked | Decimal |
|---|---|---|---|---|---|
| Mon | 8:00 | 16:30 | 30 min | 8 h 00 min | 8.00 |
| Tue | 8:05 | 16:40 | 30 min | 8 h 05 min | 8.08 |
| Wed | 7:55 | 17:10 | 45 min | 8 h 30 min | 8.50 |
| Thu | 8:00 | 16:20 | 30 min | 7 h 50 min | 7.83 |
| Fri | 8:10 | 15:00 | 30 min | 6 h 20 min | 6.33 |
| Total | 38 h 45 min | 38.75 |
The weekly total is 38 hours 45 minutes, or 38.75 hours. Note that adding the rounded decimals day by day (8.00 + 8.08 + 8.50 + 7.83 + 6.33) gives 38.74, one hundredth short, which is why the total should be converted from minutes.
Split shifts and multiple punches
For a split shift, calculate each block separately and add them. A shift of 7:00 to 11:00 and 16:00 to 20:30 is 4 hours plus 4 hours 30 minutes, 8 hours 30 minutes in total. The gap between blocks is not work time unless the employee is required to stay on duty.
Excel and Google Sheets formulas
// Start in A2, end in B2, unpaid break minutes in C2
=(B2-A2)*24-C2/60
// Same, but safe for overnight shifts
=MOD(B2-A2,1)*24-C2/60
// Weekly total of decimal hours in D2:D8
=SUM(D2:D8) Format the time columns as Time and the result column as Number with two decimals. If a cell shows a strange time instead of a number, the result is still formatted as Time.
Mistakes that cost money
- Deducting paid rest breaks. A 15-minute coffee break is paid time under federal rules.
- Mixing AM and PM. 8:00 to 5:00 is 9 hours, not −3. Use 24-hour times.
- Treating minutes as decimals. 7 hours 30 minutes is 7.50, not 7.30.
- Ignoring pre-shift work. Required meetings, logging in and safety checks count as hours worked.
- Rounding every punch in one direction. See the time clock rounding rules.
Frequently asked questions
How do I calculate hours worked in a day?
Subtract the start time from the end time, then subtract unpaid breaks. 9:00 AM to 5:30 PM with a 30-minute unpaid lunch is 8 hours 30 minutes minus 30 minutes, which is 8 hours.
How many hours is 8 AM to 5 PM?
9 hours. With a 1-hour unpaid lunch it is 8 hours worked, and with a 30-minute unpaid lunch it is 8.5 hours.
How do I calculate hours for a shift that crosses midnight?
Add 24 hours to the end time before subtracting. 10 PM to 6 AM becomes 22:00 to 30:00, which is 8 hours.
Are 15-minute breaks paid?
Under federal rules, rest breaks of 5 to 20 minutes are counted as hours worked, so they are paid and should not be subtracted.
How do I convert hours and minutes to decimal hours?
Divide the minutes by 60 and add them to the hours. 7 hours 45 minutes is 7 + 45 ÷ 60 = 7.75 hours.
What Excel formula calculates hours worked?
With start in A2 and end in B2, use =MOD(B2-A2,1)*24 for decimal hours. Subtract unpaid break minutes divided by 60.
Keep going
This guide explains federal hours-worked principles in general terms. State break laws and company policies differ, so confirm the rules that apply to you.
Content Lead, Anchor AI Tools, California, USA. Spotted an error? Email hello@anchoraitools.com and it will be checked and corrected. See our editorial standards.