Dates and time
How to calculate time duration
Convert both clock times to a consistent 24-hour format, subtract the start from the end, and account for midnight when the interval continues into the next day.
Open the time duration calculatorDuration = end time − start time
If the end is on the following day, add 24 hours before subtracting.
Calculate a same-day duration
Find the duration from 9:35 AM to 5:20 PM. In 24-hour time, that is 09:35 to 17:20.
- Borrow one hour because 20 minutes is less than 35 minutes.
- Minutes: 80 − 35 = 45.
- Hours after borrowing: 16 − 9 = 7.
The duration is 7 hours 45 minutes.
An alternative is to convert everything to minutes: 17 × 60 + 20 = 1,040; 9 × 60 + 35 = 575; difference = 465 minutes = 7 hours 45 minutes.
Calculate across midnight
From 10:45 PM to 1:15 AM on the next day:
| Segment | Duration |
|---|---|
| 10:45 PM to midnight | 1 hour 15 minutes |
| Midnight to 1:15 AM | 1 hour 15 minutes |
| Total | 2 hours 30 minutes |
An end time earlier than the start does not automatically prove “next day.” That is a scheduling assumption you must specify.
Add or subtract a duration
To add 2 hours 50 minutes to 11:30 PM, add minutes first: 30 + 50 = 80 minutes, which is 1 hour 20 minutes. Then 11 PM + 2 hours + the carried hour reaches 2:20 AM on the following day.
For subtraction, converting to total seconds or minutes avoids repeated borrowing. Normalize the result back to clock time and report any previous-day or following-day offset.
Clock time limitations
A time-only calculation does not account for time zones, daylight-saving transitions or dates. On a clock-change day, the real elapsed duration can differ from the displayed clock-time subtraction. Use timestamps with zone information when exact elapsed time matters.
Calculate duration online
The free Time Duration Calculator finds the time between two clock values and can add or subtract a duration. Select the next-day option when the interval crosses midnight.