HiveDesk

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)

FromToDurationDecimal hoursMinutes
8:45 AM9:30 AM45 minutes0.7545
10:15 AM10:45 AM30 minutes0.5030
10:15 AM11:30 AM1 hour 15 minutes1.2575
10:30 AM12:00 PM1 hour 30 minutes1.5090
10:45 AM11:15 AM30 minutes0.5030
10:45 AM11:25 AM40 minutes0.6740
10:45 AM11:30 AM45 minutes0.7545
10:45 AM12:15 PM1 hour 30 minutes1.5090
10:45 AM12:30 PM1 hour 45 minutes1.75105
11:15 AM11:45 AM30 minutes0.5030
11:45 AM12:30 PM45 minutes0.7545
11:50 AM12:20 PM30 minutes0.5030
3:40 PM4:30 PM50 minutes0.8350
5:30 PM6:30 PM1 hour1.0060
6:30 PM8:00 PM1 hour 30 minutes1.5090

Daytime ranges

FromToDurationDecimal hoursMinutes
7:00 AM3:30 PM8 hours 30 minutes8.50510
7:15 AM1:45 PM6 hours 30 minutes6.50390
8:00 AM5:00 PM9 hours9.00540
8:30 AM5:00 PM8 hours 30 minutes8.50510
9:00 AM5:00 PM8 hours8.00480
9:00 AM5:30 PM8 hours 30 minutes8.50510
9:00 AM6:00 PM9 hours9.00540
10:00 AM1:00 PM3 hours3.00180
10:00 AM5:00 PM7 hours7.00420
10:00 AM5:30 PM7 hours 30 minutes7.50450
10:30 AM2:00 PM3 hours 30 minutes3.50210
10:30 AM5:00 PM6 hours 30 minutes6.50390
11:00 AM5:30 PM6 hours 30 minutes6.50390
11:00 AM6:30 PM7 hours 30 minutes7.50450
11:00 AM10:00 PM11 hours11.00660
11:30 AM2:00 PM2 hours 30 minutes2.50150
11:30 AM3:00 PM3 hours 30 minutes3.50210
11:30 AM4:00 PM4 hours 30 minutes4.50270
11:30 AM5:00 PM5 hours 30 minutes5.50330
11:30 AM5:30 PM6 hours6.00360
11:30 AM6:00 PM6 hours 30 minutes6.50390
12:00 PM5:30 PM5 hours 30 minutes5.50330
12:45 PM4:45 PM4 hours4.00240
2:00 PM6:00 PM4 hours4.00240
2:30 PM5:00 PM2 hours 30 minutes2.50150
6:45 AM6:30 PM11 hours 45 minutes11.75705

Overnight ranges

FromToDurationDecimal hoursMinutes
3:00 PM11:00 PM8 hours8.00480
7:00 PM7:00 AM (next day)12 hours12.00720
8:00 PM6:00 AM (next day)10 hours10.00600
10:00 PM2:00 AM (next day)4 hours4.00240
10:00 PM5:00 AM (next day)7 hours7.00420
10:00 PM5:30 AM (next day)7 hours 30 minutes7.50450
10:00 PM6:00 AM (next day)8 hours8.00480
10:45 PM5:00 AM (next day)6 hours 15 minutes6.25375
11:00 PM5:00 AM (next day)6 hours6.00360
11:00 PM5:30 AM (next day)6 hours 30 minutes6.50390
11:00 PM7:00 AM (next day)8 hours8.00480
11:30 PM5:30 AM (next day)6 hours6.00360
6:00 PM1:00 PM (next day)19 hours19.001140
10:00 PM2:00 PM (next day)16 hours16.00960
11:00 PM2:00 PM (next day)15 hours15.00900

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.

ShiftTypical timesSpanUnpaid mealPaid hours
8-hour day shift9:00 AM to 5:00 PM8 hours30 min7.50
8 paid hours with lunch8:00 AM to 4:30 PM8 hours 30 minutes30 min8.00
10-hour shift (4/10 week)7:00 AM to 5:30 PM10 hours 30 minutes30 min10.00
12-hour day shift7:00 AM to 7:00 PM12 hours30 min11.50
12-hour night shift7:00 PM to 7:00 AM12 hours30 min11.50
Second shift3:00 PM to 11:00 PM8 hours30 min7.50
Third (graveyard) shift11:00 PM to 7:00 AM8 hours30 min7.50
Part-time half day9:00 AM to 1:00 PM4 hoursNone4.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 wantFormulaFormat 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)*24Number, 2 decimals
Total minutes=MOD(B2-A2,1)*1440Number
Decimal hours minus a 30-minute break=MOD(B2-A2,1)*24-0.5Number, 2 decimals
Hours between two date-times=(B2-A2)*24Number, 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.