Hours calculator: work hours between two times
How many hours did you actually work today? You clocked in at 8:30 a.m., left at 5:00 p.m., took an hour for lun
- Accurate to the exact day
- Leap years handled for you
- No spreadsheets or manual counting
Hours calculator: work hours between two times
Enter your numbers and press Calculate
How to use the hours calculator
The calculator works in 24-hour format and splits each time into two fields (hour and minutes), which keeps a.m./p.m. confusion out of the picture — 5:00 p.m. is simply hour 17.
1. Start time: the hour (0-23) and minutes (0-59) when you clock in. For 8:30 a.m.: hour 8, minutes 30. 2. End time: when you clock out. For 5:00 p.m.: hour 17, minutes 0. If you finish after midnight (an overnight shift), just enter the actual end time — the calculator detects the midnight crossover automatically. 3. Break: the unpaid minutes you want to deduct, typically lunch. U.S. federal law does not require meal breaks, but when employers offer bona fide meal periods of 30 minutes or more, they are usually unpaid — which is exactly why you subtract them here. 4. Results: you get the total as a decimal (7.50 = seven and a half hours), ready to multiply by your hourly rate for payroll, and the breakdown in hours and minutes (7 h 30 min) for your timesheet.
One detail: if the break is longer than the time between start and end, the result clamps to 0 instead of going negative.
The formula behind the hours calculation
Everything is computed in minutes — the most reliable way to do arithmetic with times of day. The formula in plain text:
start_minutes = start_hour × 60 + start_minute end_minutes = end_hour × 60 + end_minute raw = end_minutes − start_minutes if raw < 0 → raw = raw + 1440 (the shift crosses midnight; 1440 is the number of minutes in a day) net = raw − break (floored at 0) decimal_hours = net ÷ 60 hours = floor(net ÷ 60); minutes = net − hours × 60
Worked numeric example: clock in at 8:30 a.m., clock out at 5:00 p.m., 60-minute lunch.
- start_minutes = 8 × 60 + 30 = 510
- end_minutes = 17 × 60 + 0 = 1,020
- raw = 1,020 − 510 = 510 minutes
- net = 510 − 60 = 450 minutes
- decimal_hours = 450 ÷ 60 = 7.50 hours
- breakdown: 7 h 30 min
At $18 an hour, that day is worth 7.5 × 18 = $135 gross. The 1,440-minute step is what makes overnight shifts work: from 10 p.m. to 6 a.m., raw comes out at −960; adding 1,440 leaves 480 minutes, i.e. 8 hours before the break is deducted.
Worked examples of hours calculations
Three common situations in the U.S., all solved with the same formula:
- Standard 9-to-5 with lunch: clock in 8:30 a.m., clock out 5:00 p.m., 60-minute lunch. Raw: 1,020 − 510 = 510 minutes; net: 450 → 7.50 hours (7 h 30 min). At $18 an hour, that is $135 for the day.
- Part-time morning shift: in at 8:15 a.m., out at 2:45 p.m., 20-minute break. Raw: 885 − 495 = 390; net: 370 → 6.17 hours (6 h 10 min).
- Overnight shift: in at 10:00 p.m., out at 6:00 a.m., 45-minute break. Raw goes negative (360 − 1,320 = −960); add 1,440 → 480; net: 435 → 7.25 hours (7 h 15 min).
Decimal-format tip: minutes get divided by 60, not written after the point. 7 h 30 min is 7.50 hours, not 7.30 — the single most common timesheet mistake. And for payroll context: a two-week timesheet of ten 7.5-hour days adds up to exactly 75 hours; under the FLSA, overtime pay at time and a half only kicks in beyond 40 hours in a single workweek, so a 37.5-hour week stays at the regular rate.
Frequently asked questions
Does it work for overnight shifts that cross midnight?
Yes. When the end time is earlier than the start time (say, you clock in at 10:00 p.m. and out at 6:00 a.m.), the calculator assumes the shift crosses midnight and automatically adds 1,440 minutes (a full day) before subtracting the break. No special steps needed — enter the times exactly as they appear on your time clock.
How do I convert minutes into decimal hours?
Divide the minutes by 60. So 15 minutes is 0.25 hours; 30 minutes is 0.50; 45 minutes is 0.75; and 48 minutes is 0.80. That is why a 7 h 30 min day equals 7.50 decimal hours, not 7.30. Decimal format is what spreadsheets and payroll systems use, because it can be multiplied directly by an hourly rate — 7.50 × $18 = $135, no conversion gymnastics required.
Does the lunch break count as time worked?
As a general rule in the U.S., no: bona fide meal periods of 30 minutes or more are typically unpaid and excluded from hours worked, while short rest breaks of 5 to 20 minutes must usually be paid under FLSA rules. That is why the calculator lets you decide how many minutes to deduct — enter 0 if your break is paid. This is general information, not legal or employment advice; check your state law and your employment agreement for your specific case.
Why is the result 0 when I enter a very long break?
Because the break you entered is equal to or longer than the time between clock-in and clock-out. The net would be negative, which makes no sense on a timesheet, so the calculator floors it at 0. Double-check that the break is in minutes (60, not 1, for one hour) and that the start and end times are right.
About this calculator
ch — and suddenly the mental math gets fuzzy. This hours calculator does it instantly: enter your start time, end time and break minutes, and you get the exact total in hours and minutes plus the decimal format (7.50 instead of 7 h 30 min) that payroll software and timesheets use. That decimal number matters: multiply it by your hourly rate and you know exactly what your paycheck should say — 7.5 hours at $18 an hour is $135 before taxes. It also handles overnight shifts that cross midnight, so a 10 p.m. to 6 a.m. shift comes out right every time.