Time & Work

How to Calculate Hours Worked: Breaks, Night Shifts, Decimal Hours & Pay

CalculatorOnline Team8 min read

Filling in a timesheet, checking your payslip or billing a client all start with the same task: working out how many hours you actually worked. This guide explains how to calculate hours worked between two times, how to subtract unpaid breaks, handle night shifts that cross midnight, add up a weekly total, and convert minutes to decimal hours for payroll – with worked examples you can follow on paper.

Skip the manual maths: our free time calculator works out hours between two times with breaks and pay, adds durations and converts decimal hours to hours and minutes.

How to Calculate Hours Worked in a Shift

The basic hours worked formula is:

Hours worked = End time − Start time − Unpaid break

The easiest way to avoid mistakes is to use the 24-hour clock and work in hours and minutes separately.

Worked example

You start at 09:00, finish at 17:30 and take a 30-minute unpaid lunch.

  1. End − start: 17:30 − 09:00 = 8 hours 30 minutes
  2. Minus break: 8 h 30 m − 30 m = 8 hours

Subtracting Times When the Minutes Don't Fit

If the finish minutes are smaller than the start minutes, borrow 60 minutes from the hours, just like borrowing in subtraction.

Example: 08:45 to 16:20.

  • 20 minutes − 45 minutes cannot be done, so borrow 1 hour: 16:20 becomes 15 hours 80 minutes.
  • 15 h 80 m − 8 h 45 m = 7 hours 35 minutes.

Converting AM/PM to the 24-Hour Clock

For times after noon, add 12 to the hour: 1:15 PM = 13:15, 5:30 PM = 17:30, 11:00 PM = 23:00. Midnight is 00:00 and noon is 12:00. Converting first makes subtraction straightforward and avoids AM/PM errors.

How to Calculate a Night Shift That Crosses Midnight

When a shift ends the next day, the end time is smaller than the start time. Add 24 hours to the end time before subtracting.

Example: 22:00 to 06:00 with a 30-minute break.

  1. 06:00 + 24:00 = 30:00
  2. 30:00 − 22:00 = 8 hours
  3. 8 hours − 30 minutes = 7 hours 30 minutes

Our time calculator detects overnight shifts automatically when the end time is earlier than the start time.

Converting Minutes to Decimal Hours

Payroll systems and invoices usually need decimal hours, such as 7.5 rather than 7:30. To convert, divide the minutes by 60:

Decimal hours = hours + minutes ÷ 60

MinutesDecimalMinutesDecimal
50.08350.58
100.17400.67
150.25450.75
200.33500.83
250.42550.92
300.50601.00

So 7 hours 45 minutes = 7.75 hours, and 8 hours 20 minutes = 8.33 hours. Going the other way, multiply the decimal part by 60: 7.3 hours is 7 hours 18 minutes – not 7 hours 30 minutes, a very common payslip mistake.

Example: Totalling a Weekly Timesheet

DayStart – endBreakHoursDecimal
Monday09:00 – 15:1530 min5 h 45 m5.75
Tuesday09:00 – 14:00none5 h 00 m5.00
Wednesday12:30 – 20:1040 min7 h 00 m7.00
Thursday09:00 – 13:20none4 h 20 m4.33
Friday08:45 – 15:0030 min5 h 45 m5.75
Total27 h 50 m27.83

To add hours and minutes, add the minutes column (45 + 0 + 0 + 20 + 45 = 110 minutes = 1 hour 50 minutes), then add the hours column (5 + 5 + 7 + 4 + 5 = 26) plus the carried hour: 27 hours 50 minutes.

Calculating Pay from Hours Worked

Pay = decimal hours × hourly rate

At ₹250 an hour, 27.83 hours earns about ₹6,958. At £12.50 an hour, a 7.5-hour shift earns £93.75. Always multiply using decimal hours – multiplying 7.30 instead of 7.5 would underpay you.

Overtime Rules to Know

  • India: under the rules carried over from the Factories Act into the Occupational Safety, Health and Working Conditions Code, overtime beyond the normal daily or weekly limits (traditionally 9 hours a day and 48 hours a week) must be paid at twice the ordinary rate. Offices and shops also follow their state's shops and establishments rules.
  • United States: the Fair Labor Standards Act requires overtime at 1.5 times the regular rate for non-exempt employees after 40 hours in a workweek.
  • United Kingdom: there is no legal overtime premium, but average working time is limited to 48 hours a week unless you opt out, and your pay must never fall below the minimum wage for all hours worked.

