Time Duration Calculator
Enter a start time and an end time to see the hours and minutes between them.
Your start and end times
How to use this calculator
Use this hours between two times calculator for a work shift, a journey, a study session, or any span you want to measure. Pick a start time and an end time, and take off a break if there is one.
- Enter the start time: the hour, the minutes, and AM or PM.
- Enter the end time the same way.
- If you took an unpaid break, enter the minutes. Leave it at 0 if there was no break.
- Read the duration at the top, in hours and minutes, with the decimal hours figure for payroll underneath.
How the duration is worked out
Duration = end time - start time
If the end time is earlier, add 24 hours (1,440 minutes) to it first
Decimal hours = total minutes / 60
Example: a shift from 9:00 AM to 5:30 PM. 9:00 AM is 540 minutes after midnight and 5:30 PM is 1,050 minutes, so the gap is 510 minutes. That is 8 hours 30 minutes, or 8.5 decimal hours.
A night shift works the same way. 10:00 PM is 1,320 minutes after midnight and 6:00 AM is 360 minutes, so the raw gap is negative. Add 1,440 minutes for the new day and the answer is 480 minutes, which is 8 hours.
Common shift lengths at a glance
| Start | End | Duration | Decimal hours |
|---|---|---|---|
| 9:00 AM | 5:00 PM | 8 hours | 8.00 |
| 8:00 AM | 4:30 PM | 8 hours 30 minutes | 8.50 |
| 10:00 PM | 6:00 AM | 8 hours | 8.00 |
| 7:30 AM | 12:00 PM | 4 hours 30 minutes | 4.50 |
| 1:00 PM | 9:45 PM | 8 hours 45 minutes | 8.75 |
All of these cross no break. If you take a 30 minute lunch, take 0.5 decimal hours off the figure in the last column.
Decimal hours for payroll
Payroll and billing systems multiply hours by a rate, so they need the time as a plain decimal number. 8 hours 30 minutes is 8.5 hours, not 8.30. The table below covers the minutes you will see most often.
| Minutes | Decimal hours |
|---|---|
| 15 | 0.25 |
| 30 | 0.50 |
| 45 | 0.75 |
| 60 | 1.00 |
To convert any figure yourself, divide the minutes by 60 and add the whole hours. 7 hours 45 minutes is 7 + (45 / 60) = 7.75 decimal hours.
Tips for an accurate result
- Check AM and PM. 9:00 AM and 9:00 PM are 12 hours apart. Most wrong answers come from a flipped AM/PM, not from the maths.
- Remember that 12 AM is midnight and 12 PM is noon. 12:30 AM is half past midnight, and 12:30 PM is half past noon.
- Take the break off. If you clock out for lunch, the time you are paid for is the span minus the break. Enter the break above and the calculator does it for you.
- Overnight is automatic. You do not need a separate setting for a night shift. If the end time is earlier than the start time, the calculator counts it as the next day.
- Use decimal hours for pay. If your rate is $20 an hour, 8.5 decimal hours is $170. The same span written as 8 hours 30 minutes cannot be multiplied directly.
Frequently asked questions
How do I calculate the time duration between two times?
Convert both times to the 24-hour clock, turn each into minutes after midnight, and subtract the start from the end. For example, 9:15 AM is 555 minutes and 5:45 PM is 1,065 minutes, so the gap is 510 minutes, or 8 hours 30 minutes. If the end time is earlier than the start time, the span crossed midnight, so add 1,440 minutes (24 hours) to the end time first. This calculator does all of that for you.
How many hours are between two times?
It depends on the times, but the method is the same every time: end minus start, in minutes, then divide by 60. 9:00 AM to 5:00 PM is 8 hours. 10:00 PM to 6:00 AM is also 8 hours, because the night shift crosses midnight. Type your own times above to get the exact answer in hours, minutes and decimal hours.
What is a time elapsed calculator?
A time elapsed calculator measures how much time passes between a start and an end. It is the same thing as a time duration calculator: both give you the gap in hours and minutes, and often in decimal hours too. Use it for work shifts, travel time, cooking, study sessions, or any span you want to measure.
How do I convert hours and minutes to decimal hours for payroll?
Divide the minutes by 60 and add the whole hours. 8 hours 30 minutes is 8 + (30 / 60) = 8.5 decimal hours. 7 hours 45 minutes is 7.75. Payroll and billing systems use decimal hours because you can multiply them by an hourly rate. This calculator shows the decimal figure with every result.
Does the calculator handle overnight shifts?
Yes. If the end time is earlier than the start time, the calculator treats the end as the next day and adds 24 hours before subtracting. A night shift from 10:00 PM to 6:00 AM correctly gives 8 hours, not a negative number. If you also take an unpaid break, enter it and the break is taken off the total.