Skip to content

Time Duration Calculator

Hours and minutes between two times, overnight shifts included.

Only for spans longer than a day. An end time before the start already counts as overnight.

Duration

8 h 30 min

Both times are on the same day.
Hours and minutes8 h 30 min
Decimal hours8.5
Total minutes510
Hours
8
Minutes
30

How it works

Enter two clock times and this works out how long sits between them. An end time at or before the start is taken as the next day, so a shift from 22:00 to 06:00 comes out as eight hours rather than minus sixteen. Identical times mean a full 24 hours. Decimal hours are included for timesheets, where 8 h 30 min is normally entered as 8.5.

duration = end − start (+ 24 h when the end is earlier)

Example

  • 09:00 → 17:30 = 8 h 30 min (8.5 hours)
  • 22:00 → 06:00 = 8 h, overnight

Clock arithmetic only — daylight-saving changes and timezones aren't applied, because a duration between two clock times doesn't depend on either.

About this calculator

Enter a start time and an end time and this works out how long sits between them, in hours and minutes, in decimal hours for timesheets, and in total minutes. An end time at or before the start is taken as the next day, so a shift from 22:00 to 06:00 comes out as eight hours rather than a negative number.

Spans longer than a day are handled by adding whole extra days on top. The arithmetic is on clock times only — no timezone and no daylight-saving adjustment — because the gap between two clock readings does not depend on either.

Frequently asked questions

How do I calculate hours between two times?

Convert both times to minutes since midnight, subtract, and convert back. From 09:00 (540 minutes) to 17:30 (1,050 minutes) is 510 minutes, or 8 hours 30 minutes.

How do I calculate an overnight shift?

Add 24 hours to the end time before subtracting. A 22:00 to 06:00 shift is (06:00 + 24 h) − 22:00 = 8 hours. This calculator does that automatically whenever the end time is at or before the start.

What are decimal hours, and why do timesheets use them?

Decimal hours express minutes as a fraction of an hour, so 8 hours 30 minutes is 8.5. Payroll systems multiply by an hourly rate, and that is far easier with 8.5 than with hours-and-minutes, which is why most timesheets ask for the decimal form.

What happens if the start and end times are identical?

It is treated as a full 24 hours rather than zero, which is what someone entering a shift from 09:00 to 09:00 means. For a zero-length result, leave the fields as a normal same-day span.