How to work out the hours between two times
The arithmetic is easier in minutes than in hours. Convert both times to minutes past midnight, subtract, then convert back:
- Convert the start time. 9:15 → (9 × 60) + 15 =
555 minutes.
- Convert the end time. 17:40 → (17 × 60) + 40 =
1060 minutes.
- Subtract. 1060 − 555 =
505 minutes.
- If the answer is negative, the period crossed midnight — add 1,440 (the minutes in a day).
- Convert back. 505 ÷ 60 =
8.42 decimal hours, or 8 hours and 25 minutes.
The one step people skip is the fourth. From 22:00 to 06:00 the raw subtraction gives −960 minutes; adding 1,440 gives the correct 480 minutes, or 8 hours.
Decimal hours versus hours and minutes
These are the same quantity written two ways, and mixing them up is the most common timesheet error. 8.5 hours is 8 hours 30 minutes, not 8 hours 50 minutes. Payroll systems almost always want the decimal form; humans read hours and minutes. This calculator shows both, plus the raw minute count, so there is nothing to convert by hand.
| From | To | Duration | Decimal |
| 09:00 | 17:00 | 8h 00m | 8.00 |
| 09:00 | 17:30 | 8h 30m | 8.50 |
| 08:30 | 16:45 | 8h 15m | 8.25 |
| 07:00 | 15:20 | 8h 20m | 8.33 |
| 22:00 | 06:00 | 8h 00m | 8.00 |
| 23:30 | 07:45 | 8h 15m | 8.25 |
| 12:15 | 12:15 | 0h 00m | 0.00 |
Subtracting a break
Enter unpaid break minutes and they come straight off the total. A 09:00–17:30 day with a 30-minute lunch is 8 hours paid, not 8.5. If your break is punched — you clock out and back in — you are better off using the time card calculator, which takes two separate in/out pairs and needs no break figure at all.
Other things this is useful for
- Billable time. Decimal hours multiplied by your rate is exactly what an invoice line needs.
- Sleep and rest periods. Bedtime to alarm crosses midnight, which is handled automatically.
- Cooking, parking, appointments — anything measured between two clock times on the same or the following day.
- Checking a payslip. Compare the decimal figure against the hours you were paid for.
For periods longer than 24 hours, this is the wrong tool — it works within a single day boundary and assumes at most one midnight crossing.
Frequently asked questions
How many hours is 9 to 5:30?
8 hours 30 minutes, or 8.50 decimal hours, or 510 minutes. With a 30-minute unpaid lunch it becomes 8.00 paid hours.
How do I calculate hours across midnight?
Subtract as usual and add 1,440 minutes (24 hours) if the result is negative. From 22:00 to 06:00: 360 − 1320 = −960; −960 + 1440 = 480 minutes, or 8 hours. The calculator does this automatically and tells you when it has.
What is 8.25 hours in hours and minutes?
8 hours and 15 minutes. Multiply the decimal part by 60: 0.25 × 60 = 15.
Why does my result show 8.33 instead of 8.20?
Because 8 hours 20 minutes is 8 + 20/60 = 8.333 hours. Minutes are sixtieths, not hundredths — writing 8.20 for 8h 20m would understate the time by eight minutes.
Can I enter times in 12-hour format?
Yes. 9am, 9 a.m., 5:30pm, 530p and 5.30 pm are all understood, alongside 24-hour forms like 17:30 and 1730. Values are normalised to HH:MM when you leave the field.
Does it round to the nearest quarter hour?
Not on this page — it gives the exact interval. If you need payroll rounding, the time card calculator and the weekly timesheet both have rounding rules.
Other calculators