Step 1: Convert the times to 24-hour format
AM and PM are the source of most errors, so remove them first. Hours from 1:00 PM to 11:59 PM get 12 added; 12:xx AM becomes 00:xx; 12:xx PM stays 12:xx; everything else is unchanged.
| 12-hour | 24-hour | 12-hour | 24-hour |
|---|---|---|---|
| 12:00 AM (midnight) | 00:00 | 12:00 PM (noon) | 12:00 |
| 6:30 AM | 06:30 | 1:15 PM | 13:15 |
| 8:15 AM | 08:15 | 5:40 PM | 17:40 |
| 11:45 AM | 11:45 | 11:30 PM | 23:30 |
The military time chart lists all 24 hours.
Step 2: Subtract start from end
Subtract hours and minutes separately. If the minutes go negative, borrow 60 from the hours. If the end time is earlier than the start time, the shift crossed midnight: add 24 hours to the end time first.
Example: 8:15 AM to 5:40 PM. 17:40 − 08:15: minutes 40 − 15 = 25, hours 17 − 8 = 9. Elapsed time 9 hours 25 minutes.
Example with borrowing: 6:50 AM to 3:20 PM. 15:20 − 06:50: minutes 20 − 50 is negative, so borrow: 14:80 − 06:50 = 8 hours 30 minutes.
Example overnight: 10:00 PM to 6:30 AM. 06:30 + 24:00 = 30:30; 30:30 − 22:00 = 8 hours 30 minutes.
Step 3: Deduct unpaid breaks
Subtract only breaks that are unpaid. Under federal law (29 CFR 785.19) a bona fide meal period, ordinarily 30 minutes or more, during which the employee is completely relieved of duty is not hours worked. Short rest breaks of about 5 to 20 minutes are hours worked under 29 CFR 785.18 and are not deducted. A lunch eaten at the desk while working is not deducted either.
Continuing the first example: 9:25 − 0:45 lunch = 8 hours 40 minutes. If the break was recorded as punches, use the actual punch length rather than the scheduled 30 minutes.
Step 4: Convert to decimal hours
Payroll multiplies hours by a rate, so minutes have to become a fraction of an hour: divide by 60. 8 hours 40 minutes = 8 + 40 ÷ 60 = 8.67 hours. 8 hours 30 minutes = 8.50. The full minutes to decimal chart covers every minute. Do not write 8.40 for 8 hours 40 minutes; 8.40 is 8 hours 24 minutes.
Step 5: Add up the week
Add the daily figures in hours and minutes and convert once at the end, or carry three decimals. Converting each day to two decimals and adding introduces rounding drift.
| Day | In | Out | Unpaid break | Hours (hh:mm) | Decimal |
|---|---|---|---|---|---|
| Monday | 8:15 AM | 5:40 PM | 45 min | 8:40 | 8.67 |
| Tuesday | 6:50 AM | 3:20 PM | 30 min | 8:00 | 8.00 |
| Wednesday | 8:00 AM | 6:15 PM | 30 min | 9:45 | 9.75 |
| Thursday | 8:00 AM | 4:30 PM | 30 min | 8:00 | 8.00 |
| Friday | 7:30 AM | 5:20 PM | 60 min | 8:50 | 8.83 |
| Total | 43:15 | 43.25 |
Minutes column: 40 + 0 + 45 + 0 + 50 = 135 minutes = 2 hours 15 minutes. Hours column: 8 + 8 + 9 + 8 + 8 = 41. Total 43 hours 15 minutes = 43.25 hours.
Step 6: Apply overtime
Under the FLSA, non-exempt employees receive 1.5 times the regular rate for hours over 40 in the workweek (29 U.S.C. 207(a)(1)). For the week above: 40 regular hours and 3.25 overtime hours. At $20 an hour: 40 × $20 + 3.25 × $30 = $800 + $97.50 = $897.50.
In California, Labor Code 510 also pays 1.5 times for hours over 8 in a day and 2 times over 12. Monday contributes 0.67 daily overtime hours, Wednesday 1.75 and Friday 0.83, a total of 3.25; the remaining 40 straight-time hours do not exceed 40, so nothing is added. The result matches the federal one here, but three 12-hour days would be 36 hours with no federal overtime and 12 hours of California overtime. The overtime calculator handles both rule sets.
Excel formulas for hours worked
Put the start time in B2, the end time in C2 and the break as a time value in D2 (for 45 minutes enter 0:45). Excel stores times as fractions of a day, so the formulas are simple:
- Hours worked in hh:mm:
=C2-B2-D2, with the cell formatted as[h]:mm. The square brackets let totals exceed 24 hours. - Hours worked in decimal:
=(C2-B2-D2)*24, formatted as a number with two decimals. - Overnight shift:
=MOD(C2-B2,1)-D2, which adds a day when the end time is before the start. - Weekly total:
=SUM(E2:E6)formatted as[h]:mm, or multiply by 24 for decimal. - Overtime hours:
=MAX(0,F7-40)where F7 holds the weekly decimal total.
Enter times with AM/PM or in 24-hour form so that Excel treats them as times. A row of hash signs means a negative result, usually an end time entered as AM instead of PM.
Common mistakes
- AM/PM mix-ups. 9:00 AM to 5:00 AM is 20 hours. 12:00 AM is midnight, 12:00 PM is noon.
- Overnight shifts without the 24-hour adjustment. 23:00 to 07:00 is 8 hours, not −16.
- Rounding each day before adding. Five days of 7:50 total 39:10 = 39.17, not 5 × 7.83 = 39.15.
- Reading decimals as minutes. 8.67 is 8 hours 40 minutes; 8.40 is 8 hours 24 minutes.
- Deducting paid breaks. Short rest breaks are hours worked under 29 CFR 785.18.
- Averaging workweeks. A biweekly period with 46 and 34 hours has 6 overtime hours; the FLSA threshold applies per workweek.
Frequently asked questions
How do I calculate hours worked from clock-in and clock-out?
Convert both times to 24-hour format, subtract the start from the end, and deduct unpaid breaks. 8:15 AM to 5:40 PM is 17:40 minus 08:15, which is 9 hours 25 minutes; minus a 45-minute lunch gives 8 hours 40 minutes. Convert to decimal by dividing the minutes by 60: 8.67 hours.
How do I calculate hours and minutes worked for a week?
Work out each day in hours and minutes, then add the hours column and the minutes column separately and carry every 60 minutes into an hour. 8:40, 8:00, 9:45, 8:00 and 8:50 give 41 hours and 135 minutes, which is 43 hours 15 minutes, or 43.25 in decimal. Convert to decimal only after adding.
How do I calculate time card hours with a lunch break?
Subtract the lunch from the elapsed time between clock-in and clock-out. If lunch is recorded as punches, use the actual punch length; if it is a fixed deduction, subtract that. Only unpaid meal periods during which you were completely relieved of duty are deducted. Short paid breaks stay in the total.
What is the formula for hours worked in Excel?
With start in B2, end in C2 and break in D2, use =C2-B2-D2 formatted as [h]:mm for hours and minutes, or =(C2-B2-D2)*24 formatted as a number for decimal hours. For shifts that cross midnight use =MOD(C2-B2,1)-D2. Keep the [h]:mm format on weekly totals so sums over 24 hours display correctly.
How do I convert hours worked to decimal?
Divide the minutes by 60 and add the result to the whole hours. 8 hours 40 minutes is 8 plus 40 divided by 60, which is 8.67. 7 hours 15 minutes is 7.25. Payroll uses decimal hours because they can be multiplied by an hourly rate directly, while hours and minutes cannot.
How are overnight hours worked calculated?
When the end time is earlier than the start time, add 24 hours to the end time before subtracting. 10:00 PM to 6:30 AM becomes 30:30 minus 22:00, which is 8 hours 30 minutes. Assign the whole shift to one day, usually the day it started, and apply the same rule every week.
Are breaks included in hours worked?
Short rest breaks of roughly 5 to 20 minutes are hours worked under 29 CFR 785.18 and are included. Bona fide meal periods of 30 minutes or more during which you are completely relieved of duty are not hours worked under 29 CFR 785.19 and are deducted. Working through lunch makes that time hours worked.
When does overtime start?
Under federal law, after 40 hours in a fixed workweek, at 1.5 times the regular rate for non-exempt employees. There is no federal daily threshold. California adds overtime after 8 hours in a day and double time after 12, and some other states have their own daily rules, so check the law where you work.
Related calculators
- Work Hours CalculatorEnter your start time, end time and unpaid breaks to get hours worked for a day, a week or a pay period in hh:mm and decimal hours. Overnight shifts, overtime and pay are handled automatically.
- Hours to Decimal Calculator and Minutes to Decimal ChartEnter a time in hours and minutes to get decimal hours, or enter decimal hours to get hours and minutes. The chart below lists every minute from 1 to 60.
- Time Card Calculator with Lunch and OvertimeFill in clock-in, clock-out and lunch for each day of a weekly or biweekly pay period. The time card totals hours in hh:mm and decimal, splits regular and overtime hours, and can be printed or exported.
- Hours Calculator: Add and Subtract Hours and MinutesAdd a list of hours and minutes, subtract one duration from another, and see the result in hh:mm, total minutes and decimal hours.