Time Duration Calculator: Time Between Two Times

This Time Duration Calculator finds the exact time between two times, even across midnight. Most time math fails right there: a night shift from 10 PM to 6:30 AM looks negative on paper, yet the real elapsed time is 8 hours 30 minutes.

Enter a start time and end time in the 12-hour clock or as military time, such as 0630 and 1415, no colon needed. If the end comes earlier, the tool treats it as crossing midnight, adding 24 hours before subtracting.

The time duration calculator gives you the answer three ways: hours and minutes, decimal hours, and total minutes. That matters on timesheets, where 7 hours 45 minutes written as 7.45 quietly cuts 18 minutes from payroll. Here it’s always 7.75.

Time Duration Calculator showing 10:00 PM to 6:30 AM equals 8 hours 30 minutes

How to Calculate Time Duration by Hand

Here’s the trick schools rarely say out loud: time isn’t decimal. Minutes run on base-60, so you can’t subtract 8:50 from 16:20 the way you’d subtract prices. You need to borrow first.

Convert both times to the 24-hour clock. AM hours stay put, PM hours gain 12, and noon stays 12. So 8:50 AM to 4:20 PM becomes 08:50 to 16:20.

Now the borrowing step. Since 20 is smaller than 50, turn 16:20 into 15:80. Subtract hours from hours and minutes from minutes: the time difference is 7 hours 30 minutes.

Every example below needed a borrow, because the end minutes were smaller than the start minutes. Seeing the middle step written out makes the pattern stick faster than any rule.

StartEndIn 24-hour timeAfter borrowingDurationDecimal hours
8:50 AM4:20 PM08:50 → 16:2015:80 − 08:507 h 30 min7.50
9:40 AM1:25 PM09:40 → 13:2512:85 − 09:403 h 45 min3.75
10:55 AM3:10 PM10:55 → 15:1014:70 − 10:554 h 15 min4.25
7:45 AM12:05 PM07:45 → 12:0511:65 − 07:454 h 20 min4.33
6:30 AM2:15 PM06:30 → 14:1513:75 − 06:307 h 45 min7.75
1:50 PM6:35 PM13:50 → 18:3517:95 − 13:504 h 45 min4.75

Durations That Cross Midnight

Contrary to what many people assume, an end time smaller than the start time isn’t an error. It usually means sleep, a late event, or one of those work shifts that runs past 00:00.

The quickest manual method splits the span at midnight. For 11:15 PM to 5:45 AM, that’s 45 minutes before midnight plus 5 hours 45 minutes after, giving 6 hours 30 minutes.

Splitting at midnight works for any overnight span. Here’s the before-and-after breakdown for common late starts, so you can check a shift or a night’s sleep in seconds.

StartEnd (next day)Before midnightAfter midnightTotal
7:00 PM7:00 AM5 h7 h12 h
8:00 PM2:15 AM4 h2 h 15 min6 h 15 min
9:30 PM4:00 AM2 h 30 min4 h6 h 30 min
10:00 PM6:00 AM2 h6 h8 h
10:40 PM6:25 AM1 h 20 min6 h 25 min7 h 45 min
11:15 PM5:45 AM45 min5 h 45 min6 h 30 min
11:45 PM7:30 AM15 min7 h 30 min7 h 45 min

The time duration calculator uses the other route: it adds 24 hours to the end time, then subtracts. Both methods land on the same answer, but the second is much harder to get wrong. Want a live countdown to midnight from right now? Use the How Long Until 12:00 AM calculator.

Using Military and 24-Hour Times

Military logs, flight schedules, and hospital charts write times as four digits. Type 0630 and 1415 straight in, no colon, and the time duration calculator reads them correctly; that time interval is 7 hours 45 minutes.

Four-digit input also removes the AM and PM guesswork. 2200 to 0600 can only mean an overnight span, so you’ll get 8 hours without choosing anything from a dropdown.

If you only need to switch a time between formats rather than measure a span, the Military Time Converter has the full 24-hour chart.

FromToDurationDecimal hoursMinutes
060014008 h8.00480
063015008 h 30 min8.50510
073016008 h 30 min8.50510
140022308 h 30 min8.50510
1800060012 h12.00720
220006308 h 30 min8.50510

Common Time Durations at a Glance

These are the spans people check most, from school days and exam times to travel legs and evening events. Overnight rows run into the next day.

