Guide · Payroll basics

How to calculate hours worked: the formula, overnight shifts and the decimal mistake that costs money

By Alejandro, founder of CheckInGO Published: · Sources: FLSA and 29 CFR Parts 778 and 785 (US)
In short

Hours worked = finish time minus start time, minus any unpaid breaks. Do the subtraction on a 24-hour clock, then turn the leftover minutes into a decimal by dividing them by 60. Someone who works from 8:50 a.m. to 5:15 p.m. with a 30-minute unpaid lunch has worked 7 hours 55 minutes, which is 7.92 hours, not 7.55.

For a shift that ends after midnight, add 24 hours to the finish time before you subtract. In a spreadsheet, =MOD(end-start,1)*24 does it for you. Then add up the week: in the US, non-exempt employees are owed at least 1.5 times their regular rate for every hour over 40 in a workweek.

In this article

Working out how long someone worked sounds like something you learned at school. Then Friday comes, you have a stack of start and finish times, a few lunches that ran long, one shift that ended at 2 a.m., and a payroll deadline. That’s when small mistakes creep in, and the most common one isn’t in the subtraction. It’s in what people do with the minutes afterwards.

Here is the method we’d use by hand, the table that saves you from the decimal trap, and spreadsheet formulas you can copy.

The formula, step by step

  1. Write both times on a 24-hour clock. 8:50 a.m. stays 8:50. For p.m. times, add 12 to the hour: 5:15 p.m. becomes 17:15. This removes the a.m./p.m. confusion from the calculation.
  2. Subtract the start from the finish. 17:15 minus 8:50. If the finish minutes are smaller than the start minutes, borrow an hour: 17:15 is the same as 16:75, and 16:75 minus 8:50 is 8 hours 25 minutes.
  3. Take off unpaid breaks. 8:25 minus a 30-minute unpaid lunch leaves 7 hours 55 minutes. Only take off breaks that are genuinely unpaid; more on that below.
  4. Convert the minutes to a decimal. Divide the minutes by 60: 55 ÷ 60 = 0.92. So 7 hours 55 minutes is 7.92 hours.
  5. Multiply by the hourly rate, or add the day to the weekly total if overtime might apply.
One day, worked through
StepCalculationResult
Start and finish8:50 a.m. to 5:15 p.m.8:50 → 17:15
Time between17:15 − 8:508 h 25 min
Unpaid lunch8 h 25 min − 30 min7 h 55 min
Decimal7 + (55 ÷ 60)7.92 hours
Pay at $20/hour7.92 × 20$158.40

Minutes to decimal hours: the table

This is where most hand-calculated timesheets go wrong. Hours and minutes are not a decimal number. Seven hours and 55 minutes written as “7.55” looks right and is wrong by more than 20 minutes.

The decimal trap

7 h 55 min is 7.92 hours. Paid as 7.55, the employee loses 0.37 hours, about 22 minutes. At $18 an hour that’s $6.60 short for a single day. Over a month of similar days, it adds up to a wage claim waiting to happen.

MinutesDecimal hoursMinutesDecimal hours
50.08350.58
60.10400.67
100.17450.75
150.25500.83
200.33550.92
250.42601.00
300.50

Rounded to two decimals. For any other number of minutes, divide by 60.

Shifts that cross midnight

A shift from 10:00 p.m. to 6:30 a.m. breaks the simple subtraction, because 6:30 minus 22:00 gives a negative number. The fix is to add 24 hours to the finish time:

Night shift
StepCalculationResult
Start and finish10:00 p.m. to 6:30 a.m.22:00 → 6:30
Add 24 h to the finish6:30 + 24:0030:30
Time between30:30 − 22:008 h 30 min
Unpaid break8 h 30 min − 30 min8.00 hours

If you run night shifts in the US, it also helps to look at when your workweek starts. The FLSA lets it begin on any day and at any hour (29 CFR 778.105), so starting it at a time when nobody is on shift saves you from splitting a single night between two weeks.

Which minutes count as hours worked

The arithmetic is only as good as the start and finish times you feed it. Under the federal rules in the US, a few points catch out a lot of employers:

