Use the calculator below to find the hours, minutes, and seconds between two times. Below that, find the duration between two full dates and times.
Enter start and end time using 24-hour format (0–23 for hours). If the end time is earlier than the start, the calculator assumes the end is the next day.
The time between 8:30:00 AM and 5:30:00 PM is:
9 hours, 0 minutes, and 0 seconds
Select start and end date and time. The duration is shown in days, hours, minutes, and seconds.
The duration between the two dates and times is:
Total: 117,000 seconds
A time duration calculator finds how much time has passed between two moments—either two clock times on the same day (e.g. 8:30 AM to 5:30 PM) or two full dates and times (e.g. Monday 9:00 to Wednesday 17:30). The result is given in hours, minutes, and seconds, and often also in total hours, total minutes, or total seconds for convenience.
Duration is used for work logs, meeting length, travel time, project timelines, and any situation where you need the exact span between two times or dates.
For two clock times on the same day, both are converted to seconds from midnight. The start time in seconds is subtracted from the end time. If the end time is earlier than the start (e.g. 11 PM to 2 AM), the calculator treats the end as the next day, so 24 hours (86,400 seconds) are added to the end time before subtracting. The difference in seconds is then converted back to hours, minutes, and seconds.
Formula: total seconds = (end hour × 3600 + end minute × 60 + end second) − (start hour × 3600 + start minute × 60 + start second). If total seconds is negative, add 86,400 (seconds in a day). Then: hours = total seconds ÷ 3600 (integer division), remainder = total seconds mod 3600, minutes = remainder ÷ 60, seconds = remainder mod 60.
For two full dates and times, the duration is the difference between the two timestamps in milliseconds (or seconds). Each timestamp is the number of milliseconds since 1 January 1970 00:00:00 UTC (Unix epoch). The difference is converted to days (integer division by 86,400,000 ms), then the remainder to hours, minutes, and seconds.
Leap seconds are not accounted for in this calculator; days are treated as exactly 24 hours (86,400 seconds). For most everyday uses this is accurate enough.
Start: 8:30:00 AM = 8×3600 + 30×60 + 0 = 30,600 seconds from midnight. End: 5:30 PM = 17:30:00 = 17×3600 + 30×60 + 0 = 63,000 seconds. Duration = 63,000 − 30,600 = 32,400 seconds = 9 hours, 0 minutes, 0 seconds. So the time between 8:30 AM and 5:30 PM is exactly 9 hours.
If you go to bed at 11 PM and wake at 6 AM, the end time (6) is less than the start (23). The calculator adds 24 hours to the end: 6 + 24 = 30 hours from midnight of the start day, i.e. 6 AM next day. Duration = (30×3600) − (23×3600) = 7×3600 = 25,200 seconds = 7 hours. So you slept 7 hours.
From Monday 12 February 2026 at 09:00 to Wednesday 14 February 2026 at 15:30: that is 2 full days (48 hours) plus 6 hours and 30 minutes = 2 days, 6 hours, 30 minutes, 0 seconds. In total: 54.5 hours or 3,270 minutes or 196,200 seconds.
For the time-only calculator: enter the start and end time in 24-hour format. Use 0–23 for hours (e.g. 8 for 8 AM, 17 for 5 PM). Minutes and seconds are 0–59. The result shows the duration in a readable sentence plus the same in hours only, total minutes, and total seconds. Use “Save this calculation” to copy a link that restores your inputs.
For the “Time Between Two Dates” calculator: open the date picker for start and end, choose the date and (if needed) the time. The result shows days, hours, minutes, and seconds between the two moments. If the end is before the start, the result is zero.
In the time-only calculator, we assume the end time is on the next day. For example, from 11 PM to 2 AM gives 3 hours. In the “Time Between Two Dates” calculator, if you pick an end date/time before the start, the duration is shown as zero.
Using 0–23 for hours avoids AM/PM confusion and matches how many systems store time. 8 = 8 AM, 12 = noon, 17 = 5 PM. You can convert in your head or use the result line, which shows the times in 12-hour format (e.g. 8:30:00 AM).
No. The calculator treats every day as exactly 24 hours (86,400 seconds). Leap seconds are very rare and are not applied here, so for normal use the result is accurate to the second.
Yes. Click “Save this calculation” in the result section. It copies a link to the clipboard that includes your inputs. When you or someone else opens that link, the calculator will show the same times or dates and the same result.