How to Calculate Hours Worked (Including Breaks & Overnight)
calendar_monthPublished 2026-08-15verified_userReviewed by Calculopedia editorial
Tracking your hours is simple subtraction — until overnight shifts, unpaid breaks and overtime get involved. Here's the complete method, from a single shift to a full weekly payroll, with worked examples you can copy.
The basic formula
Hours worked = (clock out − clock in) − break time
Everything else in this guide is just detail around that one line. Get the clock-in and clock-out right, subtract any unpaid break time, and you have the number that matters for your pay.
Worked example — a normal day shift
Clock in at 09:00, out at 17:00, with a 30-minute lunch:
17:00 − 09:00 = 8 hours
8 − 0.5 = 7.5 hours worked
That's 7 hours 30 minutes — or 7.5 in the decimal form most payroll systems use.
Converting minutes to decimal
Payroll rarely deals in "hours and minutes"; it needs a decimal. Divide the minutes by 60:
| Worked | Decimal |
|---|---|
| 7 h 30 m | 7.5 |
| 8 h 15 m | 8.25 |
| 6 h 45 m | 6.75 |
| 5 h 20 m | 5.33 |
The formula is decimal hours = hours + (minutes ÷ 60).
Overnight and cross-midnight shifts
If your shift crosses midnight, the clock-out value is smaller than the clock-in. The fix: add 24 hours to the clock-out before subtracting.
In: 23:00, Out: 07:00
07:00 + 24:00 = 31:00
31:00 − 23:00 = 8 hours
Subtract the break as usual: with a 30-minute break, that's 7.5 hours worked. This trips people up constantly because 07:00 minus 23:00 gives a nonsense negative number if you forget the +24.
Shifts that span two or more days
For a shift longer than 24 hours (unusual, but it happens in healthcare and emergency services), break it into calendar days:
- Day 1: 07:00 → 23:59 = 16 h 59 m (just under 17 h)
- Day 2: 00:00 → 19:00 = 19 h
- Total = ~36 h, minus breaks and any meal period in between.
Half-hours, quarter-hours and rounding
Some employers round to the nearest quarter-hour (15 minutes) or use the "7-minute rule": anything up to 7 minutes rounds down, 8+ minutes rounds up. If rounding is applied, calculate the exact time first, then round the decimal — never round each clock-in separately.
Friday-to-Monday weekend example
For payroll, rest the clock:
| Day | In | Out | Break (min) | Net |
|---|---|---|---|---|
| Mon | 09:00 | 17:30 | 30 | 8.0 |
| Tue | 09:00 | 17:30 | 30 | 8.0 |
| Wed | 09:00 | 17:00 | 30 | 7.5 |
| Thu | 09:30 | 17:30 | 30 | 7.5 |
| Fri (overnight) | 22:00 | 06:00 | 0 | 8.0 |
| Total | 39.0 |
That's 39.0 hours — below 40, so no overtime at a 40-hour threshold, but within 1 hour of it, which matters if this was a short week with a holiday.
Overtime: separate regular from premium hours
If your contract pays overtime (commonly 1.5× above 40 hours a week, or above 8 hours a day), split the totals:
- Regular hours: up to the threshold (e.g. 40/week).
- Overtime hours: everything above it.
Track regular and overtime separately from day one — retroactively reconstructing overtime from clock-in/out logs is error-prone.
Accurate tracking tips
- Record the exact minute of each clock in/out — don't round by hand.
- Subtract only unpaid breaks. Short breaks that are paid (a 10-minute coffee break) usually count as work.
- Sum each day, then sum the week. Watch for holidays and PTO — decide whether they count toward the weekly total (they usually do for overtime purposes) before computing overtime.
- Keep a paper or app trail. If you dispute a paycheck, your own records are your best evidence.
From hours to pay
Once you have your decimal hours, multiply by your hourly rate:
Pay = hours worked × hourly rate
For 39.0 hours at ₹400/hour: 39.0 × 400 = ₹15,600.
Get per-shift totals instantly with the Hours Worked Calculator, then convert to pay with the Hourly Rate Calculator.
Key takeaways
Hours worked = (clock out − clock in) − breaks.- Add 24 hours to clock-out for any shift crossing midnight.
- Convert minutes to decimal with
minutes ÷ 60. - Split regular vs overtime hours separately for accurate pay.
- Track exact clock times and keep your own records.