FromToDurationDecimal hoursMinutesTypical use
9:00 AM5:00 PM8 h8.00480Office day
8:30 AM5:00 PM8 h 30 min8.50510Office day with lunch
7:00 AM3:30 PM8 h 30 min8.50510Early shift
8:00 AM3:00 PM7 h7.00420School day
9:00 AM12:00 PM3 h3.00180Morning exam
1:15 PM3:45 PM2 h 30 min2.50150Afternoon exam
6:45 AM9:10 AM2 h 25 min2.42145Train or flight leg
7:30 PM10:15 PM2 h 45 min2.75165Concert or event
3:00 PM11:00 PM8 h8.00480Second shift
10:00 PM6:00 AM8 h8.00480Night shift
11:30 PM7:15 AM7 h 45 min7.75465Sleep
7:00 PM7:00 AM12 h12.0072012-hour night shift

Short spans that straddle the hour are the easiest to misjudge in your head. Class periods, meetings, and movies usually land somewhere between 45 minutes and two hours.

FromToDurationDecimal hoursMinutesTypical use
8:15 AM9:05 AM50 min0.8350Class period
10:00 AM10:45 AM45 min0.7545Meeting
11:40 AM12:25 PM45 min0.7545Lunch break
9:25 AM11:00 AM1 h 35 min1.5895Lecture
2:50 PM4:05 PM1 h 15 min1.2575Appointment
7:10 PM8:40 PM1 h 30 min1.5090Movie
3:35 PM5:20 PM1 h 45 min1.75105Workshop

Turning a Duration Into Decimal Hours

Payroll software can’t multiply 7 hours 20 minutes by an hourly rate. It needs 7.33. Divide the leftover minutes by 60, add them to the whole hours, and round to two places.

Quarter hours are easy to memorize: 15 minutes is 0.25, 30 is 0.50, 45 is 0.75. Anything else, like 10 or 50 minutes, is where manual rounding drifts, so let the tool do it.

Some tasks need even finer units. Lab timings, video edits, and race splits often track seconds, so the time duration calculator also shows total seconds 7 hours 45 minutes equals 27,900. For timesheet conversions, use the Time to Decimal Calculator.

Calculating Time Duration in Excel or Google Sheets

Spreadsheets store time as a fraction of one day, which is why =B2-A2 sometimes shows a strange decimal or a negative time it can’t display. Excel and Google Sheets behave the same way here.

For overnight spans, wrap the subtraction in the MOD function: =MOD(B2-A2,1). Then apply the [h]:mm format so totals above 24 hours don’t reset to zero.

With the start time in A2 and the end time in B2, these formulas cover every output the time duration calculator shows. Format each cell exactly as listed; Microsoft’s guide explains the custom formats in more detail.

Result 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
Total seconds=MOD(B2-A2,1)*86400Number

What the Time Duration Calculator Doesn’t Count

It measures clock time between two times on the same or next day. It doesn’t know dates, so a daylight saving time change overnight makes the real span one hour shorter or longer than shown. Time and Date lists the exact changeover dates by country.

Breaks aren’t subtracted either. If you need paid hours after lunch, the Work Hours Calculator handles that. For spans over several days, the Date Difference Calculator counts calendar days instead.

Adding time to a clock is a different job too. For that, use the Time Calculator or the Hours From Now Calculator, and for weekly shift totals, the Timecard Calculator.

Keeping the tool this narrow is deliberate. One job, two inputs, and a result you can check by hand using the methods above.

Frequently Asked Questions

How many hours is 9 AM to 5 PM?

Exactly 8 hours, or 480 minutes. In decimal hours it’s 8.00. If your shift includes an unpaid 30-minute lunch, paid time drops to 7 hours 30 minutes, or 7.50.

How do I calculate time duration between two times?

Convert both times to 24-hour format and subtract the start from the end. Borrow 60 minutes when the end minutes are smaller, and add 24 hours if the end time is earlier.

How many hours is 10 PM to 6 AM?

8 hours. The span crosses midnight: 2 hours before 12:00 AM and 6 hours after. The time duration calculator handles it automatically when the end time is smaller than the start.

What is 0630 to 1415 in hours?

7 hours 45 minutes, or 7.75 decimal hours. Subtract 06:30 from 14:15 by borrowing an hour: 13:75 minus 06:30 gives 7:45.

Can I enter times without a colon?

Yes. Type four digits like 0845 or 1930 and the calculator reads them as 24-hour times. Standard entries like 8:45 AM work too.

Does it account for daylight saving time?

No. It compares clock times without dates, so it can’t detect a clock change. On changeover nights, an overnight span is one hour shorter when clocks spring forward and one hour longer when they fall back.