Date & Time

Time Duration Calculator

Live

Measure elapsed time between two date-and-time values in days, clock components, hours, minutes, and seconds.

About Time Duration Calculator

Use the Time Duration Calculator to measure the exact elapsed span from one date and time to another. The custom timeline shows calendar days plus the remaining hours, minutes, and seconds, alongside normalized totals for scheduling, logs, rentals, travel, experiments, and project tracking. Quick-span controls can set an hour, workday, day, or week from the selected start. Datetimes without an explicit UTC offset are interpreted in the active local time-zone convention, so review transitions involving daylight saving time carefully.

Measure an elapsed duration

Workspace

Structured calculation

Follow the input-to-result path; the fields below remain the source of every value.

Complete the fields to prepare a result.

Starting date and time. Use the same offset or local time-zone convention as the end.

Ending date and time; it must be the same as or later than the start.

Elapsed duration

Choose a start and end moment to see the complete elapsed span.

Duration calculation

elapsed seconds = end timestamp − start timestamp; days = floor(seconds ÷ 86,400), with the remainder decomposed into hours, minutes, and seconds.

How it works

The calculator converts both date-and-time entries to instants and subtracts the start from the end. It then divides the resulting seconds into complete 24-hour days, remaining clock components, and normalized totals. The end must not precede the start.

Examples

An overnight project window

Example input
{
    "start_datetime": "2026-07-11T09:15:00",
    "end_datetime": "2026-07-12T11:45:00"
}
Expected result
{
    "days": 1,
    "hours": 2,
    "minutes": 30,
    "seconds": 0,
    "total_hours": 26.5,
    "total_minutes": 1590,
    "total_seconds": 95400,
    "formatted_duration": "1d 02:30:00"
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Citations & sources

  1. Time zone and daylight saving time data

Frequently asked questions

What is the difference between total hours and the hours component?

Total hours expresses the entire span as a decimal. The hours component is only the remainder after complete 24-hour days; a 26.5-hour span therefore shows 1 day, 2 hours, and 30 minutes.

Does the calculator include both the start and end moments?

It measures continuous elapsed time by subtracting the start timestamp from the end timestamp. Identical moments produce a zero duration; there is no extra inclusive day.

How are daylight-saving changes handled?

Values carrying explicit UTC offsets represent exact instants. Browser datetime fields without offsets use the device’s local civil-time rules, so verify the intended zone when a span crosses a daylight-saving transition.

Can the end be earlier than the start?

No. This page measures a forward elapsed span and reports an error when the end precedes the start. Use the Time Calculator when you need signed duration arithmetic instead.