Outside the US the details differ, but the starting point is the same: the record has to show when people actually started and stopped. What each country expects you to keep, and for how long, is in how long to keep timesheets.

Adding up the week and working out overtime

Once each day is in decimal hours, the weekly total is a plain sum. For non-exempt employees in the US, the Fair Labor Standards Act requires at least 1.5 times the regular rate for every hour over 40 in a workweek.

Two details matter here. First, the workweek is “a fixed and regularly recurring period of 168 hours”, seven consecutive 24-hour periods. It doesn’t have to start on Monday, but once you set it, it stays fixed (29 CFR 778.105). Second, each week stands on its own: the Act “does not permit averaging of hours over 2 or more weeks” (29 CFR 778.104). Thirty hours one week and fifty the next means ten hours of overtime, not an average of forty.

A full week at $20/hour
DayStart → finishUnpaid breakHours
Mon8:00 → 17:0030 min8.50
Tue8:00 → 17:3030 min9.00
Wed7:45 → 16:3030 min8.25
Thu8:00 → 18:1545 min9.50
Fri8:00 → 16:0030 min7.50
Total42.75
Regular pay40 × $20$800.00
Overtime2.75 × $30$82.50
Week$882.50

Notice that no single day crossed 10 hours, yet the week still owes overtime. Also, the “regular rate” isn’t always the base hourly wage. Bonuses that aren’t excluded by law, such as many attendance or production bonuses, have to be added in when you work out the overtime rate (29 CFR 778.208). Some states, California being the best known, also have daily overtime. The country-by-country picture is in overtime rules in English-speaking countries.

Excel and Google Sheets formulas that work

Spreadsheets store a time as a fraction of a day, so 12:00 is 0.5. That’s why you multiply by 24 to get hours. Lay the sheet out like this, with start and finish entered as times and the unpaid break in minutes:

ColumnWhat goes in itExample
ADate10/26/2026
BStart time8:50 AM
CFinish time5:15 PM
DUnpaid break, in minutes30
EHours worked=ROUND(MOD(C2-B2,1)*24-D2/60,2)

A spreadsheet is fine for adding up. Its weak point is the input: times typed in at the end of the week, cells anyone can overwrite, and no record of what changed. We go through the alternatives in how to track employee hours.

Let the hours add themselves up

With CheckInGO each person clocks in and out with a personal code from their phone, a shared tablet or a computer, and the time comes from the server. Hours are added up for you, time beyond each person’s scheduled day is flagged as overtime, and corrections keep the original time. $19 a month for up to 10 employees and $2 for each extra one, plus any tax that applies. No contract, and 7 days free to try it with your team.

Try it free for 7 days

Frequently asked questions

How do I calculate hours worked?

Subtract the start time from the finish time, take off any unpaid breaks, and convert the leftover minutes to a decimal by dividing them by 60. From 8:50 a.m. to 5:15 p.m. with a 30-minute unpaid lunch is 7 hours 55 minutes, or 7.92 hours.

How do I convert minutes to decimal hours?

Divide the minutes by 60. 15 minutes is 0.25, 30 minutes is 0.50, 45 minutes is 0.75 and 55 minutes is 0.92. Never write hours and minutes as if they were a decimal: 7 hours 55 minutes is 7.92, not 7.55.

How do I calculate hours for a shift that ends after midnight?

Add 24 hours to the finish time, then subtract the start. From 10:00 p.m. to 6:30 a.m. is 30:30 minus 22:00, which is 8 hours 30 minutes. In Excel or Google Sheets, =MOD(end-start,1)*24 does the same thing.

Do breaks count as hours worked?

Under US federal rules, short rest breaks of about 5 to 20 minutes count as hours worked. A bona fide meal period, ordinarily 30 minutes or more, doesn’t count if the employee is completely relieved from duty. Other countries have their own rules on breaks.

Can I average hours over two weeks to avoid overtime?

Not under the FLSA in the US. Each workweek stands alone, and the rules don’t allow averaging hours over two or more weeks. Thirty hours one week and fifty the next means ten hours of overtime in the second week.

Information current as of 28 October 2026. US states and other countries can add their own rules, so use this as a guide rather than legal advice.

← Back to resources