Skip to main content
Everyday Calculators

How to Calculate Hours Worked (Breaks, Night Shifts and Overtime)

How to calculate hours worked: subtract start from end time, deduct breaks, handle shifts past midnight, convert to decimal hours and split out overtime.

Hours-worked example: clock in at 9:00, take a 30-minute break, clock out at 18:00, for a total of 8.5 hours
9:00 to 18:00 is 9 hours; minus the 30-minute break, that's 8.5 hours worked.Image: PDFSpeeder

To calculate hours worked, subtract the start time from the end time and take off any unpaid breaks: 08:45 to 17:20 with a 30-minute lunch is 8 hours 5 minutes, or 8.08 hours. The surest way to avoid mistakes is to turn both times into minutes first. Below is the method step by step, including shifts that cross midnight, converting minutes to decimal hours for pay, and how daily and weekly overtime rules change the result.

On this page

How to calculate hours worked: end minus start minus breaks

Hours worked = end time − start time − unpaid breaks

The minutes method

  1. Turn each time into minutes since midnight (hours × 60 + minutes): 08:45 is 525 and 17:20 is 1,040.
  2. Subtract: 1,040 − 525 = 515 minutes.
  3. Take off the break: 515 − 30 = 485 minutes.
  4. Turn it back into hours: 485 ÷ 60 = 8, with 5 minutes left over, so 8:05.

Borrowing an hour

You can also subtract the clock times directly. In 17:20 − 08:45, 20 minutes is less than 45, so borrow an hour and write 17:20 as 16:80. Then 16:80 − 08:45 = 8:35, and taking off the 30-minute break leaves 8:05.

Work in 24-hour time: 5:20 PM is 17:20, 12:30 PM is 12:30 and 12:30 AM is 00:30. Mixing up AM and PM is the commonest cause of a wrong total. And only unpaid breaks come off; if your employer pays for short tea breaks, leave them in.

Overnight shift hours calculation

When the end time is earlier than the start time, the shift crossed midnight, so add 24 hours (1,440 minutes) to the end time before you subtract. For 22:00 to 06:30 with a 30-minute break:

(06:30 + 24:00) − 22:00 = 8:30
8:30 − 0:30 break       = 8:00 worked
in minutes: 390 + 1,440 − 1,320 − 30 = 480

In Excel or Google Sheets, with the start in A2, the end in B2 and the break in minutes in C2, =MOD(B2-A2,1)*24-C2/60 gives decimal hours whether or not the shift crosses midnight. In a test in Excel, it returned 8 for this shift and 8.08 for the 08:45 to 17:20 example.

Overnight shifts raise one more question: which day do the hours belong to? It matters when overtime is counted per day, so check with payroll. Our Timesheet Calculator books the whole shift to the row where it starts.

Convert minutes to decimal hours

Payroll systems and spreadsheets usually want decimal hours, and the conversion is minutes ÷ 60:

Minutes Decimal hours Minutes Decimal hours
5 0.08 30 0.50
6 0.10 40 0.67
10 0.17 45 0.75
15 0.25 50 0.83
20 0.33 55 0.92

So 7:45 is 7.75 hours, not 7.45. The mistake costs real money: at ₹300 an hour, 7.75 hours pays ₹2,325, while 7.45 pays ₹2,235, which is ₹90 short for a single day. Going the other way, multiply the decimal part by 60: 7.6 hours is 7 hours and 0.6 × 60 = 36 minutes, or 7:36.

Tip: Spreadsheets store times as fractions of a day, so multiply by 24 to get decimal hours. To add up a week, format the total cell as [h]:mm. In our test, five 9-hour days showed as 21:00 with the ordinary h:mm format, because it rolls over every 24 hours, and as the correct 45:00 with [h]:mm.

Overtime: daily vs weekly rules

Overtime rules come from your country's or state's law and your employment contract, so the thresholds here are examples, not legal advice. Two common patterns are overtime after 8 hours in a day and overtime after 40 hours in a week, often paid at 1.5 times the normal rate. To calculate overtime hours by hand:

  • Daily rule: for each day, count the hours above the daily limit, then add those up.
  • Weekly rule: take the week's total and subtract the weekly limit.

