Hours Between Two Times — online tool
To find the time between two clock times, subtract the start from the end. Convert each time to minutes after midnight if that helps. From 8:45 am to 5:20 pm, the start is 8 × 60 + 45 = 525 minutes and the end is 17 × 60 + 20 = 1,040 minutes. The difference is 515 minutes, which is 8 hours and 35 minutes.
When the end time is earlier on the clock than the start, the period crosses midnight. A shift from 9:30 pm to 6:15 am is 21:30 to 06:15. Add 24 hours to the end, giving 30:15, and subtract 21:30 to get 8 hours and 45 minutes. In the tool you do not have to add the 24 hours. Tick 'End time is on the next day' and the duration is worked out correctly. Without that tick, an end time before the start would look like a negative result.
The tool handles hours and minutes. If you need a decimal for pay, divide the minutes by 60. 8 hours 35 minutes is 8 + 35/60 = 8.58 hours. 8 hours 45 minutes is 8.75 hours. Being careful here matters, because 8.35 is not the same as 8 hours 35 minutes.
If your period lasts more than one night, use the Date Difference tab for days and the Time Duration tab for the final partial day. The swap button reverses the two times if you entered them the wrong way round.
Worked examples
| Start | End | Next day? | Duration |
|---|
| 8:45 am | 5:20 pm | No | 8 h 35 min |
| 10:15 am | 2:50 pm | No | 4 h 35 min |
| 9:30 pm | 6:15 am | Yes | 8 h 45 min |
| 11:00 pm | 7:00 am | Yes | 8 h 0 min |
Minutes to decimal hours
| Time | Decimal hours |
|---|
| 8 h 15 min | 8.25 |
| 8 h 30 min | 8.50 |
| 8 h 35 min | 8.58 |
| 8 h 45 min | 8.75 |
Common mistakes
- Entering pm as am, which changes the answer by 12 hours.
- Treating 8 hours 35 minutes as 8.35 hours.
- Forgetting the next-day box for night work.
- Counting the break time in the paid hours.
How to use Hours Between Two Times
- Open the Time Calculator and select the Time Duration tab.
- Enter the start time.
- Enter the end time.
- If the end time is on the following day, tick 'End time is on the next day'.
- Press Calculate to see the duration with its breakdown.
- Use the swap button if the times were entered in the wrong order.
- Note the hours and minutes, and convert to decimal hours if you need that for pay.
Tips for the best result
- Check am and pm. A wrong am or pm shifts the result by 12 hours.
- Use the 24-hour format when a schedule is printed that way.
- For a night shift, always tick the next-day box.
- Deduct unpaid breaks separately, or use the Hours Calculator tab for a full day with a break.
- Convert minutes to a decimal only after you have the final duration.
- Re-enter the times and compare if the answer looks odd.
Frequently asked questions
- How do I calculate the hours between two times?
- Subtract the start time from the end time. In the Time Duration tab, enter both times and press Calculate.
- How do I calculate time that passes midnight?
- Tick 'End time is on the next day'. A shift from 9:30 pm to 6:15 am then shows 8 hours and 45 minutes.
- How many hours is 8:45 am to 5:20 pm?
- It is 8 hours and 35 minutes, or about 8.58 hours.
- Why is my result negative?
- The end time is earlier than the start time. If the end is on the next day, tick the next-day box. If not, swap the times.
- Can I enter a time in 24-hour format?
- Yes. Use whichever format your device shows in the time fields.
- Does it subtract a lunch break?
- The duration tab gives the total elapsed time. Subtract a break yourself, or use the Hours Calculator tab.
- How do I turn 8 hours 35 minutes into decimals?
- Divide the minutes by 60. 35 ÷ 60 is 0.58, so the value is 8.58 hours.
- Is the result stored?
- No. The calculation happens on your device.
More Time Calculator