Skip to content
thecalculatorstudio

Time Duration Calculator: Time Between Two Times

Enter a start time and an end time, and optionally the dates. You get the elapsed time in words, as decimal hours and in total minutes, and shifts that cross midnight are handled.

Last reviewed

Elapsed time

9 hours, 25 minutes

the end time is earlier, so it is counted as the next day

Decimal hours
9.4167
Total minutes
565
Days
0

Leave both dates blank for times on one day, or on two days when the end time is earlier, as for a night shift. Time zones and daylight saving are not allowed for.

How the time between two times is worked out

The elapsed time is the end minus the start. The clock makes this slightly awkward, because the minutes run to 60 and the day wraps at midnight. The calculator converts both times to seconds and subtracts:

  • Same day: end − start. From 9:15 am to 5:30 pm is 8 hours and 15 minutes.
  • Across midnight with no dates: if the end is earlier on the clock than the start, the calculator reads it as the next day and adds 24 hours. From 9:15 pm to 6:40 am is (24:00 − 21:15) + 6:40 = 2:45 + 6:40 = 9 hours 25 minutes.
  • With dates: the whole days between the dates count 24 hours each, added to the difference between the two times of day.

A day is 86,400 seconds, an hour 3,600 seconds and a minute 60 seconds, as NIST lists in its table of exact conversion factors.

Worked examples

Start End Elapsed Decimal hours
9:15 am 5:30 pm 8 hours, 15 minutes 8.25
9:15 pm 6:40 am 9 hours, 25 minutes 9.4167
11:00 pm 7:00 am 8 hours 8
8:00 am 8:00 am 0 seconds 0
6:00 am 2:45 pm 8 hours, 45 minutes 8.75

With dates:

  • 1 March at 8:00 to 3 March at 20:30 is 2 days × 24 h + 12 h 30 min = 2 days, 12 hours, 30 minutes, which is 60.5 hours.
  • 31 December at 22:00 to 1 January at 02:00 is 4 hours.

Decimal hours and minutes

Payroll and billing usually want decimal hours: hours plus minutes ÷ 60. 8 hours 15 minutes is 8.25 hours, and 9 hours 25 minutes is 9 + 25 ÷ 60 = 9.4167. The total in minutes is shown too: 9 hours 25 minutes is 565 minutes.

Things it does not do

  • Breaks. The result is the full elapsed time. Subtract a lunch break with the time calculator, or use the time card calculator.
  • Time zones. Both times are on the same clock. For different cities, use the time zone converter.
  • Daylight saving. If the period contains the night the clocks change, the true elapsed time differs by an hour.
  • Periods over ten years. The calculator stops at 3,650 days.

Common mistakes

  • Mixing am and pm. 12:00 am is midnight and 12:00 pm is noon.
  • Subtracting minutes as decimals. 5:30 minus 4:45 is 0:45, not 0.85.
  • Forgetting the dates for periods over 24 hours. Without dates, the longest result is just under 24 hours.
  • Expecting an end before the start to show a negative time. With no dates it means the next day. With dates it is an error.

For the number of days between two dates, use the days between dates calculator, and for adding up hours worked the hours calculator.

Overnight and multi-day shifts

With no dates entered, a start of 22:30 and an end of 06:15 is read as an overnight shift: the end is the next morning, so the time between them is 7 hours 45 minutes, or 7.75 decimal hours.

If a period is longer than one night, enter the dates. From 22:00 on 14 October 2026 to 07:30 on 16 October 2026 is 1 day 9 hours 30 minutes, which is 33.5 hours.

How it is calculated

The arithmetic is exact whole-number arithmetic in seconds. Decimal hours are rounded to four places for display.

Frequently asked questions

How do I find the time between two times?

Subtract the start from the end. From 9:15 am to 5:30 pm is 8 hours 15 minutes. If the end is earlier on the clock than the start, the period crosses midnight, so add 24 hours.

How are overnight shifts handled?

With no dates entered, an end time earlier than the start is counted as the next day. 9:15 pm to 6:40 am is 9 hours 25 minutes, which is 9.4167 decimal hours.

How do I include dates?

Enter both the start and end dates. The difference in days is added at 24 hours a day to the difference between the times of day. A start of 1 March at 8:00 and an end of 3 March at 20:30 is 2 days 12 hours 30 minutes.

How do I get decimal hours?

Divide the minutes by 60 and add the hours. 8 hours 15 minutes is 8.25 hours. The calculator shows this next to the elapsed time.

Does it subtract a lunch break?

No, it gives the full elapsed time. To take off breaks, subtract them with the time calculator or use the time card calculator, which has a break for each day.

What about daylight saving time?

The calculator does not allow for it. If your period crosses the night that the clocks change, the real elapsed time is an hour more or less than the clock difference.

Related calculators

Sources