Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Duration
8h 30m
elapsed time between the two clock times
Total minutes 510 min
Decimal hours 8.5 h

What is the Clock Duration Calculator?

The Clock Duration Calculator tells you exactly how much time passes between two clock readings. Enter a start time and an end time using a 24-hour clock and it returns the duration as hours and minutes, total minutes, and decimal hours. It correctly handles shifts that cross midnight, so an overnight span is never reported as a negative number.

How to use it

Enter the start hour (0-23) and minute (0-59), then the end hour and minute. For example, a 9:00 start and a 17:30 end. Click calculate to see the elapsed time. If the end time is earlier than the start time, the calculator assumes the end is on the next day and adds 24 hours automatically.

The formula explained

Each time is converted to total minutes since midnight: start = \(60 \times \text{hour} + \text{minute}\), and the same for end. The duration is end \(-\) start. If that result is negative (end falls before start on the clock), 1440 minutes (24 hours) is added so the answer reflects an overnight span. The total minutes are then split into whole hours (total \(\div\) 60, rounded down) and the leftover minutes (total mod 60).

$$\begin{gathered} \Delta = \left(60\,\text{End hour} + \text{End min}\right) - \left(60\,\text{Start hour} + \text{Start min}\right) \\[1em] \text{Duration} = \left(\Delta \bmod 1440\right)\ \text{minutes} \end{gathered}$$
Circular clock face showing an arc swept from a start time to an end time
Duration is the arc swept clockwise from the start time to the end time on a 24-hour cycle.

Worked example

Start 22:15, end 06:45. Start = \(22 \times 60 + 15 = 1335\) min. End = \(6 \times 60 + 45 = 405\) min. Difference = \(405 - 1335 = -930\), which is negative, so add 1440: \(-930 + 1440 = 510\) minutes. That is 8 hours and 30 minutes, or 8.5 decimal hours.

Horizontal timeline crossing midnight showing an overnight duration
For overnight spans the duration wraps past midnight (mod 24h).

FAQ

Does it handle overnight shifts? Yes. When the end time is earlier than the start time it adds 24 hours, giving the correct cross-midnight duration.

What is the maximum duration? Because times wrap once at midnight, the maximum result is just under 24 hours.

Why show decimal hours? Decimal hours (e.g. 8.5) are handy for timesheets and payroll where pay is computed per hour.

Last updated: