A time duration calculator finds how many hours and minutes pass between a start time and an end time, including periods that cross midnight. From 9:00 to 17:30 is 8 hours 30 minutes, and an overnight shift from 22:30 to 06:15 is 7 hours 45 minutes, or 7.75 decimal hours.
On this page

How to use the time duration calculator
- Enter the start time.
- Enter the end time; if it is earlier than the start, the tool assumes it is the next day.
- Read the duration in hours and minutes and the total minutes.
- Subtract any unpaid breaks yourself.
What formula does the time duration calculator use?
- Convert both times to minutes after midnight: hours × 60 + minutes
- Duration = end minutes − start minutes
- If the end time is earlier than the start, the period crosses midnight, so add 24 hours (1,440 minutes)
- Hours = whole part of minutes ÷ 60; remaining minutes = minutes mod 60
Time duration calculator worked example
| Start | End | Duration | Total minutes | Decimal hours |
|---|---|---|---|---|
| 09:00 | 17:30 | 8 h 30 min | 510 | 8.50 |
| 08:45 | 12:10 | 3 h 25 min | 205 | 3.42 |
| 22:30 | 06:15 | 7 h 45 min | 465 | 7.75 |
| 13:05 | 13:50 | 0 h 45 min | 45 | 0.75 |
| 18:00 | 02:00 | 8 h 0 min | 480 | 8.00 |
For 22:30 to 06:15, the end is earlier than the start, so the time duration calculator adds 1,440 minutes: (6 × 60 + 15 + 1,440) − (22 × 60 + 30) = 465 minutes, or 7 hours 45 minutes.
Converting minutes to decimal hours
| Minutes | Decimal hours |
|---|---|
| 6 | 0.10 |
| 15 | 0.25 |
| 20 | 0.33 |
| 30 | 0.50 |
| 45 | 0.75 |
| 50 | 0.83 |
Payroll systems often use decimal hours: 7 hours 45 minutes is 7.75 hours. Divide the minutes by 60; do not write 7:45 as 7.45.
What the tool does not handle
- Periods longer than 24 hours: it assumes the end is within a day of the start. Use a date difference calculator for longer spans.
- Daylight saving time: on the night clocks change, a shift can be an hour longer or shorter than the clock times suggest.
- Breaks: subtract unpaid breaks yourself, for example 30 minutes from a 9:00 to 17:30 day to get 8 hours.
- Seconds: times are entered to the minute.
- Equal times: the same start and end give 0, not 24 hours.
Using it for time sheets
Work out each shift, subtract breaks, convert to decimal hours and add them up for the week. Under the federal Fair Labor Standards Act, non-exempt employees must be paid overtime for hours over 40 in a workweek, so accurate totals matter. Keep a record of start and end times; employers are required to keep records of hours worked for non-exempt workers.
12-hour clock times
The tool uses the 24-hour clock. To convert a 12-hour time, add 12 to any PM hour except 12 PM, and write 12 AM as 00. So 5:30 PM is 17:30, 12:15 PM is 12:15 and 12:15 AM is 00:15. Getting AM and PM wrong is the most common reason a shift total comes out 12 hours too long or too short, so check that step first.
Estimates for planning only. Check important figures with an official source or a qualified professional.
Rounding time for payroll
Some employers round clock-in and clock-out times, for example to the nearest 5, 6 or 15 minutes. Under federal rules, rounding is allowed only if it is neutral over time, so that it does not consistently cut the hours employees are paid for. If you are checking your own hours, use the exact times in the time duration calculator, then compare the total with your pay slip.
For a week of shifts, work out each day separately with the time duration calculator, add the minutes and convert the total to decimal hours at the end. Rounding each day first can add or remove several minutes over a week.
Other uses for time differences
The same arithmetic helps with travel and study. To find the length of a flight, convert both the departure and arrival times to the same time zone first, then calculate the difference. For study or project time, add the duration of each session to see how many hours you spent on a task in a week.
Related converters and calculators
Related calculators:
- Time card calculator: weekly hours
- Hours calculator: hours
- Date difference calculator: longer spans
- Overtime tax calculator: overtime
Sources
DOL Fact Sheet #21: Recordkeeping under the FLSA; DOL: Overtime pay.
Questions about this calculator
How do I calculate the time between two times?
Convert both to minutes after midnight, subtract, and add 24 hours if the end is earlier.
How many hours is 9 to 5:30?
8 hours 30 minutes, or 8.5 decimal hours.
How do I handle an overnight shift?
Add 24 hours to the end time when it is earlier than the start; the tool does this for you.
How do I convert minutes to decimal hours?
Divide by 60; 45 minutes is 0.75 hours.
Does it include breaks?
No. Subtract unpaid breaks from the result.
Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.
Report a calculation issue