Time Duration Calculator

Enter a start time and an end time to see how long it is between them. The time duration calculator handles overnight shifts and ranges that span several days.

Updated
Runs in your browser. Your data is not uploaded.

Show times as

Duration
–

How to use the Time Duration Calculator

  1. Enter the Start time and the End time. Switch between 12-hour and 24-hour format if you prefer.
  2. If the range covers more than one day, tick Different dates and fill in the start date and end date.
  3. Press Calculate. The duration appears in hours and minutes, with decimal hours and total minutes underneath.

How it works

Without dates, the calculator subtracts the start time from the end time:

diff = end − start
if diff < 0: diff = diff + 24 h

A negative difference means the period crosses midnight, so 24 hours are added and an "Overnight" note is shown.

With dates, both points are combined into a date and time and subtracted directly:

diff = (endDate + endTime) − (startDate + startTime)
  • start, end: the clock times you entered
  • startDate, endDate: the optional dates
  • diff: the elapsed time, shown as hours and minutes and as decimal hours to 4 places

Examples

  • 09:15 to 17:40 = 8 h 25 m (8.4167 hours, 505 minutes).
  • 22:30 to 06:15 = 7 h 45 m, overnight (7.75 hours, 465 minutes).
  • 2026-09-25 08:00 to 2026-09-27 20:00 = 60 h 0 m.

Converting a duration to decimal hours

Timesheets and invoices often ask for hours as a decimal. Divide the minutes by 60 and add the result to the hours: 8 hours 25 minutes is 8 + 25 ÷ 60 = 8.4167 hours.

MinutesDecimal hours
150.25
200.3333
300.5
400.6667
450.75

A common mistake is to write 8:25 as 8.25. That is 8 hours 15 minutes, so each entry comes out 10 minutes short. The calculator shows the decimal value under every result to avoid this.

Limitations

  • The same start and end time without dates gives 0, not 24 hours. For a full 24-hour shift, turn on Different dates.
  • Times are wall-clock times with no time zone. A daylight saving change inside the range is not applied, so on those nights the real elapsed time can be an hour more or less.
  • With dates, an end that falls before the start gives an error. Use Swap to reverse them.

Frequently asked questions

How do I calculate the time between two times?

Subtract the start time from the end time. If the end is earlier than the start, add 24 hours, because the period crosses midnight.

Does it work for overnight shifts?

Yes. When the end time is earlier than the start time, the calculator assumes the end is on the next day and shows an "Overnight" note.

Can I calculate a duration longer than 24 hours?

Yes. Turn on "Different dates" and enter a start date and an end date.

Does it account for daylight saving time?

No. It uses wall-clock time. On the night clocks change, the real elapsed time may be one hour more or less.

Often used together with the Time Duration Calculator.