Time Duration Calculator
Enter one or more time ranges and see how long each lasts and the total. A range that ends earlier than it starts is treated as running past midnight, so 22:00 to 06:30 is 8 hours 30 minutes. You can take off an unpaid break, and read the result as hours and minutes or as decimal hours for timesheets. Everything runs in your browser.
Result
- In decimal hours
- Total minutes
- Ranges
| Range | Start | End | Duration | Note |
|---|
Examples
Worked examples:
| Times | Duration | Note |
|---|---|---|
22:00 - 06:30 | 8 hours and 30 minutes | Passes midnight |
09:00 - 17:30 | 8 hours and 30 minutes | Same day |
9am - 5:15pm | 8 hours and 15 minutes | Same day |
23:45 - 00:15 | 30 minutes | Passes midnight |
Formula & Methodology
Each time becomes minutes after midnight. When the end is later than the start the duration is end โ start. When the end is earlier, the range runs past midnight and the duration is end + 24 hours โ start. Breaks are subtracted, and the ranges are added up.
d = end โ startd = end + 24:00 โ start (end < start)Decimal hours are minutes รท 60 rounded to two decimals, so 8 h 20 min is 8.33.
Notes and limitations
- Times are wall-clock readings. Daylight-saving changes and time zones are not applied, so a night that gains or loses an hour is not adjusted.
- A range can be at most 24 hours. For longer periods use the date difference calculator.
- An end time earlier than the start time is read as ending after midnight (22:00 to 06:00 is 8 hours). Write midnight as 00:00; 24:00 is not accepted.
- Seconds you type are ignored; results are in whole minutes.
- The same start and end time is 0 minutes unless you choose to treat it as 24 hours.
- You can enter up to 500 ranges.
How to Use
- Type each time range on its own line.
- Add an unpaid break if you want it taken off every range.
- Read each duration and the total.
- Copy the total in the format you need.
Frequently Asked Questions
How do I calculate time that passes midnight?
If the end time is earlier than the start time, add 24 hours to the end time. For 22:00 to 06:30 that is 6:30 + 24:00 โ 22:00 = 8 hours 30 minutes. The calculator does this automatically.
How do I turn hours and minutes into decimal hours?
Divide the minutes by 60 and add the hours. 8 hours 30 minutes is 8.5 hours, and 8 hours 20 minutes is about 8.33 hours.
Can I add several shifts together?
Yes. Put each shift on its own line and the calculator gives each duration and the total.
Are daylight-saving changes included?
No. The tool works with clock times only. On a night when the clocks change, the real elapsed time differs by one hour from the result.
Is anything sent to a server?
No. The calculation runs in your browser and nothing you enter is uploaded or sent to analytics.
Last updated: