Time Duration Calculator
Find the elapsed time between a start and end time in hours, minutes and decimal hours.
Start time
End time
8h 30m
- 1
Start in minutes
09×60 + 00 = 540 min - 2
End in minutes
17×60 + 30 = 1,050 min - 3
Duration in minutes
1,050 − 540 = 510 min - 4
Decimal hours
510 ÷ 60 = 8.50
Formula
How this is calculated
Both the start and end times are entered as a clock time in 24-hour HH:MM format. Internally each one is converted to a single count of minutes-since-midnight: the hours field is multiplied by 60 and the minutes are added, so 09:00 becomes 540 and 17:30 becomes 1050. Working in plain minutes avoids any base-60 carrying errors that arise when subtracting hours and minutes separately.
The duration is simply end minus start in minutes. If that result is negative — the end clock reading is earlier than the start — the calculator assumes the span runs past midnight into the next day and adds 24 hours (1440 minutes), flagging the result as crossing midnight. The total minutes are then split back into whole hours (integer division by 60) and leftover minutes (the remainder), and also divided by 60 to give decimal hours, where 30 minutes reads as 0.5.
The calculation covers at most one 24-hour cycle, so a span longer than a full day, or one needing a specific calendar date, is not supported. It is a pure clock-difference and does not subtract breaks; use the Work Hours Calculator for paid-time totals.
Examples
| Input | Result |
|---|---|
| 09:00 to 17:30 | 8h 30m = 8.5 hours |
| 22:00 to 06:00 (overnight) | 8h 0m = 8.0 hours |
About this calculator
The time duration calculator measures how much time passes between a start time and an end time. Enter both in 24-hour HH:MM format. The result is shown in hours and minutes, as a decimal number of hours, and as a total number of minutes.
If the end time is earlier than the start time, the calculator assumes the span crosses midnight and adds 24 hours, which is convenient for overnight shifts or events that run past midnight. For pay calculations that also subtract breaks, use the Work Hours Calculator.
Frequently asked questions
If the end time is earlier than the start time, it assumes the end is on the following day and adds 24 hours, so 22:00 to 06:00 returns 8 hours.
Decimal hours expresses the duration as a single number, so 8 hours 30 minutes becomes 8.5 hours. It is useful for timesheets and billing.
Use 24-hour HH:MM, for example 13:45. The time picker on your device will format this automatically.
Also known as
TG we-Calculate Editorial Team. (2026). Time Duration Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/time-duration-calculator
TG we-Calculate Editorial Team. "Time Duration Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/time-duration-calculator.
TG we-Calculate Editorial Team, "Time Duration Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/time-duration-calculator
@misc{wecalculate_time_duration_calculator, title = {Time Duration Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/time-duration-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
