Skip to main content
DoneThatDoneThat

Time duration calculator

How long is it from one time to another? Enter two clock times, or two dates and times, and get the duration in hours and minutes and in decimal hours.

Type times as you would say them, such as 845, 3:20pm or 15:20. An end time earlier than the start is counted on the next day.

In minutes, such as 30, or as h:mm, such as 1:15.

Duration

6 hours 35 minutes

Hours and minutes

6:35

Decimal hours

6.58

Total minutes

395

Everything is calculated in your browser. Nothing you enter is stored or sent anywhere.

Never type these in again

DoneThat reconstructs your hours from what you actually worked on, without timers, then shows them per day and per project and exports them as CSV.

Desktop app for Windows, macOS and Linux. 14-day free trial.

How to calculate a time duration by hand

A time duration is the length of time between a start and an end: how long a flight, a meeting, a bake or a train journey takes. Subtracting times is ordinary subtraction with one catch. An hour has 60 minutes, not 100, so when the minutes run out you borrow an hour and turn it into 60 minutes.

Here is the example the calculator starts with, 8:45 AM to 3:20 PM:

Write both times on a 24-hour clock

8:45 AM → 8:45 3:20 PM → 15:20

Subtract the minutes; borrow if you can't

20 − 45 won't go, so 15:20 becomes 14:80

Subtract hours and minutes separately

14:80 − 8:45 = 6 hours 35 minutes

A quick check is to count up from the start instead: 8:45 to 9:00 is 15 minutes, 9:00 to 3:00 PM is 6 hours, and 3:00 to 3:20 is 20 more. 6 hours plus 35 minutes, the same answer.

Durations that cross midnight

When the end time looks earlier than the start, the span runs into the next day. Add 24 hours to the end before subtracting. 10:15 PM to 1:40 AM is 22:15 to 25:40, and 25:40 − 22:15 is 3 hours 25 minutes. In the two times mode the calculator does this on its own whenever the end comes before the start, and says so under the result.

For anything longer than a day, switch to two dates and times. Count the whole days first, then the hours left over. Friday 6:00 PM to Monday 8:30 AM is 2 days to Sunday 6:00 PM, plus 14 hours 30 minutes to Monday morning: 2 days 14 hours 30 minutes, or 62.5 hours. The calculator gives the same span in days, hours and minutes, in total hours and minutes, and in decimal hours.

The dates mode uses the clock on your own device. If a span crosses the night the clocks go forward or back where you are, it counts the time that really passed, so the result is an hour shorter or longer than the clock faces suggest, and a note says so. It does not convert between time zones; to line up times in different places, use the time zone meeting planner.

Common time spans

Some spans come up again and again. Here they are in hours and minutes and in decimal hours, with nothing taken off for a break:

Common time spans in hours and minutes and in decimal hours
From and toHours and minutesDecimal hours
9 AM to 5 PM8:008.00
7:30 AM to 4 PM8:308.50
8:45 AM to 3:20 PM6:356.58
10 AM to 6:45 PM8:458.75
Noon to 3:45 PM3:453.75
7 AM to 7 PM12:0012.00
10:15 PM to 1:40 AM3:253.42
11 PM to 7 AM8:008.00

If the span is a working day and you want to take off lunch, round to the quarter hour or work out pay, the work hours calculator is built for shifts.

When decimal hours matter

Hours and minutes are easy to read; decimal hours are easy to calculate with. You need the decimal form whenever a duration gets multiplied or added up by something other than a person:

  • Billing by the hour. 1 hour 45 minutes at $60 an hour is 1.75 × $60 = $105. Typing it as 1.45 hours would bill $87.
  • Payroll and timesheets. Payroll systems usually want decimal hours, so 6:35 goes in as 6.58.
  • Spreadsheets. Excel stores a time as a fraction of a day, so 12:00 PM is 0.5 (Microsoft Support, TIME function). Subtract two times and multiply by 24 for hours, or by 1,440 for minutes (Microsoft Support, difference between two times).

To convert by hand, divide the minutes by 60: 15 minutes is 0.25, 30 is 0.5 and 45 is 0.75. For a full chart and the conversion back, use the hours to decimal converter.

Written and maintained by the DoneThat team. The examples match the calculator code, and the spreadsheet details were last checked against Microsoft’s documentation on 3 November 2026.

Frequently asked questions

How do I calculate the duration between two times?

Write both times on a 24-hour clock and subtract the start from the end, minutes first. If the minutes would go negative, borrow one hour as 60 minutes. 8:45 AM to 3:20 PM is 15:20 minus 8:45: borrow to make 14:80, and 14:80 minus 8:45 is 6 hours 35 minutes.

How many hours are there between two dates?

Count the whole days and multiply by 24, then add the difference between the two times. Monday 9:00 AM to Wednesday 5:00 PM is 2 days and 8 hours, which is 2 × 24 + 8 = 56 hours.

What if the end time is earlier than the start time?

Then the span runs past midnight into the next day. Add 24 hours to the end time before you subtract: 10:15 PM to 1:40 AM is 22:15 to 25:40, which is 3 hours 25 minutes. Two identical times give 0; for exactly 24 hours, use the two dates mode.

How do I turn a duration into decimal hours?

Divide the minutes by 60 and add them to the whole hours. 6 hours 35 minutes is 6 + 35 ÷ 60, which is 6.58 hours rounded to two places. Do not write it as 6.35: that is 6 hours 21 minutes.

Does the calculator handle daylight saving time and time zones?

In the two dates mode it counts the real time that passes in your device's time zone, so a span across a clock change comes out an hour shorter or longer, and the result says so. The two times mode assumes the clocks do not change. It does not convert between time zones; both times are read in your local time.

Is anything I enter saved?

No. Everything is calculated in your browser and nothing you type is stored or sent anywhere, so the times are gone when you close the page.