Docomint

Time Duration Calculator

Calculate the elapsed time between two times of day, in hours and minutes.

🔒 Processed on your device

What is a Time Duration Calculator?

Calculates the gap between two clock times within a day — a work shift, a meeting block, a workout — automatically rolling over to the next day when the end time is earlier than the start time (an overnight shift from 10 PM to 6 AM, for instance), rather than returning a nonsensical negative duration.

How to use the Time Duration Calculator

  1. Enter a start time and end time, in 24-hour HH:MM format
  2. Press Calculate
  3. The elapsed duration, in hours and minutes, appears instantly, computed on your device

Formula

Duration = End Time − Start Time, rolling into the next day if End is earlier than Start

An end time earlier than the start time is treated as spanning past midnight into the next day, rather than as an invalid or negative result.

Example

A shift from 9:15 AM to 5:45 PM lasts exactly 8 hours 30 minutes (510 minutes total) — enter 22:00 to 06:00 instead and it correctly returns 8 hours by rolling the end time into the next calendar day.

Common mistakes

Frequently asked questions

What happens if the end time is earlier than the start time?

It's treated as spanning into the next day — e.g. 10:00 PM to 6:00 AM is calculated as an 8-hour overnight duration, not as a negative or invalid result, with a note confirming that assumption.

Can I enter times in AM/PM format instead of 24-hour?

No — enter times in 24-hour HH:MM format (e.g. 17:45 for 5:45 PM). This avoids AM/PM ambiguity, especially around 12:00 noon and midnight, which are common sources of off-by-12-hour errors.

Can I calculate a duration spanning more than 24 hours?

No — this handles a single overnight rollover (end time earlier than start time) at most, covering up to roughly 24 hours. For a multi-day span, use Date Difference Calculator instead.

How do I convert the result to decimal hours?

Divide the minutes portion by 60 and add it to the hours — 8 hours 30 minutes becomes 8 + (30÷60) = 8.5 decimal hours, useful for timesheets that expect a single decimal number.

Is my numbers uploaded anywhere?

No — Time Duration Calculator runs entirely in your browser using JavaScript/WebAssembly. Your numbers is never sent to a server.

Related calculators