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.

Elapsed time calculator

Find the time between two moments

Use clock-time mode for a short span or date-and-time mode for exact multi-day durations.

Clock-time duration
Seconds are supported when your browser exposes them.
For an earlier end time, the calculator can roll into the next day.
Date and time duration
Date-and-time mode uses your browser's local time zone and real timestamps. This means local daylight-saving transitions can affect elapsed time.

Quick examples

Click an example to load it
9:15 AM to 5:47:30 PM 8h 32m 30s
10:00 PM to 6:00 AM 8 hours, next day
8:30 AM to 12:00 PM 3h 30m

What 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.

Duration = end time - start 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.

Overnight duration = (end time + 24 hours) - start time

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:

StartEndRolloverDuration
10:00 PM6:00 AMNext day8h 00m
11:30 PM2:15 AMNext day2h 45m
8:30 AM12:00 PMSame day3h 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.

1 day = 24 hours = 1,440 minutes = 86,400 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.

Decimal hours = hours + (minutes / 60) + (seconds / 3600)

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.

Time-only mode has no calendar date or time-zone information, so it cannot account for daylight-saving transitions. For a shift that crosses a clock change, use date-and-time mode or verify the elapsed time using dated records.

Common duration examples

StartEndDurationDecimal hours
8:00 AM12:00 PM4h 00m4.00
8:30 AM5:00 PM8h 30m8.50
9:15 AM5:45 PM8h 30m8.50
10:00 PM6:00 AM next day8h 00m8.00
11:30 PM2:15 AM next day2h 45m2.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