⏱️
Date & Time

Time Duration Calculator

Free Time Duration Calculator. Calculate the time difference between two times, including hours, minutes, and overnight durations.

What does this Time Duration Calculator do?

This calculator finds the elapsed time between two clock times (in HH:MM format), correctly handling durations that cross midnight — useful for calculating work shift lengths, sleep duration, or any time span within a day or overnight.

How the calculation works

The calculator converts both times to total minutes since midnight, subtracts the start from the end, and if the result is negative (meaning the end time is technically "before" the start time on the clock), it adds 24 hours' worth of minutes to correctly account for the overnight rollover.

Step-by-step example

From 09:00 to 17:30: 17:30 is 1,050 minutes since midnight, 09:00 is 540 minutes. Difference = 510 minutes = 8 hours 30 minutes.

For an overnight shift from 22:00 to 06:00: 06:00 (360 minutes) minus 22:00 (1,320 minutes) gives −960, so the calculator adds 1,440 (24 hours in minutes) to get 480 minutes = 8 hours.

Tips & common mistakes

  • Always enter times in 24-hour HH:MM format (e.g., 22:00 for 10 PM) to avoid AM/PM ambiguity.
  • The overnight-crossing logic assumes the end time is on the next calendar day whenever it's numerically earlier than the start time — this is correct for shift/sleep calculations but wouldn't apply if you genuinely meant a negative duration.

Frequently asked questions

Yes — if the end time is earlier than the start time, the calculator assumes it falls on the next day and adds 24 hours automatically.