Time Duration Calculator
Calculate duration between two times
Reliable calculator with instant results. Clean interface, accurate computations.
Formula
Calculate time differenceHow to Use Time Duration Calculator
- Fill in the calculator with your numbers.
- Verify your inputs are correct.
- Read the instant calculation results.
- Copy or apply the results as needed.
Examples
Example 1
Input
startTime: 09:00
endTime: 17:30
Output
hours: 8
minutes: 30
total_minutes: 510
Duration is the elapsed time between two clock times or timestamps, the calculation behind billable hours, a shift length, or how long a call lasted, and the case that trips people up is any span that crosses midnight, where the end time is numerically smaller than the start time.
The formula
duration = (end time - start time + 24:00) mod 24:00- end time
- the finishing time of day
- start time
- the starting time of day
- 24:00
- one full day, used to wrap a negative result back to positive
Worked example
A night shift runs from 22:45 to 01:15. A plain subtraction, 01:15 minus 22:45, gives a negative number, so add 24 hours first: 25:15 minus 22:45 = 2 hours 30 minutes. Check it by counting forward instead: 22:45 to 24:00 is 1 hour 15 minutes, and 00:00 to 01:15 is another 1 hour 15 minutes, for the same 2 hours 30 minutes total.
What trips people up
- Subtracting start from end directly gives a negative or nonsensical result whenever the span crosses midnight; wrap the result with modulo 24 hours instead.
- A duration expressed only in minutes needs both hours and minutes converted to the same unit first, or the subtraction mixes scales.
- 12 hour clock times without AM or PM are ambiguous inputs; 1:15 could be either 01:15 or 13:15, and the two give very different durations.
- A duration spanning multiple full days plus a partial day needs the whole days counted separately from the leftover hours and minutes, not blended into one figure.
Frequently asked questions
- How do I calculate duration when the times cross midnight?
- Add 24 hours to the end time before subtracting, then take the result modulo 24 hours, which correctly wraps a negative subtraction back into a positive duration.
- Can this calculate duration across more than one full day?
- Yes, by counting the whole days separately from the leftover hours and minutes, rather than trying to express a multi-day span as a single hours-and-minutes figure.
- Why do two duration calculators sometimes disagree by an hour?
- Usually a daylight saving transition falling inside the span, which makes one day either 23 or 25 hours long instead of the usual 24, depending on the direction of the clock change.
- How should I enter a time like 1:15 to avoid ambiguity?
- Use 24 hour format, 01:15 or 13:15, rather than a bare 12 hour time, since 1:15 alone does not specify whether it falls in the morning or the afternoon.
- Does duration include or exclude the starting minute?
- By convention it measures the gap between the two instants, so a start and end time that are identical give a duration of zero, not one minute.