How do you calculate hours between two times?
Convert both times to minutes after midnight, subtract, then convert back to hours and minutes.
Minutes worked = (end − start) − break Decimal hours = minutes ÷ 60Example: 9:00 is 540 minutes and 17:30 is 1,050 minutes. The difference is 510 minutes (8 h 30 min). With a 30 minute break, the time worked is 480 minutes = 8:00, which is 8.00 decimal hours.
Past midnight: from 22:00 to 06:00, the end is earlier than the start, so we add 24 hours: 06:00 + 24 h − 22:00 = 8:00.
Hours and minutes versus decimal hours
Payroll systems often want decimal hours, where the minutes are shown as a fraction of an hour. Divide the minutes by 60.
| Minutes | Decimal hours |
|---|---|
| 6 | 0.1 |
| 15 | 0.25 |
| 20 | 0.33 |
| 30 | 0.5 |
| 45 | 0.75 |
| 50 | 0.83 |
So 7 hours 45 minutes is 7.75 hours, not 7.45. Entering 7.45 into a timesheet is a very common mistake. To find pay, multiply the decimal hours by the hourly rate: 7.75 hours at 20 an hour is 155.
Tips for tracking working time
- Record start, end and break times every day, not at the end of the week.
- Check whether your employer rounds to the nearest 5, 10 or 15 minutes.
- Unpaid breaks are subtracted. Paid breaks are not.
- For a whole week, add each day's decimal hours. Use the date calculator to count working days in a period.
If you are comparing job offers, convert an hourly rate to a yearly figure with the salary calculator.
Complete guide to the Hours Calculator
How to use the Hours Calculator, step by step
- Enter the start and end times.
- Enter any unpaid break in minutes.
- Add an hourly rate if you want the pay for the shift.
- Read the time worked in h:mm and in decimal hours.
Common mistakes to avoid
- Writing 7 h 45 min as 7.45.
- Forgetting to subtract an unpaid break.
- Mixing 12-hour and 24-hour times.
Key terms explained
- Decimal hours
- Hours with minutes as a fraction of an hour.
- Unpaid break
- Time subtracted from paid hours.
- Shift
- A period of work.
- Overtime
- Hours beyond the normal week.
Want the full walkthrough? Read our guide: How to Calculate Hours Worked, Breaks and Overtime.
Frequently asked questions
How do I calculate hours worked between two times?
Subtract the start time from the end time, then subtract any unpaid break. From 9:00 to 17:00 with a 30 minute break is 7 hours 30 minutes.
How do I calculate a night shift that passes midnight?
If the end time is earlier than the start time, add 24 hours to the end time before subtracting. The calculator does this for you.
How do I convert hours and minutes to decimal hours?
Divide the minutes by 60 and add them to the hours. 7 hours 45 minutes is 7 + 45 ÷ 60 = 7.75 hours.
How do I calculate pay from hours worked?
Multiply the decimal hours by the hourly rate. 7.5 hours at 18 an hour is 135.
Can I use 12-hour times with am and pm?
Yes. Type times such as 9:00 am or 5:30 pm, or use 24-hour times such as 09:00 and 17:30.