Beginner

Time Between Two Times

Find the exact duration between a start and end clock time, expressed in hours, minutes, seconds, and decimal hours.

Crosses midnight

Auto adds 24h only when the end time is before the start time.
Duration (decimal hours)
8.5000h

8h 30m 00s

Hours : Minutes : Seconds
08:30:00
Total minutes
510
Total seconds
30,600
Decimal hours
8.5
09:0017:3008:30:0035.4% of a 24-hour day
Step by step
  1. 1

    Start seconds

    09×3600 + 00×60 = 32,400 s
  2. 2

    End seconds

    17×3600 + 30×60 = 63,000 s
  3. 3

    Duration in seconds

    63,000 − 32,400 = 30,600 s
  4. 4

    Decimal hours

    30,600 ÷ 3600 = 8.5000
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Enter a start and end clock time and this tool returns the duration between them in H:M:S, total minutes, total seconds, and decimal hours. If the end time is earlier than the start, it adds 24 hours to handle an overnight period crossing midnight automatically.

Formula
diff = (end − start) seconds; if diff < 0 add 86400; H:M:S = floor(diff/3600):floor(diff%3600/60):diff%60; decimal hours = diff/3600
How this is calculated

Each clock time is entered as HH:MM or HH:MM:SS and converted to a number of seconds since midnight using s = hours·3600 + minutes·60 + seconds. The hours must be 0-23 and minutes/seconds 0-59 for a valid 24-hour clock.

The raw difference is diff = s_end − s_start. When the end time is earlier than the start time, the interval spans midnight, so 86,400 seconds (one full day) is added. The "Crosses midnight" control lets you force this addition even when the two times are equal, which is useful for full overnight shifts. From the resulting seconds the tool derives H:M:S with floor division and the remainder, total minutes (diff/60), and decimal hours (diff/3600).

This assumes both times fall on the same day or one consecutive overnight period, and it ignores daylight-saving transitions. For multi-day spans use a full date-and-time difference calculator instead. The range meter shows the duration as a fraction of a complete 24-hour day.

Frequently asked questions

Enter 22:00 as the start and 06:00 as the end. Because the end is earlier, the calculator automatically adds 24 hours, giving 8 hours.

Decimal hours expresses the duration as a single number, so 90 minutes becomes 1.5 hours. It is handy for payroll and billing where hours are paid in fractions.

Yes. Enter times as HH:MM:SS (for example 09:15:30) and the result will account for the seconds in every output.

Also known as

hours between times
duration calculator
clock time difference
elapsed time
time between two clocks
how long between times
hours and minutes between

APA

TG we-Calculate Editorial Team. (2026). Time Between Two Times [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/time-between-times

Chicago

TG we-Calculate Editorial Team. "Time Between Two Times." TG we-Calculate. 2026. https://we-calculate.com/calculator/time-between-times.

IEEE

TG we-Calculate Editorial Team, "Time Between Two Times," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/time-between-times

BibTeX

@misc{wecalculate_time_between_times, title = {Time Between Two Times}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/time-between-times}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?