ClockBadge

How to Calculate Hours Worked (With Lunch, Overnight Shifts and Weekly Totals)

To calculate hours worked, subtract your start time from your end time, then subtract any unpaid lunch break. Convert the result to decimal hours by dividing the minutes by 60, and add up the days to get your weekly total.

7 min read ·

The hours worked formula in one line

Here is how to calculate hours worked for one shift. Take the time you clocked out. Subtract the time you clocked in. Then subtract any unpaid break. What is left is the time you get paid for.

Hours worked = end time − start time − unpaid breaks

That is the whole hours worked formula. The tricky parts are the details: minutes that do not divide neatly, shifts that cross midnight, and turning hours and minutes into a number your payroll system accepts. Each of those gets its own section below.

You need three numbers for every day: start time, end time and the length of your unpaid break. Write them down as you go, on a time card or in a notes app. Trying to remember them on Friday is how mistakes happen.

How to calculate hours worked step by step

The easiest way to avoid AM and PM confusion is to switch to 24-hour time first. In 24-hour time, 1:00 PM is 13:00, 5:15 PM is 17:15 and 11:00 PM is 23:00. Morning times stay the same.

  1. Write the start and end time in 24-hour time.
  2. Subtract the hours: end hour minus start hour.
  3. Subtract the minutes: end minutes minus start minutes.
  4. If the minutes come out negative, add 60 to the minutes and take 1 away from the hours.
  5. Subtract the unpaid break.
  6. Convert to decimal hours if you need a single number for pay.
Day shift with a 30-minute lunch
  • Start 8:30 AM (8:30)
  • End 5:15 PM (17:15)
  • 17:15 − 8:30 = 8:45
  • Break 0:30
  • Total 8:15 = 8.25 hours

Step 4 is where most people slip. Take a shift from 7:45 AM to 4:10 PM. In 24-hour time that is 7:45 to 16:10. The minutes are 10 − 45, which is negative. So add 60 to get 70 − 45 = 25 minutes, and take one hour off: 16 − 1 − 7 = 8 hours. The shift is 8 hours 25 minutes before any break.

How to subtract lunch from hours worked

To calculate hours worked with lunch, find the full span from clock-in to clock-out first, then subtract the unpaid lunch break as one block of minutes. It does not matter when the lunch happened. A 30-minute lunch at 11:00 or at 1:30 takes the same 30 minutes off the total.

If you clock out and back in for lunch, you can also work it as two pieces. Morning: 8:00 to 12:00 is 4:00. Afternoon: 12:30 to 4:45 PM is 4:15. Add them: 8:15. You get the same answer as 8:00 to 4:45 minus a 30-minute break.

Which breaks do you subtract?

Only subtract breaks that are unpaid. A meal break where you are fully off duty is usually unpaid. Short rest or coffee breaks are often paid, so they stay in your hours. If you eat at your desk while answering the phone, that time is usually work time.

Rules on paid and unpaid breaks, meal periods and overtime depend on your country, state and employment contract. Check your contract or local labor office for the rules that apply to you. The math here works the same either way.

How to calculate hours worked overnight

An overnight shift crosses midnight, so the end time looks smaller than the start time. If you subtract 22:00 from 6:30 you get a negative number. The fix is simple: add 24 hours to the end time.

Night shift from 10 PM to 6:30 AM
  • Start 10:00 PM (22:00)
  • End 6:30 AM (6:30 + 24:00 = 30:30)
  • 30:30 − 22:00 = 8:30
  • Break 0:30
  • Total 8:00 = 8.00 hours

Another way to think about it is to split the shift at midnight. From 22:00 to midnight is 2 hours. From midnight to 6:30 is 6 hours 30 minutes. Add them: 8 hours 30 minutes. Both methods give the same answer, so use whichever feels easier.

One thing to decide up front: which day does a night shift count on? Most workplaces count it on the day it started. Pick one rule and keep it, especially when shifts cross from Sunday into Monday and the week changes.

Convert hours and minutes to decimal

Payroll and pay calculations need decimal hours, not hours and minutes. To convert hours and minutes to decimal, divide the minutes by 60 and add the result to the hours. So 8 hours 15 minutes is 8 + 15 ÷ 60 = 8.25 hours.

A common mistake is to write 8:15 as 8.15. That is wrong. 8.15 hours is only about 8 hours 9 minutes. The difference looks tiny on one day but adds up over a month of shifts.

Hours and minutesDecimal hoursCommon mistake
7:157.257.15
7:307.507.30
7:457.757.45
8:108.178.10
8:208.338.20
8:408.678.40

How to calculate hours worked in a week

To get your hours worked in a week, calculate each day on its own, then add the days together. Add hours to hours and minutes to minutes. Every time the minutes reach 60 or more, take 60 away and add 1 to the hours.

Weekly time card, Monday to Friday
  • Mon 8:15
  • Tue 8:00
  • Wed 7:45
  • Thu 8:30
  • Fri 6:00
  • Total 38:30 = 38.5 hours

Here the hours add up to 37 and the minutes to 90. Ninety minutes is 1 hour 30 minutes, so the total hours worked is 38 hours 30 minutes, or 38.5 in decimal. You can also convert each day to decimal first and add those: 8.25 + 8 + 7.75 + 8.5 + 6 = 38.5. Same result.

Once you have the weekly total, check it against any overtime threshold that applies to you. Many employers use 40 hours per week, and some also count hours over 8 in a single day.

How to calculate hours worked for payroll

Once you have decimal hours, pay is a single multiplication: hours times hourly rate. If you worked 38.5 hours at $18 an hour, your gross pay is 38.5 × 18 = $693, before taxes and deductions.

If some hours are overtime, split the total into regular hours and overtime hours first, then multiply each part by its own rate. For 44 hours at $18 with time and a half after 40, that is 40 × 18 = $720 plus 4 × 27 = $108, for $828.

Rounding punches

Some employers round clock times to the nearest 5, 6 or 15 minutes. If yours does, apply the rounding to each punch before you do the math, and make sure it is applied the same way to clock-ins and clock-outs. When in doubt, keep the exact times on your own record.

Common mistakes when adding up total hours worked

  • Writing minutes as decimals, for example 7:45 as 7.45 instead of 7.75.
  • Mixing AM and PM, which can turn an 8-hour shift into a 20-hour one.
  • Getting a negative number on an overnight shift instead of adding 24 hours.
  • Subtracting paid rest breaks along with the unpaid lunch break.
  • Forgetting a day, or counting a night shift on two different days.
  • Adding minutes past 60 without carrying them over into hours.

A quick sanity check catches most of these. A normal day shift with lunch should land somewhere between 7 and 9 hours. If a day shows 3 hours or 15 hours, look at it again before you sign the time card.

Questions

How do I calculate my hours worked?

Subtract your start time from your end time, then subtract any unpaid break. For example, 8:30 AM to 5:15 PM is 8 hours 45 minutes. Minus a 30-minute lunch, that is 8 hours 15 minutes, or 8.25 decimal hours.

How do you calculate hours worked with a lunch break?

Work out the full time from clock-in to clock-out, then subtract the length of the unpaid lunch. A shift from 9:00 to 5:30 is 8 hours 30 minutes, and with a 30-minute unpaid lunch you worked 8 hours. Paid breaks are not subtracted.

How do you calculate hours for a shift that goes past midnight?

Add 24 hours to the end time, then subtract the start time. A shift from 10:00 PM to 6:00 AM becomes 30:00 minus 22:00, which is 8 hours. Then subtract any unpaid break as usual.

What is 8 hours and 15 minutes in decimal?

8 hours and 15 minutes is 8.25 hours. Divide the minutes by 60 to get the decimal part: 15 divided by 60 is 0.25. Do not write it as 8.15, which would underpay you by about 6 minutes.

How many hours is 9 to 5 with a 30-minute lunch?

9 to 5 with a 30-minute unpaid lunch is 7.5 hours. The span from 9:00 AM to 5:00 PM is 8 hours, and subtracting the half-hour lunch leaves 7 hours 30 minutes. Over five days that is 37.5 hours.

How do I add up hours worked in a week?

Calculate each day separately, then add the hours and minutes. Every 60 minutes becomes one more hour. Or convert each day to decimal hours first and add those numbers. Both methods give the same weekly total.

Keep reading

Your team can punch in on a tablet

ClockBadge Time Clock turns any tablet into a punch clock. Workers tap a badge, scan a QR code or pick their name. It keeps working without internet and adds up every hour for you.

See the time clockFree for up to 3 employees