Payroll & Timesheets · How-To
How to Calculate Hours Worked (With Examples)
Get a break subtraction or an overnight shift wrong and a timesheet is off by real money, not just a rounding error. Here is the exact formula for turning a clock-in and clock-out time into hours worked, with worked examples for a plain shift, a lunch break, an overnight shift, and a full week.
Key takeaways
- The formula is hours worked = clock-out − clock-in − unpaid breaks. Nothing else changes it.
- Only unpaid breaks get subtracted. A paid break stays inside the total.
- For an overnight shift, add a full day to the clock-out time before subtracting, so the result comes out positive instead of negative.
- A weekly total is just the sum of each day's already-net hours worked — never re-subtract breaks at the weekly level.
- Once you have hours worked, decimal conversion, rounding, and overtime are separate steps, each covered in its own guide.
A shift runs from 8:30 AM to 4:30 PM, with a 30-minute unpaid lunch in the middle. How many hours does that person get paid for? Most people can eyeball this one — eight hours, minus half an hour, is 7.5. But swap in a break that overlaps two different clock-in systems, a shift that runs past midnight, or five different days that all need adding together, and the same simple subtraction starts producing wrong numbers, usually without anyone noticing until payroll runs.
This guide gives you the exact formula behind "hours worked," walks through it with a plain shift, a shift with a break, and an overnight shift, then shows how those daily totals combine into a weekly figure. If you just need a number right now, the hours calculator does the arithmetic directly; if you want to be able to check it yourself, read on.
01What counts as "hours worked"
"Hours worked" means paid time only — the stretch between clock-in and clock-out, minus any stretch inside that shift the person wasn't being paid for. A paid break (a short rest break that policy or law treats as compensated) is not subtracted, because it's still paid time; only an unpaid break, most commonly a lunch period, comes out of the total. Getting that distinction backwards — subtracting a paid break, or forgetting to subtract an unpaid one — is the single most common error in this calculation, and it shows up again in the mistakes section below.
This guide focuses specifically on turning a clock-in, a clock-out, and a break length into a number of hours. If what you actually need is the raw span between two clock times with no payroll context — no breaks, no weekly total — that narrower calculation is covered on its own in how to calculate the duration between two times.
02The formula
Three steps, in order:
- Step 1 — Raw duration. Subtract the clock-in time from the clock-out time.
- Step 2 — Subtract unpaid breaks. Take away any unpaid break time inside that shift. Paid breaks are left alone.
- Step 3 — That's hours worked. What remains is the number to record for that shift.
As one line: hours worked = (clock-out − clock-in) − unpaid breaks. If the shift crosses midnight, handle Step 1 by treating the clock-out time as belonging to the next day before subtracting — covered with a full example further down — rather than letting the subtraction go negative.
03Try the calculator
Enter a clock-in time, a clock-out time, and any unpaid break minutes. The result updates as you type, in both hours-and-minutes and decimal form. It handles overnight shifts automatically — if clock-out is earlier than clock-in, it assumes the shift ran into the next day.
Hours worked
—
For a full weekly timesheet
This box handles one shift at a time. To log and total several days at once, use the time card calculator.
04Example: a plain shift, no break
Worked example · 9:00 AM to 5:00 PM, no break
- Clock-in 9:00 AM, clock-out 5:00 PM. Raw duration: 5:00 PM − 9:00 AM = 8 hours.
- No unpaid break to subtract.
Result:8.00hours worked.
05Example: a shift with an unpaid lunch break
Worked example · 8:30 AM to 4:30 PM, 30-minute unpaid lunch
- Clock-in 8:30 AM, clock-out 4:30 PM. Raw duration: 8 hours.
- Subtract the unpaid 30-minute lunch: 8:00 − 0:30 = 7 hours 30 minutes.
Result:7.5hours worked.
If that same lunch were paid rather than unpaid — some workplaces treat short breaks as compensated — Step 2 would be skipped entirely, and the result would stay at 8 hours. The break's length never changes; whether it's paid is what decides whether it's subtracted.
06Example: an overnight shift
Overnight shifts are where the plain subtraction breaks: clock-out is a smaller number than clock-in, because the clock has wrapped around past midnight onto the next day. The fix is to treat the clock-out time as belonging to the following day before subtracting, which is the same as adding 24 hours to it first.
Worked example · 10:00 PM to 6:00 AM, 15-minute unpaid break
- Clock-in 10:00 PM, clock-out 6:00 AM the next day. Naive subtraction gives a negative number, so add 24 hours to the clock-out time first: 6:00 AM becomes
30:00. - Raw duration: 30:00 − 22:00 = 8 hours.
- Subtract the unpaid 15-minute break: 8:00 − 0:15 = 7 hours 45 minutes.
Result:7.75hours worked.
The overnight trap
Forgetting to roll the clock-out time onto the next day is the fastest way to produce a nonsense negative number, or — worse — a "corrected" total that's 24 hours off in the other direction. If the raw subtraction ever comes out negative, that's the signal the shift crossed midnight, not a sign something else is wrong.
07Totaling a full week
A weekly total is nothing more than the sum of each day's already-net hours worked. Calculate every day's figure using the same formula above — duration minus that day's unpaid breaks — and then add the daily results together. Don't subtract breaks a second time at the weekly level; they've already been removed once, day by day.
| Day | Clock-in | Clock-out | Unpaid break | Hours worked |
|---|---|---|---|---|
| Monday | 9:00 AM | 5:00 PM | — | 8.00 |
| Tuesday | 8:30 AM | 4:30 PM | 30 min | 7.50 |
| Wednesday | 9:00 AM | 5:00 PM | — | 8.00 |
| Thursday | 10:00 PM | 6:00 AM | 15 min | 7.75 |
| Friday | 9:00 AM | 3:30 PM | — | 6.50 |
| Week total | 37.75 |
For guidance on the format a weekly timesheet is actually submitted in — which columns, how days are laid out, what a completed one looks like — see how to fill out a weekly timesheet correctly. This section is only about getting the arithmetic behind the numbers right.
08Common mistakes to avoid
- Forgetting to subtract an unpaid break — the raw clock-in-to-clock-out span isn't hours worked if any of it was unpaid.
- Subtracting a paid break by mistake — treating compensated time as if it were unpaid understates the total.
- Not rolling an overnight clock-out onto the next day — leads to a negative duration or a result exactly 24 hours off.
- Mixing 12-hour times without checking AM/PM — an 8:00 entered as PM instead of AM shifts the whole calculation by 12 hours.
- Re-subtracting breaks at the weekly level — each day's break should only ever be removed once, when that day's total is calculated.
Calculate hours worked in one step
Enter a clock-in, clock-out, and break length — get the total in hours-and-minutes and decimal form instantly.
09Decimal hours, rounding, and overtime
Three things usually happen right after you know hours worked, and each has its own dedicated method rather than belonging here. Payroll systems typically store the total as a decimal — 7.5 rather than 7:30 — which is a distinct conversion covered in how to convert minutes to decimal hours for payroll. Many employers also round clock-in and clock-out times to the nearest interval before this calculation even starts, under rules explained in timesheet rounding and the 7-minute rule. And once a weekly total crosses a certain threshold, a separate overtime rate applies to the hours above it, which is worked through in how to calculate overtime hours and pay.
10Frequently asked questions
How do you calculate hours worked from a clock-in and clock-out time?
Subtract the clock-in time from the clock-out time to get the raw duration, then subtract any unpaid break time. What's left is hours worked.
Do you subtract paid breaks when calculating hours worked?
No. Only unpaid breaks are subtracted from the raw duration. A paid break is compensated time and stays inside the hours-worked total.
How do you calculate hours worked for an overnight shift that crosses midnight?
Add 24 hours to the clock-out time before subtracting the clock-in time, so a shift like 10:00 PM to 6:00 AM comes out to 8 hours instead of a negative number.
How do you total hours worked across a full week?
Calculate each day's net hours worked — duration minus unpaid breaks — individually, then add all of the daily totals together for the weekly total.
Should hours worked be recorded in HH:MM or decimal format?
Either works for the calculation itself, but payroll systems usually store the total in decimal hours, such as 7.5 instead of 7:30, which is a separate conversion step.