Time Duration Calculator: Hours Between Two Times
To find the time between two clock times, convert both to minutes past midnight and subtract. From 9:00 AM to 5:30 PM is 8 hours 30 minutes.
Duration
8h 30m
Total minutes
510 min
Show the math
- 1
Convert both times to minutes past midnight
09:00 = 540 min · 17:30 = 1050 min
= 540 min, 1050 min
Read the steps as text
- Convert both times to minutes past midnight. 09:00 = 540 min · 17:30 = 1050 min
- Subtract the start time from the end time. 1050 − 540 = 510 min
- Convert back to hours and minutes. 510 ÷ 60 = 8h, remainder 30m
How the duration is worked out
Each time is first converted to minutes past midnight — so 9:00 AM becomes 540 minutes and 5:30 PM becomes 1,050 minutes. Subtracting the start from the end gives the duration directly in minutes, which is then converted back into hours and minutes for the result.
If the end time is earlier on the clock than the start time — say, a shift from 10 PM to 6 AM — the calculator assumes the end time falls on the following day and adds 24 hours (1,440 minutes) before subtracting, so overnight spans come out correctly rather than as a negative number.
Turning a duration into decimal hours
Timesheets and payroll often need hours as a decimal rather than hours and minutes. Divide the minutes by 60 and add them to the hours: 8 hours 30 minutes is 8.5 hours, 7 hours 45 minutes is 7.75 hours, and 20 minutes is about 0.33 of an hour. The total minutes shown above, divided by 60, gives the same figure.
To work out pay, multiply the decimal hours by the hourly rate: 8.5 hours at $20 an hour is $170. Subtract any unpaid breaks first, so a 9:00 AM to 5:30 PM shift with a 30-minute unpaid lunch is 8 paid hours. For a week of shifts, add up each day's minutes and convert the total once at the end, which stops small rounding differences from adding up.
Frequently asked questions
- How do I calculate hours between two times?
- Convert both times to minutes past midnight, subtract the earlier from the later, then divide by 60 to get hours and minutes. This calculator does it automatically — just enter a start and end time.
- Can this handle an overnight shift?
- Yes. If the end time is earlier on the clock than the start time, it's treated as being on the next day, so a 10 PM to 6 AM shift correctly comes out as 8 hours.
- Does this work with dates, not just times of day?
- No — for a duration that spans multiple calendar days, use the days-between-dates calculator instead. This tool is for the hours and minutes between two clock times.
- How do I convert minutes to decimal hours?
- Divide the minutes by 60. 15 minutes is 0.25 hours, 30 minutes is 0.5, and 45 minutes is 0.75, so 6 hours 45 minutes is 6.75 hours.
- How many hours is 9 to 5?
- 8 hours. If you take an unpaid one-hour lunch, that's 7 hours of paid time.