Time Duration Calculator
Find the exact elapsed time between two clock times or two date-and-time values. The calculator handles overnight spans, seconds, multi-day durations, decimal hours, total minutes, and total seconds.
Find the time between two moments
Use clock-time mode for a short span or date-and-time mode for exact multi-day durations.
Quick examples
Click an example to load itWhat is a Time Duration Calculator?
A Time Duration Calculator measures the exact elapsed time between two moments. Depending on the inputs, the result can be shown as days, hours, minutes, seconds, decimal hours, total minutes, or total seconds.
Use Between two times for clock-time questions such as "How long is it from 9:15 AM to 5:47 PM?" Use Between two dates & times when the interval spans multiple dates or when exact calendar timestamps matter.
How to calculate the duration between two times
For two times on the same day, subtract the start time from the end time.
Example: from 9:15 AM to 5:45 PM is 8 hours 30 minutes. If the end time is earlier than the start time and the interval crosses midnight, add 24 hours before subtracting.
Example: 10 PM to 6 AM
Because 6:00 AM is earlier on the clock than 10:00 PM, a time-only calculation needs to know that the end occurs on the following day. With automatic overnight detection enabled:
| Start | End | Rollover | Duration |
|---|---|---|---|
| 10:00 PM | 6:00 AM | Next day | 8h 00m |
| 11:30 PM | 2:15 AM | Next day | 2h 45m |
| 8:30 AM | 12:00 PM | Same day | 3h 30m |
Time-only mode vs. date-and-time mode
Between two times
This mode is best for a duration shorter than 24 hours. It works only with clock times, so an end time earlier than the start time can be treated as the following day.
Between two dates & times
This mode uses complete local timestamps. It is better for events, travel, projects, deadlines, machine runtime, study sessions, or any span that can last more than one day.
How days, hours, minutes, and seconds are broken down
The calculator first converts the entire duration to seconds. It then divides that total into complete days, remaining hours, remaining minutes, and remaining seconds.
A duration of 1 day, 3 hours, 20 minutes, and 15 seconds is therefore 27.3375 total hours or 98,415 total seconds.
Decimal hours vs. hours and minutes
Decimal hours are useful in spreadsheets, billing, and numerical calculations. Minutes must be divided by 60 rather than written directly after the decimal point.
For example, 8 hours 30 minutes equals 8.50 hours, not 8.30 hours. For dedicated conversions, use the Decimal Hours Calculator.
Seconds and precision
This calculator supports second-level precision. That is useful when measuring short activities, machine or system runtime, exercise intervals, experiments, media lengths, or any task where rounding to the nearest minute would lose useful information.
If you do not need seconds, use the Remove seconds button in time-only mode. The result will still display a seconds field, but it will be zero.
Does date-and-time mode account for daylight saving time?
Date-and-time mode uses real local timestamps created by your browser. When the device's local time zone observes a daylight-saving transition, elapsed time can differ from the simple difference between the two displayed clock readings.
Common duration examples
| Start | End | Duration | Decimal hours |
|---|---|---|---|
| 8:00 AM | 12:00 PM | 4h 00m | 4.00 |
| 8:30 AM | 5:00 PM | 8h 30m | 8.50 |
| 9:15 AM | 5:45 PM | 8h 30m | 8.50 |
| 10:00 PM | 6:00 AM next day | 8h 00m | 8.00 |
| 11:30 PM | 2:15 AM next day | 2h 45m | 2.75 |
Time Duration Calculator vs. Work Hours Calculator
The Time Duration Calculator measures pure elapsed time between two moments. It does not apply payroll assumptions, deduct breaks, or calculate earnings.
The Work Hours Calculator is the better choice when the duration represents a work shift and you need to subtract unpaid breaks or estimate pay. Keeping these jobs separate makes each calculator easier to understand and prevents accidental payroll assumptions in a general-purpose duration tool.
Related calculators
Frequently asked questions
How do I calculate the time between two times?
Subtract the start time from the end time. If the interval crosses midnight, treat the end time as belonging to the following day before subtracting.
How long is 9:00 AM to 5:00 PM?
From 9:00 AM to 5:00 PM is exactly 8 hours.
How long is 8:30 AM to 5:00 PM?
The elapsed duration is 8 hours 30 minutes, which equals 8.50 decimal hours.
How long is 10:00 PM to 6:00 AM?
If 6:00 AM is on the following day, the duration is 8 hours.
Can this calculator measure more than 24 hours?
Yes. Use the date-and-time mode for multi-day durations. Time-only mode is intended for intervals within a single 24-hour cycle.
Does this calculator include seconds?
Yes. Both calculation modes support second-level precision when seconds are present in the input.
What is the difference between total hours and the day-hour-minute result?
Total hours expresses the entire duration as one decimal number. The day-hour-minute-second result breaks the same duration into calendar-style units such as 1 day, 3 hours, and 20 minutes.
Comments
Post a Comment