Time & dates

Time duration calculator

Pick a start time and an end time to see exactly how long the span is, in every format you might need.

An end time earlier than the start is treated as the following day.

How to find the duration between two times

Clock arithmetic is easiest in minutes. Turn each time into minutes after midnight (hours × 60 + minutes), subtract the start from the end, and if the result is negative add 1,440, the number of minutes in a day. Then split the total back into whole hours and leftover minutes. The calculator follows exactly these steps, so a span that crosses midnight never produces a negative answer.

Example: from 09:15 to 17:40. The start is 9 × 60 + 15 = 555 minutes, the end is 17 × 60 + 40 = 1,060 minutes. The difference is 505 minutes, which is 8 hours 25 minutes, or 505 ÷ 60 = 8.42 in decimal form. For an overnight span such as 23:10 to 01:50, the raw difference is 110 − 1,390 = −1,280; adding 1,440 gives 160 minutes, or 2 h 40 min.

FromToDurationMinutesDecimal
08:0012:304 h 30 min2704.50
09:1517:408 h 25 min5058.42
13:4515:051 h 20 min801.33
19:3022:503 h 20 min2003.33
23:1001:502 h 40 min1602.67

Which format to use, and pitfalls to avoid

Hours and minutes are the natural way to say a length of time aloud. Decimal hours are what spreadsheets and invoices need, because they can be multiplied by a rate. Total minutes are handy for comparing short spans such as meetings, calls or workouts, and seconds suit timing races or audio. The h:mm form (8:25) looks like a clock reading, so label it clearly in documents to avoid it being read as a time of day.

The most frequent manual error is borrowing incorrectly: 17:40 minus 9:55 is not 8:15 but 7 h 45 min, because you have to borrow 60 minutes, not 100. Another is forgetting midnight on late events. This tool measures one span within 24 hours; for gaps of several days, count the days separately and add 24 hours for each. Daylight saving changes can also add or remove an hour on the night the clocks move, which plain clock arithmetic does not see.

Frequently asked questions

How do I calculate the time between two times?

Convert both to minutes after midnight, subtract the start from the end, and add 1,440 if the result is negative. Divide by 60 for hours; the remainder is the minutes.

How many hours is 9:15 to 5:40?

From 9:15 AM to 5:40 PM is 8 hours 25 minutes, which is 505 minutes or 8.42 decimal hours.

How do I calculate a duration that goes past midnight?

Work out the time until midnight and add the time after it. From 22:30 to 03:15 is 1 h 30 min before midnight plus 3 h 15 min after, so 4 h 45 min in total.