Measuring a duration
A duration is the amount of time that passes between a start and an end. To compute one precisely, express both moments as a number of seconds from a common reference point, subtract, and then break the difference back into days, hours, minutes and seconds. Working in seconds avoids every pitfall of mixed units: 60 seconds per minute, 60 minutes per hour and 24 hours per day.
Duration = end − start (add 86,400 if the end time is earlier on the same-day mode)
Days = ⌊duration ÷ 86,400⌋, hours = ⌊rest ÷ 3,600⌋, minutes = ⌊rest ÷ 60⌋, seconds = remainder
Converting a 12-hour clock to 24-hour form: 12:xx AM becomes 0:xx, 1 AM to 11 AM stay the same, 12:xx PM stays 12:xx, and 1 PM to 11 PM add 12.
Between two times on the same day
The first mode compares two clock times. If the end time is earlier than the start, the calculator assumes the start was the previous day, which is the usual meaning for night shifts, flights that land after midnight, or sleep.
Worked example: an overnight span
From 9:45:20 PM to 3:10:05 AM. The start is 21 × 3,600 + 45 × 60 + 20 = 78,320 seconds. The end is 3 × 3,600 + 10 × 60 + 5 = 11,405 seconds. The end is earlier, so add 86,400: 11,405 + 86,400 − 78,320 = 19,485 seconds. That is 5 hours, 24 minutes and 45 seconds, or 5.413 hours, 324.75 minutes.
Between two dates and times
The second mode adds a date to each side, so the span can run for days, months or years. The calendar part is converted to whole days and multiplied by 86,400 seconds, then the clock parts are added.
Worked example
From January 15, 2026 at 8:30:00 AM to February 20, 2026 at 5:45:15 PM is 36 days, 9 hours, 15 minutes and 15 seconds. In single units that is 36.3856 days, 873.254 hours, 52,395.25 minutes or 3,143,715 seconds.
Precision of the decimal totals
| Total | Shown to | Example |
|---|---|---|
| Days | 4 decimal places | 36.3856 days |
| Hours | 3 decimal places | 873.254 hours |
| Minutes | 2 decimal places | 52,395.25 minutes |
| Seconds | Whole seconds | 3,143,715 seconds |
Values smaller than 1 keep the same number of significant digits instead, so 59 seconds shows as 0.0164 hour and 0.98 minute rather than rounding toward zero.
Daylight saving time and time zones
Both modes use local wall-clock time. If the span crosses a daylight saving change, the true elapsed time differs by one hour from the result: one hour shorter in spring and one hour longer in autumn. If the two times are in different time zones, convert one of them first with the time zone calculator.
Everyday uses
- Tracking how long a task, call, workout or race took.
- Checking sleep length from bedtime to wake-up.
- Measuring machine run time or downtime from log timestamps.
- Working out the length of a trip between departure and arrival.
Converting between units
Once you have a duration in seconds, every other unit follows by division. Divide by 60 for minutes, by 3,600 for hours and by 86,400 for days. Going the other way, multiply. A 90-minute movie is 5,400 seconds or 1.5 hours; a 10,000-second task is 2 hours 46 minutes 40 seconds, or about 2.778 hours. When you need the answer in hours and minutes for a timesheet, take the whole hours first and convert only the fractional part back to minutes by multiplying it by 60.
Seconds are optional: leave them at 0 when you only care about hours and minutes.