Your employment contract may give better terms, so check it before calculating overtime.

Time Rounding and Clock-In Systems

Some employers round clock-in and clock-out times to the nearest 5, 10 or 15 minutes. Rounding must be fair – rounding both up and down – so that over time employees are paid for all the time they worked. Keep your own record of start and end times so you can check your timesheet if something looks wrong.

Calculating Hours Worked in Excel

  • Enter times as 9:00 and 17:30 in A2 and B2.
  • Hours worked: =B2-A2, formatted as [h]:mm.
  • Night shifts: =MOD(B2-A2,1) handles times that cross midnight.
  • Subtract a 30-minute break: =MOD(B2-A2,1)-TIME(0,30,0).
  • Decimal hours: multiply the result by 24 – =(MOD(B2-A2,1)-TIME(0,30,0))*24.

Tips for Freelancers and Consultants

  • Track time per task, not just per day, so invoices show clients exactly what they paid for.
  • Decide on a billing increment (for example 15 minutes) and state it in your contract.
  • Total hours weekly rather than monthly to catch missed entries early.
  • Remember that GST or VAT may apply to your invoice on top of the fee.

Common Mistakes When Calculating Hours

  • Treating minutes as decimals (7:30 is 7.5 hours, not 7.3).
  • Forgetting to subtract unpaid breaks.
  • Getting negative hours for night shifts.
  • Mixing AM and PM times.
  • Rounding each day before totalling the week.

Break Rules at Work

Whether a break is paid, and how long it must be, depends on the law and your contract. In India, factory and shop rules generally require a rest interval of at least half an hour after about five hours of continuous work. In the UK, adults working more than six hours a day are entitled to an uninterrupted 20-minute rest break, which is usually unpaid unless the contract says otherwise. In the US, federal law does not require meal breaks, but short breaks of up to about 20 minutes that employers do offer must be paid. Only subtract breaks that are genuinely unpaid when you calculate hours worked.

Split Shifts and Multiple Sessions

If you work in two or more blocks in a day – for example 07:00 to 11:00 and again 16:00 to 20:30 – calculate each block separately and add them. Here that is 4 hours plus 4 hours 30 minutes = 8 hours 30 minutes (8.5 hours). The gap in the middle is not working time unless you were required to stay on call. Our time calculator's "add durations" mode lets you enter each block as a separate row and totals them for you.

Monthly Hours for Salaried Staff

To convert a monthly salary into an hourly rate, you need the average working hours in a month. For a 40-hour week, multiply by 52 weeks and divide by 12 months: 40 × 52 ÷ 12 = about 173.3 hours a month. For a 48-hour week it is about 208 hours. Divide the monthly salary by these hours to get an approximate hourly rate – useful for comparing a salaried job with hourly or freelance work.

Frequently Asked Questions

How do I calculate hours worked?

Subtract the start time from the end time using the 24-hour clock, then subtract any unpaid break. For 09:00 to 17:30 with a 30-minute break, the answer is 8 hours.

How do I calculate hours for a night shift?

Add 24 hours to the end time before subtracting. 22:00 to 06:00 becomes 30:00 − 22:00 = 8 hours.

How do I convert minutes to decimal hours?

Divide the minutes by 60. 45 minutes is 0.75 hours, so 7 hours 45 minutes is 7.75 hours.

What is 7.5 hours in hours and minutes?

7 hours 30 minutes, because 0.5 × 60 = 30 minutes.

How do I add up hours and minutes for a week?

Add the minutes and convert every 60 minutes into an hour, then add the hours. Or add the decimal hours for each day.

How is overtime paid in India?

Overtime in factories – work beyond the normal daily or weekly hours, traditionally 9 hours a day and 48 hours a week – is paid at twice the ordinary rate under Indian labour law. Offices and shops follow their state's shops and establishments rules.

How do I calculate hours worked in Excel?

Use =MOD(end-start,1) formatted as [h]:mm, subtract breaks with TIME(0,minutes,0), and multiply by 24 for decimal hours.

How many working hours are in a month?

For a 40-hour week, about 173.3 hours (40 × 52 ÷ 12). For a 48-hour week, about 208 hours.

Are lunch breaks counted as hours worked?

Only if they are paid. Unpaid breaks are subtracted from the time between starting and finishing work.

Note: Overtime and working-time rules summarised here are general. Your contract, state law or collective agreement may give different entitlements.