Time Duration Calculator

Find the time between two moments – each a date and a time with seconds – in days, hours, minutes and seconds.

Result

Duration

The same duration in other units

::
::

How to work out a time duration

  1. Convert both times to the 24-hour clock (2:15 PM → 14:15).
  2. Subtract the start from the end, seconds first, then minutes, then hours. If a column goes negative, borrow 60 from the next one.
  3. Add 24 hours for each day between the two dates. If the end time is earlier than the start on the next day, the period crossed midnight.
\begin{aligned} \text{duration} = \; &(\text{end date} - \text{start date}) \times 24\text{ h} \\ &+ (\text{end time} - \text{start time}) \end{aligned}
Example: 10:45:30 PM to 6:20:10 AM the next day

In 24-hour time that is 22:45:30 to 06:20:10 plus one day.

\begin{aligned} &24\text{ h} + 6{:}20{:}10 - 22{:}45{:}30 \\ &= 30{:}20{:}10 - 22{:}45{:}30 = 7{:}34{:}40 \end{aligned}

The duration is 7 hours 34 minutes 40 seconds.

Converting durations

FromToHowExample
Hours and minutesDecimal hoursminutes ÷ 607 h 45 min = 7.75 h
Decimal hoursHours and minutesdecimal part × 608.4 h = 8 h 24 min
Secondshh:mm:ss÷ 3600, then remainder ÷ 605000 s = 1:23:20
DaysHours× 242.5 days = 60 h

Which time calculator do I need?

QuestionUse
Time between two moments, with dates and secondsThis calculator
Hours worked in one shift, with a breakHours Calculator
A whole week of shifts, overtime and payTime Card Calculator
Adding or subtracting durations (2 h 40 min + 1 h 35 min)Time Calculator

Durations in Excel or Google Sheets

You wantFormula (start in A2, end in B2, as date-times)
Duration as h:mm:ss=B2-A2, formatted as [h]:mm:ss
Decimal hours=(B2-A2)*24
Total seconds=(B2-A2)*86400

The [h] brackets stop Excel from wrapping durations over 24 hours back to zero.

Frequently asked questions

How do I calculate the time between two times?

Convert both to the 24-hour clock and subtract the start from the end. If the end is earlier, add 24 hours – the period crossed midnight.

How do I convert minutes to decimal hours?

Divide the minutes by 60: 30 minutes = 0.5 hours, 45 minutes = 0.75 hours, 20 minutes = 0.333 hours.

Does it handle daylight saving time?

No. It counts clock time, so on the night clocks change, a real duration can be one hour longer or shorter than shown.

Can the duration span several days?

Yes. Choose different start and end dates and the result counts every day between, to the second.

How many seconds are in a day?

86400 seconds: 24 hours × 60 minutes × 60 seconds.