Clock Calculator Time Duration: How to Find It
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator works out the duration between two clock times, or between a start time and a finish time, and returns the elapsed time in hours, minutes, and seconds. You enter a start time and an end time (or a start time and a duration), and the calculator gives you the difference as a clock-time duration. It handles crossing midnight, so a start of 23:30 and an end of 01:15 correctly returns 1 hour 45 minutes.
Formula
The core formula converts each clock time to minutes past midnight, subtracts, and adds 1440 (the number of minutes in a day) if the result is negative to handle crossing midnight. Then it converts back to hours, minutes, and seconds.
In symbols:
Duration (minutes) = (end_minutes − start_minutes + 1440) mod 1440
Where:
- start_minutes = (hours × 60) + minutes for the start time
- end_minutes = (hours × 60) + minutes for the end time
- mod 1440 means take the remainder after dividing by 1440, which wraps negative values into the correct positive duration
For example, 09:00 becomes 540 minutes, and 17:30 becomes 1050 minutes. The difference is 510 minutes, which is 8 hours 30 minutes.
Worked Example
Using the default values: start at 09:00, end at 17:30.
- Convert start: 9 × 60 + 0 = 540 minutes
- Convert end: 17 × 60 + 30 = 1050 minutes
- Subtract: 1050 − 540 = 510 minutes
- Since 510 is not negative, no wrap needed
- Convert to h:mm:ss: 510 ÷ 60 = 8 hours with 30 minutes left, so 8:30:00
The calculator shows 8:30:00 as the duration, which matches the manual calculation.
How to Read the Result
The result is a duration, not a time of day. A duration of 8:30:00 means 8 hours and 30 minutes elapsed, not 8:30 AM. This distinction matters when you are calculating pay hours, travel time, or cooking time. The calculator always outputs the duration in h:mm:ss format, where hours can be larger than 24 if you enter times more than a day apart (though the standard formula caps at 24 hours when using clock times).
If you enter times that cross midnight, such as 22:00 to 06:00, the result is 8:00:00. The formula adds 1440 minutes to the end time conceptually, then subtracts, so the math works without you having to add 24 hours manually.
Common Mistakes and Misconceptions
A frequent error is mixing 12-hour and 24-hour formats. If you enter 2:00 expecting 2 PM but the calculator interprets it as 2:00 AM, the duration will be wrong. Always use 24-hour time (e.g., 14:00 for 2 PM) or be consistent with AM/PM if your input method supports it.
Another common mistake is forgetting that a duration can exceed 24 hours when you are measuring something like a multi-day shift or a long trip. This calculator uses clock times, so the maximum duration it can return is 23:59:59. For longer periods, you would need to add days separately or use a different tool.
Rounding is also a source of confusion. When converting minutes to hours, you should not round the minutes to the nearest hour; keep the exact minutes and seconds. For example, 90 minutes is 1 hour 30 minutes, not 2 hours.
When to Use This Calculator
Use this calculator any time you need the exact elapsed time between two clock readings. Common situations include:
- Calculating work hours for a timesheet (e.g., 9:00 AM to 5:30 PM)
- Figuring out how long a meeting or event lasted
- Determining cooking time when a recipe says “start at 6:00 PM, finish at 7:15 PM�
- Planning travel time between two points if you know departure and arrival times
- Computing sleep duration from bedtime to wake time
For any of these, you enter the two clock times and read the duration directly. The calculator handles the midnight rollover automatically, so you do not need to add 12 hours or 24 hours yourself.
Limits of the Formula
The formula assumes both times are on the same day, or that the end time is after the start time within a 24-hour window. If you enter a start time and an end time that are more than 24 hours apart, the result will be wrong because the mod 1440 operation discards whole days. For example, start Monday 09:00 and end Tuesday 18:00 would give 9:00:00, but the actual elapsed time is 33 hours. To handle multi-day durations, you need to include the date in your calculation or use a different method that counts days separately.
Another limitation is that the calculator does not account for time zones or daylight saving time changes. If you are calculating a duration across a DST transition, the actual elapsed time may be 23 or 25 hours in a day. This calculator assumes a fixed 24-hour day, which is correct for most everyday uses but not for scheduling across time zones.
Alternatives and Related Calculations
If you need to add or subtract durations (e.g., “what time is 2 hours 45 minutes after 11:20?�), you can use a time addition calculator or do it manually by converting to minutes, adding, and converting back. This calculator only finds the difference between two times, not the result of adding a duration to a time.
For durations longer than 24 hours, you might use a date-time calculator that includes days. For time zone conversions, you would use a world clock or time zone converter. This tool is specifically for the simple, common case of clock-time difference within a single day.
Frequently Asked Questions
How do I calculate time duration in Excel?
In Excel, you can subtract one time from another: if A1 is 9:00 and B1 is 17:30, then =B1-A1 gives 8:30. Format the cell as [h]:mm to show hours beyond 24. For crossing midnight, use =MOD(B1-A1,1) to get the correct result.
What is the difference between elapsed time and duration?
They are essentially the same thing: the amount of time that passes from a start to an end. “Elapsed time� is often used in contexts like racing or cooking, while “duration� is a general term. Both refer to the length of an interval measured in hours, minutes, and seconds.
How do I convert minutes to hours and minutes?
Divide the total minutes by 60. The whole number is the hours, and the remainder is the minutes. For example, 135 minutes ÷ 60 = 2 hours with 15 minutes left, so 2:15.
Why does the calculator show 8:30 instead of 8.5 hours?
Because 8:30 is the standard way to express a duration in hours and minutes. 8.5 hours is the decimal equivalent (8 hours + 0.5 × 60 minutes = 8 hours 30 minutes). Both are correct, but the h:mm:ss format is more intuitive for time calculations.
Can I use this for time zones?
No, this calculator does not account for time zones. It assumes both times are in the same time zone. For time zone differences, you need to convert one time to the other’s zone first, then subtract.
Related
Formula used
in start | Start time (HH:MM) | - | 09:00 | 0 in end | End time (HH:MM) | - | 17:30 | 0 out dur | Duration | h:mm:ss | (end - start + 1440) % 1440 | time out start_min | Start (minutes) | min | start | 0 out end_min | End (minutes) | min | end | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.