How to Calculate Hours Worked (With Lunch Breaks and Overnight Shifts)

Start with a shift from 8:45 AM to 5:15 PM with a 30 minute unpaid lunch. Switch both times to a 24-hour clock (8:45 and 17:15), subtract to get 8 hours 30 minutes, take out the 30 minute lunch, and you’re left with 8 hours 0 minutes, which is 8.00 decimal hours for payroll. That’s how to calculate hours worked. Every timesheet problem is one of those steps done slightly wrong, and most of them happen in the first two.

Below is each step with the edge cases that cause errors. Lunches that aren’t really breaks. Shifts that cross midnight. Minutes that sneak into payroll as the wrong decimal, which is the most expensive of the three because nobody notices it.

Step 1: Convert to 24-hour time

Subtracting 12-hour times is where most mistakes start, because 5:15 minus 8:45 looks like a negative number. A 24-hour clock removes AM and PM:

  • Morning times stay the same: 8:45 AM is 8:45.
  • Afternoon and evening times add 12 hours: 5:15 PM is 17:15, 11:30 PM is 23:30.
  • 12:00 noon is 12:00. 12:00 midnight is 0:00 (or 24:00 when it ends a shift).

If you need a reference, the military time converter has a full chart.

Step 2: Subtract the start time from the end time

Subtract hours from hours and minutes from minutes. When the end minutes are smaller than the start minutes, borrow one hour as 60 minutes.

Example: 17:15 minus 8:45.

  • Minutes: 15 is less than 45, so borrow an hour. 17:15 becomes 16:75.
  • 16:75 minus 8:45 = 8 hours 30 minutes.

Don’t subtract the times as decimals. 17.15 minus 8.45 is 8.70, which looks like 8 hours 42 minutes and is wrong by 12 minutes. The hours calculator does this subtraction for any pair of times if you want to check your arithmetic.

Step 3: Subtract unpaid breaks (and only unpaid ones)

Federal law doesn’t require employers to give breaks at all. But when breaks happen, the rules decide which ones come off the total:

  • Short breaks of about 5 to 20 minutes count as hours worked. The regulation on rest periods says they’re customarily paid and must be counted. Don’t subtract coffee breaks.
  • Bona fide meal periods don’t count. Under 29 CFR 785.19, ordinarily 30 minutes or more is long enough, and the employee has to be completely relieved from duty.
  • A “lunch” spent working isn’t a break. If you eat at your desk while answering the phone or watching the front counter, you weren’t relieved from duty, and that time is work time.

So a shift with a 30 minute lunch and two 10 minute breaks loses 30 minutes, not 50. Our example: 8 hours 30 minutes minus the 30 minute lunch leaves 8 hours 0 minutes.

Watch out for automatic deductions. Many timekeeping systems take 30 minutes off every shift on the assumption that lunch happened. If an employee worked through it, the deduction should be reversed. Several states also have their own meal and rest break rules that are stricter than the federal ones, so check yours.

The time card calculator with lunch break handles clock in, lunch out, lunch in and clock out in one row.

Overnight shifts that cross midnight

When the end time is smaller than the start time, the shift crossed midnight. Add 24 hours to the end time before you subtract.

Example: 10:00 PM to 6:30 AM with a 30 minute meal break.

  1. In 24-hour time: start 22:00, end 6:30.
  2. End is smaller than start, so add 24: 6:30 becomes 30:30.
  3. 30:30 minus 22:00 = 8 hours 30 minutes.
  4. Minus the 30 minute meal: 8 hours 0 minutes.

Two complications come up with night work. The first is the workweek. Your employer’s workweek is a fixed, recurring period of 168 hours, and hours count in the workweek in which they’re worked. If the workweek ends at midnight Saturday and a shift runs from 10:00 PM Saturday to 6:30 AM Sunday, two of those hours belong to one week and the rest to the next, which can change overtime.

The second is daylight saving time. On the night clocks spring forward, a shift from 10:00 PM to 6:00 AM is only 7 hours of actual work. On the night they fall back, the same shift is 9. Pay follows the hours actually worked, not the clock face. The next changes are Sunday, March 14, 2027 and Sunday, November 7, 2027.

Step 4: Convert minutes to decimal hours

Payroll systems multiply hours by a rate, and they need hours as decimals. Divide the minutes by 60:

Minutes Decimal Minutes Decimal
5 0.08 35 0.58
10 0.17 40 0.67
15 0.25 45 0.75
20 0.33 50 0.83
25 0.42 55 0.92
30 0.50 60 1.00

So 8 hours 20 minutes is 8.33 hours, not 8.20. The difference looks tiny until you multiply it across a year. At $20 an hour, writing 8.20 instead of 8.33 every day underpays $2.60 a day, about $650 over 250 working days. The minutes to decimal converter has every minute from 1 to 60.

Some employers round clock times to the nearest 5, 6 or 15 minutes instead of converting exact minutes. Federal rules accept rounding only when it averages out over time so employees are paid for all the time they actually work. The time clock rounding guide explains how the 7-minute rule works.

Step 5: Add up the week and check for overtime

Total each day in decimal hours, then add the week. Under the FLSA, non-exempt employees get time and a half for hours worked over 40 in a workweek. Paid holidays and vacation hours don’t count toward the 40 unless your employer’s policy says they do.

A worked week at $18.00 an hour:

Day In Out Unpaid meal Hours
Monday 8:00 16:30 0:30 8.00
Tuesday 7:45 16:30 0:30 8.25
Wednesday 7:30 17:30 0:30 9.50
Thursday 8:15 16:30 0:30 7.75
Friday 8:00 17:00 0:30 8.50
Week 42.00

That’s 40 regular hours and 2 overtime hours. Pay: 40 × $18.00 = $720.00, plus 2 × $27.00 = $54.00, for $774.00 gross. A few states also have daily overtime rules, which can change the split; the daily overtime calculator covers those.

To skip the arithmetic, enter the times in the time card calculator and it does all five steps, including overtime, for a full week.

How to calculate hours worked without the usual mistakes

  • Subtracting times written as decimals (17.15 minus 8.45) instead of hours and minutes.
  • Writing 8:30 as 8.30 in a payroll column. It’s 8.50.
  • Deducting short breaks that should be paid.
  • Auto-deducting a lunch that didn’t happen.
  • Forgetting the extra 24 hours for an overnight shift and getting a negative total.
  • Counting a paid holiday toward the overtime threshold when the policy doesn’t.

If you track your own hours, write down actual in and out times every day rather than estimating at the end of the week. A pay dispute is much easier to settle with a daily record than with memory. A free weekly timesheet template has the columns already set up.

Sources

Written by

Anna Tang is editor / payroll content lead at WorkweekMath.com. She has 10 years of experience in payroll administration, HR, accounting, software for time tracking…. certification such as CPP from PayrollOrg, SHRM-CP, CPA, EA. At WorkweekMath, Anna writes and reviews guides on all topics, working from DOL, IRS and state agency sources. She built the site’s calculators and checks every pay example by hand.