How to calculate hours worked
A step-by-step method for working out your hours from clock times — including lunch breaks, shifts past midnight and decimal hours for payroll — with worked examples you can follow.
On this page
Calculating hours worked comes down to one subtraction per shift — but there are four traps: AM and PM, minutes that carry at 60, shifts that cross midnight, and turning hours and minutes into decimals for payroll. Here's a method that avoids all of them.
Step 1: Write each time in 24-hour format
Converting to the 24-hour clock removes AM and PM from the math. Morning times stay the same; for afternoon and evening times, add 12 to the hour.
| Standard | 24-hour | Standard | 24-hour |
|---|---|---|---|
| 7:30 AM | 7:30 | 1:15 PM | 13:15 |
| 11:45 AM | 11:45 | 5:30 PM | 17:30 |
| 12:00 PM (noon) | 12:00 | 11:00 PM | 23:00 |
| 12:30 AM | 0:30 | 12:00 AM (midnight) | 0:00 |
The military time converter has the full chart.
Step 2: Subtract the time in from the time out
Subtract the hours and the minutes separately. If the minutes come out negative, borrow one hour as 60 minutes.
Example: in at 8:50 AM, out at 5:20 PM
- In 24-hour time: 17:20 − 8:50.
- 20 minutes − 50 minutes doesn't go, so borrow an hour: 16:80 − 8:50.
- 16 − 8 = 8 hours; 80 − 50 = 30 minutes. 8 hours 30 minutes at work.
Step 3: Subtract unpaid breaks
Take out breaks you're not paid for — usually a meal break of 30 minutes or more. Under federal rules, short rest breaks of about 5 to 20 minutes count as time worked and stay in. In the example, a 30-minute unpaid lunch leaves 8 hours.
If you clock out and back in for lunch, you can also work out each part of the day separately and add them: 8:50–12:30 is 3 hours 40 minutes, 1:00–5:20 is 4 hours 20 minutes, together 8 hours.
Step 4: Handle shifts that cross midnight
When the time out is earlier than the time in, the shift ended the next day. Add 24 hours to the time out before subtracting.
Example: a night shift from 10:00 PM to 6:30 AM
- 22:00 to 6:30 — the out time is earlier, so use 6:30 + 24:00 = 30:30.
- 30:30 − 22:00 = 8 hours 30 minutes.
Step 5: Convert to decimal hours
Payroll multiplies hours by a rate, so it needs decimal hours. Divide the minutes by 60 and add them to the hours. Don't just put a decimal point between hours and minutes — 8:30 is 8.5 hours, not 8.30.
See every value from 1 to 60 minutes in the minutes to decimal chart.
Step 6: Add up the week
Add the daily totals in hours and minutes (carrying every 60 minutes into an hour) or in decimals. Both give the same answer if you're careful.
| Day | In | Out | Break | Hours | Decimal |
|---|---|---|---|---|---|
| Mon | 8:50 AM | 5:20 PM | 30 min | 8:00 | 8.00 |
| Tue | 9:00 AM | 5:45 PM | 30 min | 8:15 | 8.25 |
| Wed | 9:05 AM | 5:30 PM | 30 min | 7:55 | 7.92 |
| Thu | 8:45 AM | 6:15 PM | 45 min | 8:45 | 8.75 |
| Fri | 9:00 AM | 4:00 PM | 30 min | 6:30 | 6.50 |
| Total | 39:25 | 39.42 |
The decimals add up to 39.42 here; adding the rounded daily decimals can differ by a hundredth or two from converting the exact total, which is why payroll usually converts the weekly total in minutes.
Step 7: Work out overtime and pay
Under federal law, hours over 40 in the workweek are overtime at time and a half. The week above has none. If you'd worked 44 hours at $20 an hour, you'd earn 40 × $20 + 4 × $30 = $920. Some states also have daily overtime — see overtime rules by state.
Skip the arithmetic: the time card calculator does every step above for a full week, including overnight shifts, rounding and state overtime rules, and saves your times for next week.
Frequently asked questions
How do I calculate hours worked in Excel?
Enter times as times (8:50 AM), subtract the start from the end (=C2-B2), subtract the break as a time (=C2-B2-TIME(0,30,0)), and multiply by 24 to get decimal hours. For overnight shifts use =MOD(C2-B2,1).
Should I round my hours?
Only if your employer rounds. Federal rules allow rounding to the nearest 5 minutes, tenth or quarter hour if it averages out over time. Otherwise use exact minutes.
Do paid breaks count as hours worked?
Yes. Short rest breaks of about 5 to 20 minutes are work time under federal rules. Only unpaid meal periods are subtracted.
Sources
- 29 CFR 785.18 (rest), 785.19 (meal periods) and 785.48(b) (rounding), U.S. Department of Labor.
- U.S. Department of Labor, Fact Sheet #23: Overtime Pay Requirements of the FLSA.