Skip to content
UnitFormula

To find the time between two clock times, subtract the start from the end. Convert both to a common unit — minutes or seconds past midnight — take the difference, then convert back to hours and minutes. If the end time is earlier than the start, the span runs past midnight, so add 24 hours. Enter a start and end time and the calculator does this for you. For example, 9:00 AM to 5:00 PM is 8 hours.

Time Duration Calculator — hours between two times

The time from 9:00 AM to 5:00 PM.

Duration8:00:00
Decimal hours
8
Total minutes
480

Quick examples

How it's calculated

  1. Elapsed time = end − start (add 24 h if it runs past midnight)duration=endstart\text{duration} = \text{end} - \text{start}
    start
    = 32,400
    end
    = 61,200
    28,800
Duration8:00:00

How it works

Every clock time can be written as a number of minutes (or seconds) since midnight — 9:00 AM is 540 minutes, 5:00 PM is 1020 minutes. The duration between them is simply the difference: 1020 − 540 = 480 minutes, which is 8 hours.

When the end time is earlier on the clock than the start — an overnight shift such as 10:00 PM to 6:00 AM — the span crosses midnight. The calculator adds a full day (24 hours, or 1440 minutes) so the result comes out positive: 6:00 AM is 360 minutes, and 360 − 1320 + 1440 = 480 minutes, again 8 hours.

The result is shown three ways: as hours and minutes (the clock duration), as decimal hours (handy for timesheets and pay), and as total minutes. Decimal hours convert minutes by dividing by 60 — so 8 hours 45 minutes is 8.75 hours.

Worked example

From 9:00 AM to 5:00 PM: 5:00 PM is 1020 minutes past midnight and 9:00 AM is 540, so the duration is 1020 − 540 = 480 minutes. That is 8:00:00 — exactly 8 decimal hours, a standard full working day.

Frequently asked questions

How do I calculate the hours between two times?

Convert each time to minutes since midnight, subtract the start from the end, and convert the difference back to hours and minutes. For example, 9:00 AM (540 min) to 5:00 PM (1020 min) is 480 minutes, or 8 hours.

How do I work out hours across midnight?

When the end time is earlier than the start, the period spans midnight. Add 24 hours to the end before subtracting. For 10:00 PM to 6:00 AM, that gives 8 hours. This calculator applies the adjustment automatically.

What are decimal hours?

Decimal hours express minutes as a fraction of an hour by dividing by 60. So 30 minutes is 0.5 hours and 45 minutes is 0.75 hours, making 8 hours 45 minutes equal to 8.75 decimal hours — the form payroll and timesheets usually expect.

How do I convert the duration to total minutes?

Multiply whole hours by 60 and add the leftover minutes — or just read the "total minutes" output. An 8-hour span is 480 minutes; 8 hours 45 minutes is 525 minutes.

Does this calculator include seconds?

It works to the minute, which is what clock times (HH:MM) provide, and shows the duration in hours, minutes and seconds. Since the inputs have no seconds, the seconds place is always zero.

Can I use it for work hours and pay?

Yes. Enter your clock-in and clock-out times to get the shift length, then read the decimal hours to multiply by an hourly rate. For unpaid breaks, calculate each worked span separately and add them.