Time Duration Calculator
Hours and minutes between two times.
Show detailsHide 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
| Start | End | Duration |
|---|---|---|
| 09:00 | 17:30 | 8h 30m |
| 09:30 | 17:45 | 8h 15m |
| 13:00 | 17:30 | 4h 30m |
| 22:00 | 06:00 | 8h 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
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
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.
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

Creators
Computer Scientist & Developer Tools Author
Reviewers
Technical Reviewer
Table of Contents
Quick Facts
Related Tools
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.