The two rules can give very different answers for the same total. Here are two weeks at ₹300 an hour, with overtime at 1.5 times:

Week Hours Overtime, daily rule (over 8 h) Pay Overtime, weekly rule (over 40 h) Pay
A: 11, 11, 8, 6 and 4 hours 40 6 h ₹12,900 None ₹12,000
B: 9 hours on 5 days, plus 7 on Saturday 52 5 h ₹16,350 12 h ₹17,400

A lumpy week of long and short days earns more under a daily rule; a long, even week earns more under a weekly one. Some rules also add a double-time tier for very long days: with double time after 12 hours, a 13.5-hour day splits into 8 regular hours, 4 overtime hours and 1.5 double-time hours, worth ₹5,100 at ₹300 an hour. How that pay then shows up on a payslip, before and after deductions, is covered in our guide to CTC vs in-hand salary.

Our Timesheet Calculator works all of this out in your browser. It opens with a Monday-to-Sunday week, filled in with 09:00 to 17:00 and a 30-minute break on weekdays. Enter your times and breaks, then choose:

  • your hourly rate and currency (it starts in US dollars; rupees are in the list);
  • the overtime rule: daily (over 8 hours, with an optional double-time tier after 12) or weekly (over 40 hours), each with its own multiplier, or no overtime;
  • rounding, if your employer uses it.

It shows each day in h:mm and decimal hours, splits regular, overtime and double-time pay, and exports a CSV or a print-ready PDF with signature lines. Because it works in whole minutes, three days of 8:10 add up to exactly 24:30. With the weekly rule, it treats all the rows as one week, so enter one week at a time.

Rounding punches fairly

Many timeclocks round to the nearest 5 minutes, 6 minutes (a tenth of an hour) or 15 minutes. Rounding is fair when it goes to the nearest step in both directions, so the minutes gained and lost even out; rounding every punch down shortchanges the worker. US federal rules, for example, accept rounding to the nearest 5 minutes, tenth or quarter of an hour only if, over time, employees are still paid for all the time they actually work (29 CFR 785.48).

With 15-minute rounding, 1 to 7 minutes past a quarter-hour rounds down and 8 to 14 rounds up: 08:52 becomes 08:45, while 08:53 becomes 09:00.

Note: The Timesheet Calculator rounds each day's worked total, not each punch. For 08:52 to 17:23 with a 30-minute break, it rounds 8:01 to 8:00. A clock that rounds each punch would record 08:45 to 17:30, or 8:15 after the break. If your employer rounds punches, round the times yourself before you enter them and leave the tool's rounding off.

If you're tracking leave as well as hours, the PTO Calculator projects your leave balance from your accrual rate and planned time off, with caps and carry-forward. Dates follow the same borrowing logic as times, just with days and months; our guide to calculating age from a date of birth shows how.

Next step: open the Timesheet Calculator, enter this week's start and end times, pick the overtime rule from your contract, and check the total against your payslip.

Frequently asked questions

How do I calculate hours worked in a day?

Subtract the start time from the end time, then take off unpaid breaks. Converting both times to minutes first avoids mistakes: 08:45 to 17:20 is 515 minutes, minus a 30-minute break is 485 minutes, or 8 hours 5 minutes.

How do I convert minutes to decimal hours?

Divide the minutes by 60. So 45 minutes is 0.75 hours and 7 hours 45 minutes is 7.75 hours, not 7.45.

How do I calculate hours for a night shift that crosses midnight?

Add 24 hours to the end time, then subtract the start time and any breaks. For 22:00 to 06:30 with a 30-minute break, that's 30:30 − 22:00 − 0:30 = 8 hours.

How is overtime calculated?

Count the hours above your limit, either per day (for example, over 8) or per week (for example, over 40), and pay them at the overtime rate, often 1.5 times normal pay. The limits and rates depend on your local law and your contract.

What is 7 hours 30 minutes in decimal?

7.5 hours, because 30 minutes is 30 ÷ 60 = 0.5 of an hour.

Written by

PDFSpeeder Team

We build and run PDFSpeeder’s free online tools for PDFs, images and everyday calculations, and we write these guides from the same work: each how-to follows the steps on our own tools, and every worked example is calculated in full so you can check it.

About PDFSpeeder