Time Duration Calculator

Two clock times, and the exact duration between them — handling the wraparound automatically when the end time is technically 'earlier' in the day, meaning the span crosses midnight.

Inputs

Result

8h 30m

510 minutes total

How the time duration calculator works

Both times are converted to total minutes since midnight (hours × 60 + minutes), then subtracted.

If the result is negative (end time earlier than start time), 1,440 minutes — a full day — is added, correctly handling durations that span midnight.

Worked example: 09:15 to 17:45

  1. 09:15 = 555 minutes since midnight. 17:45 = 1,065 minutes since midnight.
  2. Duration = 1,065 − 555 = 510 minutes = 8 hours 30 minutes.

Common mistakes to avoid

Assuming an 'earlier' end time is always an input error

A start time of 22:00 and end time of 06:00 correctly represents an overnight duration (like a night shift) — the calculator automatically adds a full day's worth of minutes to handle this midnight-crossing case correctly, rather than treating it as invalid.

Entering times in 12-hour format without AM/PM context

This calculator expects 24-hour (HH:MM) format directly — entering '5:00' intending 5 PM without converting to '17:00' first will be interpreted as 5 AM instead, giving a very different duration result.

Frequently asked questions

How does this handle a shift that crosses midnight?

If the calculated end-minus-start comes out negative, a full 24-hour's worth of minutes (1,440) is added automatically, correctly reflecting that the end time is actually on the following calendar day.

Why does the result show hours and minutes separately rather than just decimal hours?

Whole hours and remaining minutes (like '8h 30m') read more naturally for a duration than a decimal figure like '8.5 hours', though the detail line also provides the total in minutes for anyone needing that format.

Is this the same calculation used by the Hours Worked Calculator?

Similar in principle, but the Hours Worked Calculator additionally subtracts a specified break duration and calculates pay from an hourly rate — this tool gives the raw duration between two times only.

Does this account for daylight saving time changes during the duration?

No — it's a straightforward clock-time subtraction assuming a normal, unchanged day; a duration spanning an actual daylight-saving transition would need that hour adjustment accounted for separately.

Related calculators