Time Duration Calculator: Hours Between Two Times
Find the exact time between any two dates and times, in days, hours, minutes and seconds. Works across midnight and multi-day spans.
Find the exact time between any two dates and times, in days, hours, minutes and seconds. Works across midnight and multi-day spans.
A time duration calculator measures the exact gap between two points in time. Enter a start date and time and an end date and time, and the calculator subtracts the start from the end, then breaks the result into days, hours, minutes and seconds.

The calculation works the same whether the two times fall on the same day, span midnight, or are weeks apart. Internally everything is converted to a single number of seconds, the subtraction happens once, and the result is converted back into days, hours, minutes and seconds for display.
If you need to find someone's age from a birth date instead of a duration between two arbitrary times, our age calculator handles years, months and days specifically.
The math behind a duration is a single subtraction, done in the smallest unit to avoid rounding errors:
Useful conversions: 1 day = 86,400 seconds, 1 hour = 3,600 seconds, 1 minute = 60 seconds. Decimal hours = total minutes ÷ 60. So 510 minutes is 8.5 hours.
Find the duration from 09:00 to 17:30 on the same day:

When the end time is earlier in the day than the start time, the calculator treats the end as falling on the next day. A shift from 22:00 to 06:00 is 8 hours, not a negative number.
For multi-day spans, enter the actual calendar dates. From Monday 09:00 to Wednesday 17:30 is 2 days, 8 hours and 30 minutes, 56.5 hours in total. The date inputs make this automatic; you never have to add 24 hours by hand.
For quick percentage-style checks on time sheets, such as what share of a shift is overtime, the percentage calculator pairs well with duration results.
| Start | End | Duration | Decimal hours |
|---|---|---|---|
| 09:00 | 17:00 | 8 hours | 8.0 |
| 09:00 | 17:30 | 8 hours 30 min | 8.5 |
| 22:00 | 06:00 (+1 day) | 8 hours | 8.0 |
| Mon 09:00 | Wed 17:30 | 2 days 8 h 30 min | 56.5 |
| 08:15 | 12:45 | 4 hours 30 min | 4.5 |
| 00:00 | 23:59 | 23 hours 59 min | 23.98 |

The most common use of this calculator is finding the hours between two clock times, for a work shift, a flight, or a rental. Enter the start time and the end time on the same date and read the duration in hours and minutes, plus the decimal hours that payroll and invoicing usually need.
A shift runs from 8:45 AM to 5:15 PM. Working by hand, borrow an hour when the minutes fight you: 5:15 PM is 17:15, and 15 minutes cannot take away 45, so rewrite 17:15 as 16:75. Subtract in two parts: 75 − 45 = 30 minutes, and 16 − 8 = 8 hours. The shift is 8 hours 30 minutes, which is 8.5 decimal hours. The calculator returns the same span as 510 minutes, or 30,600 seconds.
| Duration | Decimal hours |
|---|---|
| 7 hours 45 minutes | 7.75 |
| 8 hours 15 minutes | 8.25 |
| 8 hours 30 minutes | 8.5 |
| 9 hours 15 minutes | 9.25 |
| 9 hours 20 minutes | 9.33 |
Multiply decimal hours by an hourly rate to get gross pay for one shift. For a full week of shifts, the time card calculator totals each day and applies overtime rules on top.
A duration is often not the end of the job. You may need to add two spans together, or add a span to a start time to find a finish time, such as a 2 hour flight that leaves at 9:40 AM and lands at 11:40 AM. The add time calculator adds hours, minutes and seconds in chains like that, and the time calculator covers the same ground with dates included. Use this page to measure the gap first, then carry the result into those tools.
Subtract the start time from the end time. Convert both to minutes (hours × 60 + minutes), subtract, then convert back: divide by 60 for hours and keep the remainder as minutes. From 09:00 to 17:30: 1,050 − 540 = 510 minutes = 8 hours 30 minutes.
The calculator assumes the end falls on the next day. A shift from 22:00 to 06:00 is 8 hours. If you meant the same day, the result would be negative, so the overnight assumption is the useful default.
Divide minutes by 60. So 510 minutes ÷ 60 = 8.5 hours. The .5 means half an hour, i.e. 30 minutes. Payroll systems often use decimal hours, which is why the calculator shows both formats.
Yes. Enter the real start and end dates and the calculator counts every full day in between. From Monday 09:00 to Friday 17:00 it reports 4 days and 8 hours (104 hours total).
No. The calculator treats every day as exactly 24 hours. Across a daylight-saving changeover the real elapsed time can differ by an hour. For legal or payroll use across a DST boundary, verify with an authoritative time source.
They mean the same thing here: the amount of elapsed time between two timestamps. Duration is the common term in everyday use; interval is more common in scheduling and programming.
Exact to the second for the times you enter. Accuracy depends on your inputs, the calculator cannot know about breaks, pauses or time-zone changes unless you adjust the start and end times yourself.