Time Duration Calculator

Hours and minutes between two times.

Show details

Enter a start time and an end time to get the exact duration between them, in hours and minutes and as decimal hours. Subtract a break for a true shift length, and it handles shifts that run past midnight.

Loading calculator...

How Many Hours Between Two Times? — The Quick Answer

Subtract the start time from the end time. If the end is earlier than the start, the span crosses midnight — add 24 hours. Subtract any break for your actual working time.

Shortcut

duration = end time − start time (+ 24 h if the end is past midnight)

Common durations

StartEndDuration
09:0017:308h 30m
09:3017:458h 15m
13:0017:304h 30m
22:0006:008h 00m (overnight)

To convert hours-and-minutes into decimal hours (for a timesheet), divide the minutes by 60: 8h 15m = 8 + 15/60 = 8.25 decimal hours.

How It Works

1
Enter the start time and the end time
2
Optionally enter a break in minutes to subtract from the total
3
The calculator works out the difference in hours and minutes
4
If the end time is earlier than the start, it assumes the shift crosses midnight
5
It shows both the hours-and-minutes duration and the decimal-hours equivalent

The Method

Converting times to minutes and finding the gap

Formula

duration (min) = end (min) − start (min) if negative, add 1440 (24 hours) subtract breaks, then decimal hours = minutes ÷ 60

Variables

+ 24 h

Overnight spans

If the end time is earlier than the start (e.g. 22:00 to 06:00), the shift runs past midnight, so a full 24 hours is added to keep the difference positive — giving the true overnight duration, 8 hours.

÷ 60

Decimal hours

Timesheets often want decimal hours. Divide the minutes by 60: 8h 15m → 15 ÷ 60 = 0.25, so 8.25 hours.

Note: This handles clock time, not time zones or paid-rate rules. Overtime multipliers, unpaid breaks, and rounding policies vary by employer — apply those to the duration separately.

Last updated: October 5, 2026

Tufail Ahmed

Creators

Tufail Ahmed

Computer Scientist & Developer Tools Author

Reviewers

Khizar Nadim

Technical Reviewer

Quick Facts

CategoryTime & Date
Cost Free
Last updated2026-10-05

Privacy Guaranteed

Your data never leaves your browser. All calculations are 100% private.

Frequently Asked Questions

How do I calculate the hours between two times?

Subtract the start time from the end time. From 09:30 to 17:45 is 8 hours and 15 minutes. The calculator also expresses this as 8.25 decimal hours, which is what most timesheets use.

How does it handle a shift that crosses midnight?

If the end time is earlier than the start time, the calculator treats the shift as running overnight and adds 24 hours. So 22:00 to 06:00 gives the correct 8-hour duration rather than a negative number.

How do I convert hours and minutes to decimal hours?

Divide the minutes by 60 and add them to the hours. 8 hours 15 minutes = 8 + (15 ÷ 60) = 8.25 decimal hours. This is the format payroll systems use, so it's handy for timesheets.

Does this account for time zones?

No — it calculates the raw difference between two clock times, so assume both are in the same time zone. For durations across time zones, convert both to a common zone first, then enter them here.