Hours Calculator

Enter a start and end time, subtract your break, and get the exact hours worked in both h:m and decimal format. Add an hourly rate to see your pay.

min
$
Hours worked
8h 0m
Decimal hours
8.00
Total minutes
480

Overnight shifts are handled automatically — if the end time is earlier than the start, it counts to the next day.

How to use this calculator

Set your start time and end time using 12-hour or 24-hour format, then enter any unpaid break time in minutes. The calculator immediately shows your hours worked in both h:m format (e.g., 8:30) and decimal hours (e.g., 8.5). Optionally enter an hourly rate to see your estimated gross pay for the shift.

For overnight shifts — where you clock in before midnight and out after — just enter the times as-is. If the end time is earlier than the start time, the calculator automatically treats the shift as spanning midnight.

How hours calculation works

Time arithmetic can be tricky because it is base-60 (60 seconds in a minute, 60 minutes in an hour) rather than base-10. You cannot simply subtract 9:00 from 5:30 as if they were regular numbers. The correct approach is:

  • Convert the start time to total minutes since midnight (e.g., 9:00 AM = 9 × 60 = 540 minutes).
  • Convert the end time to total minutes since midnight (e.g., 5:30 PM = 17 × 60 + 30 = 1,050 minutes).
  • Subtract start from end: 1,050 − 540 = 510 minutes.
  • Subtract unpaid break: 510 − 30 = 480 minutes.
  • Divide by 60 to get decimal hours: 480 ÷ 60 = 8.00 hours.

For overnight shifts, the end time in minutes is smaller than the start time. The calculator detects this and adds 1,440 minutes (24 hours) to the end time before subtracting, giving the correct elapsed time across midnight.

Hours vs. decimal hours — why it matters

Most time clocks and pay stubs display time in h:m format (8 hours 30 minutes). Most payroll software, however, requires decimal hours because multiplying 8:30 by an hourly rate is ambiguous — is the "30" thirty minutes or thirty hundredths of an hour? They are not the same: 8.30 hours (thirty hundredths) would be 8 hours and 18 minutes, not 8 hours and 30 minutes.

To convert manually: decimal hours = hours + (minutes ÷ 60). So 8 h 30 m = 8 + 30/60 = 8.5 decimal hours. This calculator shows both so you can use whichever your system requires.

Worked examples

Standard daytime shift

Clock in: 9:00 AM · Clock out: 5:30 PM · Break: 30 minutes

  • Gross minutes: (17:30 − 9:00) × 60 = 510 minutes
  • Minus break: 510 − 30 = 480 minutes
  • Hours worked: 480 ÷ 60 = 8.00 decimal hours (8 h 0 m)
  • At $22/hour: 8.00 × $22 = $176.00 gross

Overnight shift

Clock in: 10:00 PM · Clock out: 6:30 AM · Break: 0 minutes

  • End time is before start, so add 24 h: 6:30 AM + 24 h = 30:30 (1,830 min)
  • Gross minutes: 1,830 − 1,320 (22:00) = 510 minutes
  • Hours worked: 510 ÷ 60 = 8.5 decimal hours (8 h 30 m)

How to interpret your result

The gross pay figure is an estimate before taxes, National Insurance (if applicable), pension deductions, and any other employer withholdings. It does not include overtime premiums — if you work more than 40 hours per week and are entitled to overtime pay, use the time card calculator, which applies 1.5× for hours over 40. Always verify your pay against your official pay stub or employer's payroll system.

Common mistakes to avoid

  • Confusing 12-hour and 24-hour time. If you enter 5:30 when you mean 5:30 PM, the calculator may interpret it as 5:30 AM and give a much shorter shift. Confirm AM/PM when using 12-hour mode.
  • Including paid breaks in the deduction. Only enter truly unpaid break time. Many employers require paid 10- or 15-minute rest breaks; deducting those would undercount your pay.
  • Forgetting that gross pay ≠ take-home pay. The pay figure shown is before all tax and deduction withholdings. Your actual net pay will be lower.
  • Using this tool for weekly overtime calculations. This calculator covers a single shift. If you need weekly totals with overtime, use the time card calculator.
  • Misreading decimal hours as h:m. If you enter 8.5 decimal hours into a system expecting h:m, it may interpret it as 8 hours 50 minutes. Confirm which format the receiving system needs.

The formula

Hours worked = (End − Start − Break) ÷ 60  ·  Decimal hours = hours + (minutes ÷ 60)  ·  Gross pay = Decimal hours × Rate

How we calculate this

Hours worked = (end time in minutes − start time in minutes − break minutes) ÷ 60. If the result is negative (overnight shift), 24 × 60 = 1,440 minutes is added before dividing. Decimal hours = whole hours + (remaining minutes ÷ 60). Gross pay = decimal hours × hourly rate. Results are pre-tax estimates.

Frequently asked questions

How do I calculate hours worked between two times?

Enter the start time and end time, then subtract any unpaid break time in minutes. The calculator converts everything to minutes, finds the net difference, and displays the result in both h:m format and decimal hours. For example, 9:00 AM to 5:30 PM minus a 30-minute break is 8 hours 0 minutes (8.00 decimal hours).

How do I convert hours and minutes to decimal hours?

Divide the minutes by 60 and add to the whole hours. For example, 7 hours 45 minutes = 7 + (45 ÷ 60) = 7.75 decimal hours. Payroll software almost always requires decimal hours, so this calculator shows both formats automatically.

Does this handle overnight shifts?

Yes. If the end time is earlier than the start time, the calculator assumes the shift crossed midnight and adds 24 hours to the end time before subtracting. A shift from 10:00 PM to 6:00 AM is calculated as 8 hours, not a negative number.

How is pay calculated?

Enter an optional hourly rate and the calculator multiplies it by your decimal hours to show gross pay. For example, 8.5 hours at $22.50/hour is $191.25 gross before taxes and deductions. This tool does not calculate overtime — for weekly overtime over 40 hours, use the time card calculator.

What is the difference between h:m and decimal hours?

H:m (hours:minutes) is how we naturally read clocks — 8 hours and 30 minutes. Decimal hours express the same duration as a single number — 8.5. Payroll systems use decimal hours because they multiply cleanly by an hourly rate. Always confirm which format your employer's system expects.

How do I calculate hours for multiple days?

This calculator handles a single shift (one start and one end time). To total hours across multiple days in a week and calculate weekly gross pay with overtime, use the time card calculator, which has a row for each day of the week.

What if my break time varies?

Enter the total unpaid break minutes for the shift. If you took a 20-minute morning break and a 45-minute lunch, enter 65 minutes. Only unpaid breaks should be deducted; many employers count short paid rest breaks as working time.

Related calculators