Time Duration Calculator
Find the hours and minutes between two times or two dates, subtract a break, or add and subtract time from a clock time. Results in hours and minutes, decimal hours, and total minutes.
Find the hours and minutes from a start time to an end time. An end time earlier than the start counts as the next day.
Duration
8 hours 30 minutes
9:00 AM to 5:30 PM
Decimal hours
8.50
Total minutes
510
Adding up shift durations by hand? HiveDesk records start and end times automatically and totals them on each timesheet.
Track it automatically →Quick Answer
To find the time between two times, convert both to 24-hour format and subtract the start from the end. If the end is earlier than the start, the range crosses midnight: add 24 hours to the end time before subtracting.
Formula
Duration = End time − Start time
Add 24 hours to the end time if it is earlier than the start time
- 9:00 AM to 5:00 PM is 8 hours (8.00 decimal hours).
- 10:45 AM to 12:15 PM is 1 hour 30 minutes (90 minutes).
- 10:00 PM to 6:00 AM is 8 hours, crossing midnight.
- 8:30 AM to 5:00 PM with a 30-minute lunch is 8 hours of paid time.
How to Calculate the Time Between Two Times
There are three reliable ways to work out a duration by hand. They all give the same answer; pick the one that suits the numbers in front of you.
Method 1: Count up in steps
Count from the start time to the next whole hour, then the whole hours, then the minutes after the last whole hour. This is the easiest method for short ranges and the one most people do in their heads.
10:45 to 12:15
- 10:45 to 11:00 = 15 minutes
- 11:00 to 12:00 = 1 hour
- 12:00 to 12:15 = 15 minutes
- Total: 1 hour 30 minutes (1.50 hours)
Method 2: Subtract in 24-hour time
Convert both times to 24-hour format (add 12 to any PM hour except 12 PM), then subtract hours from hours and minutes from minutes. When the end minutes are smaller than the start minutes, borrow one hour as 60 minutes. The military time converter has a full 24-hour chart if you need one.
9:40 AM to 5:15 PM
- 5:15 PM = 17:15 in 24-hour time
- 15 minutes is less than 40, so borrow an hour: 17:15 becomes 16:75
- 16:75 − 9:40 = 7 hours 35 minutes
- Total: 7 hours 35 minutes (7.58 hours)
Method 3: Split at midnight
For overnight ranges, work out the time from the start to midnight and from midnight to the end, then add them together.
10:30 PM to 6:15 AM
- 10:30 PM to midnight = 1 hour 30 minutes
- Midnight to 6:15 AM = 6 hours 15 minutes
- Total: 7 hours 45 minutes (7.75 hours)
Common Time Durations
The time ranges people look up most often, worked out in hours and minutes, decimal hours, and total minutes. Ranges where the end time is earlier than the start run into the next day.
Short ranges (under two hours)
| From | To | Duration | Decimal hours | Minutes |
|---|---|---|---|---|
| 8:45 AM | 9:30 AM | 45 minutes | 0.75 | 45 |
| 10:15 AM | 10:45 AM | 30 minutes | 0.50 | 30 |
| 10:15 AM | 11:30 AM | 1 hour 15 minutes | 1.25 | 75 |
| 10:30 AM | 12:00 PM | 1 hour 30 minutes | 1.50 | 90 |
| 10:45 AM | 11:15 AM | 30 minutes | 0.50 | 30 |
| 10:45 AM | 11:25 AM | 40 minutes | 0.67 | 40 |
| 10:45 AM | 11:30 AM | 45 minutes | 0.75 | 45 |
| 10:45 AM | 12:15 PM | 1 hour 30 minutes | 1.50 | 90 |
| 10:45 AM | 12:30 PM | 1 hour 45 minutes | 1.75 | 105 |
| 11:15 AM | 11:45 AM | 30 minutes | 0.50 | 30 |
| 11:45 AM | 12:30 PM | 45 minutes | 0.75 | 45 |
| 11:50 AM | 12:20 PM | 30 minutes | 0.50 | 30 |
| 3:40 PM | 4:30 PM | 50 minutes | 0.83 | 50 |
| 5:30 PM | 6:30 PM | 1 hour | 1.00 | 60 |
| 6:30 PM | 8:00 PM | 1 hour 30 minutes | 1.50 | 90 |
Daytime ranges
| From | To | Duration | Decimal hours | Minutes |
|---|---|---|---|---|
| 7:00 AM | 3:30 PM | 8 hours 30 minutes | 8.50 | 510 |
| 7:15 AM | 1:45 PM | 6 hours 30 minutes | 6.50 | 390 |
| 8:00 AM | 5:00 PM | 9 hours | 9.00 | 540 |
| 8:30 AM | 5:00 PM | 8 hours 30 minutes | 8.50 | 510 |
| 9:00 AM | 5:00 PM | 8 hours | 8.00 | 480 |
| 9:00 AM | 5:30 PM | 8 hours 30 minutes | 8.50 | 510 |
| 9:00 AM | 6:00 PM | 9 hours | 9.00 | 540 |
| 10:00 AM | 1:00 PM | 3 hours | 3.00 | 180 |
| 10:00 AM | 5:00 PM | 7 hours | 7.00 | 420 |
| 10:00 AM | 5:30 PM | 7 hours 30 minutes | 7.50 | 450 |
| 10:30 AM | 2:00 PM | 3 hours 30 minutes | 3.50 | 210 |
| 10:30 AM | 5:00 PM | 6 hours 30 minutes | 6.50 | 390 |
| 11:00 AM | 5:30 PM | 6 hours 30 minutes | 6.50 | 390 |
| 11:00 AM | 6:30 PM | 7 hours 30 minutes | 7.50 | 450 |
| 11:00 AM | 10:00 PM | 11 hours | 11.00 | 660 |
| 11:30 AM | 2:00 PM | 2 hours 30 minutes | 2.50 | 150 |
| 11:30 AM | 3:00 PM | 3 hours 30 minutes | 3.50 | 210 |
| 11:30 AM | 4:00 PM | 4 hours 30 minutes | 4.50 | 270 |
| 11:30 AM | 5:00 PM | 5 hours 30 minutes | 5.50 | 330 |
| 11:30 AM | 5:30 PM | 6 hours | 6.00 | 360 |
| 11:30 AM | 6:00 PM | 6 hours 30 minutes | 6.50 | 390 |
| 12:00 PM | 5:30 PM | 5 hours 30 minutes | 5.50 | 330 |
| 12:45 PM | 4:45 PM | 4 hours | 4.00 | 240 |
| 2:00 PM | 6:00 PM | 4 hours | 4.00 | 240 |
| 2:30 PM | 5:00 PM | 2 hours 30 minutes | 2.50 | 150 |
| 6:45 AM | 6:30 PM | 11 hours 45 minutes | 11.75 | 705 |
Overnight ranges
| From | To | Duration | Decimal hours | Minutes |
|---|---|---|---|---|
| 3:00 PM | 11:00 PM | 8 hours | 8.00 | 480 |
| 7:00 PM | 7:00 AM (next day) | 12 hours | 12.00 | 720 |
| 8:00 PM | 6:00 AM (next day) | 10 hours | 10.00 | 600 |
| 10:00 PM | 2:00 AM (next day) | 4 hours | 4.00 | 240 |
| 10:00 PM | 5:00 AM (next day) | 7 hours | 7.00 | 420 |
| 10:00 PM | 5:30 AM (next day) | 7 hours 30 minutes | 7.50 | 450 |
| 10:00 PM | 6:00 AM (next day) | 8 hours | 8.00 | 480 |
| 10:45 PM | 5:00 AM (next day) | 6 hours 15 minutes | 6.25 | 375 |
| 11:00 PM | 5:00 AM (next day) | 6 hours | 6.00 | 360 |
| 11:00 PM | 5:30 AM (next day) | 6 hours 30 minutes | 6.50 | 390 |
| 11:00 PM | 7:00 AM (next day) | 8 hours | 8.00 | 480 |
| 11:30 PM | 5:30 AM (next day) | 6 hours | 6.00 | 360 |
| 6:00 PM | 1:00 PM (next day) | 19 hours | 19.00 | 1140 |
| 10:00 PM | 2:00 PM (next day) | 16 hours | 16.00 | 960 |
| 11:00 PM | 2:00 PM (next day) | 15 hours | 15.00 | 900 |
Common Shift Lengths
A shift's span (clock-in to clock-out) is not the same as its paid time when there is an unpaid meal break. Under the federal Fair Labor Standards Act, rest breaks of 5 to 20 minutes count as paid work time, while meal periods of 30 minutes or more can be unpaid if the employee is fully relieved of duty.
| Shift | Typical times | Span | Unpaid meal | Paid hours |
|---|---|---|---|---|
| 8-hour day shift | 9:00 AM to 5:00 PM | 8 hours | 30 min | 7.50 |
| 8 paid hours with lunch | 8:00 AM to 4:30 PM | 8 hours 30 minutes | 30 min | 8.00 |
| 10-hour shift (4/10 week) | 7:00 AM to 5:30 PM | 10 hours 30 minutes | 30 min | 10.00 |
| 12-hour day shift | 7:00 AM to 7:00 PM | 12 hours | 30 min | 11.50 |
| 12-hour night shift | 7:00 PM to 7:00 AM | 12 hours | 30 min | 11.50 |
| Second shift | 3:00 PM to 11:00 PM | 8 hours | 30 min | 7.50 |
| Third (graveyard) shift | 11:00 PM to 7:00 AM | 8 hours | 30 min | 7.50 |
| Part-time half day | 9:00 AM to 1:00 PM | 4 hours | None | 4.00 |
Many states set their own meal and rest break rules on top of federal law, and the break time calculator covers the common state requirements. For more on shift patterns, see first, second, and third shift hours and the shift schedule generator.
Converting a Duration to Decimal Hours
Payroll, invoicing, and spreadsheets need durations as decimal hours, because 7 hours 45 minutes cannot be multiplied by an hourly rate until it is written as 7.75. Divide the minutes by 60 and add them to the whole hours.
5 minutes
0.08 hr
10 minutes
0.17 hr
15 minutes
0.25 hr
20 minutes
0.33 hr
25 minutes
0.42 hr
30 minutes
0.50 hr
35 minutes
0.58 hr
40 minutes
0.67 hr
45 minutes
0.75 hr
50 minutes
0.83 hr
55 minutes
0.92 hr
60 minutes
1.00 hr
The minutes to decimal calculator has the full 1 to 60 minute chart and explains quarter-hour rounding. A common mistake is writing 7 hours 45 minutes as 7.45; that understates the time by 18 minutes, and on a timesheet it underpays the employee.
Time Duration Formulas for Excel and Google Sheets
Spreadsheets store a time as a fraction of a 24-hour day, so subtracting two times gives a fraction that needs formatting or converting. With the start time in A2 and the end time in B2:
| You want | Formula | Format the cell as |
|---|---|---|
| Hours and minutes, same day | =B2-A2 | [h]:mm |
| Hours and minutes, may cross midnight | =MOD(B2-A2,1) | [h]:mm |
| Decimal hours | =MOD(B2-A2,1)*24 | Number, 2 decimals |
| Total minutes | =MOD(B2-A2,1)*1440 | Number |
| Decimal hours minus a 30-minute break | =MOD(B2-A2,1)*24-0.5 | Number, 2 decimals |
| Hours between two date-times | =(B2-A2)*24 | Number, 2 decimals |
The square brackets in [h]:mm matter: plain h:mm resets to zero every 24 hours, so a 26-hour total displays as 2:00. MOD(…,1) is what makes overnight ranges work; without it, 10 PM to 6 AM returns a negative time, which Excel shows as a row of # signs.
Daylight Saving Time, Rounding, and Payroll
Clock times and elapsed time are not always the same. In most of the United States, clocks move forward at 2 AM on the second Sunday in March and back at 2 AM on the first Sunday in November (March 8 and November 1 in 2026). A 10 PM to 6 AM shift on those nights lasts 7 hours in March and 9 hours in November. Non-exempt employees must be paid for the hours they actually work, so the extra hour in November is paid time. The Between Dates tab above uses your device's time zone and reflects the change.
Rounding is the other place durations go wrong. Federal rules (29 CFR 785.48) allow employers to round clock times to the nearest 5 minutes, tenth of an hour, or quarter hour, but only if the rounding averages out so employees are paid for all the time they actually work. Rounding that always favors the employer is not allowed.
For a week of shifts, the time card calculator totals each day and applies overtime, and the hours calculator adds up multiple durations. In a contact center, where agents log in and out of queues many times a day, automatic agent time tracking removes the manual arithmetic entirely.
Stop Calculating Shift Hours by Hand
HiveDesk records clock-in and clock-out times automatically, subtracts breaks, and totals hours on timesheets ready for payroll. $5/user/month, 14-day free trial.
Frequently Asked Questions
How do I calculate the time between two times?
Convert both times to 24-hour format and subtract the start from the end. If the end minutes are smaller than the start minutes, borrow an hour: 17:15 minus 9:40 becomes 16:75 minus 9:40, which is 7 hours 35 minutes. If the end time is earlier than the start time, the range crosses midnight, so add 24 hours to the end time first.
How many hours is 9 AM to 5 PM?
9 AM to 5 PM is 8 hours (8.00 decimal hours). With a 30-minute unpaid lunch, it is 7 hours 30 minutes of paid time (7.50 hours).
How do I calculate the hours for an overnight shift?
Count the time up to midnight, then add the time after midnight. For 10:30 PM to 6:15 AM, that is 1 hour 30 minutes before midnight plus 6 hours 15 minutes after, for 7 hours 45 minutes (7.75 hours). The calculator does this automatically whenever the end time is earlier than the start time.
How do I convert hours and minutes to decimal hours?
Divide the minutes by 60 and add the result to the hours. 7 hours 45 minutes is 7 + 45/60 = 7.75 hours; 20 minutes is 0.33 hours. Payroll and billing systems use decimal hours because they can be multiplied by an hourly rate directly.
How do I calculate time duration in Excel or Google Sheets?
Put the start time in A2 and the end time in B2, then use =MOD(B2-A2,1) and format the cell as [h]:mm. MOD handles ranges that cross midnight. For decimal hours use =MOD(B2-A2,1)*24, and for minutes use =MOD(B2-A2,1)*1440. If the cells hold full dates and times, use =(B2-A2)*24 instead.
Does daylight saving time change the duration?
Yes, for ranges that span the change. In the United States clocks spring forward at 2 AM on the second Sunday in March and fall back at 2 AM on the first Sunday in November, so an overnight shift on those nights is one hour shorter or longer than the clock times suggest. The Between Dates tab uses your device's time zone and accounts for this; the Between Two Times tab does not.
How do I add hours to a time?
Add the hours to the hour part and the minutes to the minute part, carrying 60 minutes into an hour and wrapping past 24:00 into the next day. 9:00 AM plus 8 hours 30 minutes is 5:30 PM; 10:00 PM plus 9 hours is 7:00 AM the next day. The Add or Subtract tab does this for you.
How many minutes are in 1.5 hours?
90 minutes. Multiply decimal hours by 60 to get minutes: 1.5 × 60 = 90, 0.75 × 60 = 45, and 2.25 × 60 = 135.
Related Calculators
Hours Calculator
Add up hours and minutes across several time ranges.
Time Card Calculator
Weekly time cards with breaks, overtime, and rounding.
Minutes to Decimal Calculator
Convert hours and minutes to decimal hours for payroll.
Military Time Converter
Convert between 12-hour and 24-hour time.
Business Days Calculator
Count working days between two dates.
8-Hour Workday Calculator
Find your clock-out time for an 8-hour day.