AscendLab

Time tools

时间差计算器

Free browser tool

Time Duration Calculator Between Two Times and Dates

Calculate how much time passes between a start date-time and an end date-time. Use it for work shifts, event schedules, logs, overnight ranges, and date duration checks.

Loading calculator...
Quick answer

A time duration between two times is the end date-time minus the start date-time.

For overnight ranges, make the end date the next day.

Best inputs for time duration

Use complete start and end values

A date plus a time removes ambiguity for overnight and multi-day ranges.

Keep time zones separate

This calculator uses the local time from your browser. Convert time zones first if the endpoints are in different regions.

Formula
The calculation subtracts timestamps, then formats the elapsed seconds.

duration = end date-time - start date-time

Total hours, minutes, seconds, and days are derived from the same millisecond difference.

When to use this page

Use this page for questions like how many hours are between 9 AM and 5:30 PM, or how long a range lasts between two dates and times.

Use the add/subtract page when you already have elapsed durations and want to combine them.

Time duration example
Use explicit date-time endpoints for clean duration math.

Example

09:00 to 17:30 on the same date is 8 hours 30 minutes.

Assumption

The selected dates and times are interpreted in the local time zone from your browser.

Limitation

This page does not apply timesheet break rules, payroll rounding, holidays, or cross-time-zone conversion.

Common use cases
These are the jobs people usually mean when searching for a time duration calculator.

Work shifts

Calculate hours between a start and end shift time.

Overnight ranges

Set the end date to tomorrow when the range crosses midnight.

Event schedules

Find total duration for sessions, launches, classes, or appointments.

Log cleanup

Convert timestamp ranges into human-readable elapsed time.

Frequently asked questions

What is a time duration calculator?

A time duration calculator finds the elapsed time between a start and end value. This page supports local dates and times so it can handle same-day, overnight, and multi-day ranges.

How do I calculate hours between two times?

Enter the same start and end date, then choose the two times. The total hours field shows the duration as a decimal hour value.

How do I calculate an overnight shift?

Use today's date for the start and tomorrow's date for the end. For example, 22:00 today to 06:00 tomorrow returns 8 hours.

Can the result be negative?

Yes. If the end date-time is before the start date-time, the calculator shows a negative duration.

Does this calculate business days?

No. Use the business days calculator when you need weekdays, weekends, or excluded holiday dates.

Suggested workflow

Time range planning path

Calculate a start-to-end duration, then refine the same plan with business-day, unit, or time-zone tools.

Related tools