Time Duration Calculator
Find the time between two clock times, handling midnight, or add and subtract time.
What Is the Time Duration Calculator?
Working out how long something takes sounds trivial until the end time is earlier than the start time, at which point the answer is either negative or, more usefully, a shift that crosses midnight. That single case is where most time duration calculators go wrong, and it is the one this calculator handles explicitly. Enter a start and an end time and you get the duration in words, in minutes, in hours and minutes, in decimal hours, in total seconds, and as a percentage of the whole day. If the end is earlier than the start, it assumes you are measuring overnight and says so. A second mode adds or subtracts an arbitrary number of minutes from any clock time, which covers the other half of time arithmetic and rolls days forwards or backwards correctly.
Key Statistics
-
86,400
The number of seconds in a day, and minutes in 24 hours. Every duration here is bounded by this figure because a single clock reading cannot express more than one day. Working out a duration longer than 24 hours means working in days and times rather than two clock readings.
Source: Time and units, NIST Reference on Units of Measurement
-
1.30
A decimal trap: on a digital display this reads as one hour and thirty, which is 90 minutes, not 1 hour and 3 minutes. Time durations are not decimal numbers, which is exactly why billable hours, payroll and shift patterns are all expressed in hours and minutes or in decimal hours with a stated conversion rather than mixed.
Source: Decimal time, Wikipedia
-
24 x 60 x 60
Seconds in a day, which is why one day is not 24 hours in every context. Accounting for leap seconds means the mean solar day is fractionally longer than 86,400 SI seconds, and the discrepancy accumulates daily for any system that must stay synchronised.
Source: Leap second, Wikipedia
The Formula
Convert each time to minutes after midnight by multiplying the hour by 60 and adding the minute. Subtract the start from the end. If the result is negative, add 1,440 minutes, which is one whole day, and note that the duration crosses midnight. Divide the total minutes by 60 for decimal hours and by 3,600 for the percentage of a day.
Worked Examples
Start at 9:00 and end at 17:30. Start is 540 minutes after midnight and end is 1,050. The difference is 1,050 minus 540, which is 510 minutes, or 8 hours 30 minutes, or 8.5 decimal hours.
A normal working day
- Start at 9:00, which is 540 minutes after midnight.
- End at 17:30, which is 1,050 minutes after midnight.
- Subtract: 1,050 minus 540 is 510 minutes.
- Convert: 510 divided by 60 is 8.5 decimal hours.
- In hours and minutes that is 8 hours 30 minutes.
8 hours 30 minutes, or 8.5 decimal hours
A shift that crosses midnight
- Start at 22:00, which is 1,320 minutes after midnight.
- End at 6:00, which is 360 minutes after midnight.
- A direct subtraction gives 360 minus 1,320, which is minus 960.
- Add one full day of 1,440 minutes to get 480.
- That is 8 hours, and the shift has crossed midnight.
8 hours, crossing midnight
Adding 90 minutes to a clock time
- Start at 09:00, which is 540 minutes after midnight.
- Add 90 minutes to get 630.
- Divide by 60 for 10 hours with 30 minutes left over.
- The result is 10:30, on the same day.
10:30
Subtracting 45 minutes across midnight
- Start at 00:30, which is 30 minutes after midnight.
- Subtract 45 minutes to get minus 15.
- Add a full day of 1,440 minutes to get 1,425.
- That is 23 hours and 45 minutes, which is 23:45 the previous day.
23:45 on the previous day
Real World Use Cases
Shift and rota planning
Night shifts and rotas routinely cross midnight, which is exactly the case that produces a negative subtraction. Getting the wrap handling right is what stops a nine hour night shift from being recorded as minus fifteen hours.
Billing and timesheets
Legal and contractual billing is usually expressed in decimal hours, and this returns both the decimal and the hours and minutes form so an entry can be checked against the contract wording.
Travel and itinerary planning
Knowing a journey takes four hours and fifty minutes tells you whether a connection is feasible, and comparing against departure boards is far easier in words than in decimal hours.
Cooking, timers and elapsed tasks
Adding a preparation time to a start time, such as marinating from 18:15, gives a ready time without doing mental arithmetic on a phone in a kitchen.
Expert Tips
- ✓ Treat times as minutes after midnight rather than as clock readings. It removes every wrap and midnight case from the arithmetic in one step.
- ✓ If the end is earlier than the start, the answer is a duration crossing midnight. Confirm that is what you meant rather than assuming the tool got it wrong.
- ✓ Never read a duration of 1.30 as one hour and thirty minutes in a decimal context. Write 1.5 for decimal hours and 1:30 for clock notation, and never mix the two in one document.
- ✓ Anything longer than 24 hours needs days as a separate field. Two clock readings cannot express a duration of two days and six hours.
- ✓ Include seconds when the duration is short or precision matters. Rounding 4 hours 59 minutes to 5 hours is a nine minute error, which is large relative to the original.
Frequently Asked Questions
How do I calculate the time between two times? ▼
Convert both to minutes after midnight by multiplying the hour by 60 and adding the minute, then subtract. For 9:00 to 17:30 that is 1,050 minus 540, giving 510 minutes or 8 hours 30 minutes.
What happens when the end time is earlier than the start time? ▼
The duration crosses midnight, so add a full day of 1,440 minutes to the result. A start of 22:00 and an end of 6:00 is 8 hours overnight rather than a negative number, and this calculator flags that it has made this assumption.
How do I convert decimal hours to hours and minutes? ▼
Multiply the decimal hours by 60 and the result is the total minutes. Divide that by 60 for the hours and take the remainder for the minutes. So 8.5 decimal hours is 510 minutes, which is 8 hours 30 minutes.
Is 1.30 one hour and thirty minutes? ▼
Not when read as a decimal. In clock notation 1:30 means one hour and thirty minutes, but written as the number 1.30 it means one point three hours, which is 1 hour and 18 minutes. This ambiguity is why decimal hours should always be written with a decimal point and clock times with a colon.
How do I add time to a clock time? ▼
Convert to minutes after midnight, add your minutes, then divide by 60 and take the remainder for minutes. Adding 90 minutes to 09:00 gives 630 minutes, which is 10 hours 30 minutes, so 10:30.
What is the maximum duration two clock times can express? ▼
Just under 24 hours, specifically 1,439 minutes between 00:00 and 23:59. Any longer duration needs days recorded separately, because a single pair of clock readings cannot span more than one day.
How do I calculate hours worked across a midnight shift? ▼
Enter the shift start and shift end. If the end is earlier than the start the calculator adds the full day automatically and reports 8 hours for a 22:00 to 06:00 shift, rather than the minus 16 hours a raw subtraction would give.
Does this calculator handle seconds? ▼
It accepts hours and minutes, and reports the total in seconds for convenience. If your source data includes seconds, convert them into the minutes field as a decimal first, which this calculator accepts.
What is the percentage of a day figure? ▼
It is your duration expressed as a percentage of a full 24 hour day, which is 1,440 minutes. A 12 hour shift is 50 percent of the day, and this can be useful for capacity and utilisation calculations.
Why does my timesheet need decimal hours? ▼
Payroll and invoicing systems usually store time as a decimal so arithmetic on hours works directly. Converting 8 hours 30 minutes to 8.5 avoids the classic error of entering 8.30, which would be billed as 8 hours and 18 minutes.
Common Mistakes to Avoid
- ⚠ Getting a negative duration and assuming the calculator is broken, when it means the span crosses midnight.
- ⚠ Reading 1.30 as one hour and thirty minutes, producing an error of 27 minutes.
- ⚠ Forgetting to count the end time inclusively when counting days rather than measuring a span.
- ⚠ Assuming a duration of 24:00 is a valid clock time when it is not, since a day has no 24th hour.
- ⚠ Mixing 12 hour and 24 hour input, so a start of 9 means nine in the morning rather than nine at night.
Related Tools & Comparisons
Last updated: · by CalculatorPro Tools