Time Duration Calculator

Calculate the duration between two times — hours, minutes, and seconds. Choose 24-hour or 12-hour (AM/PM) mode. If the end time is earlier than the start, the calculator automatically handles overnight wrap.

Start Time

h
:
m
:
s

End Time

h
:
m
:
s

How to Calculate Time Duration

Enter the start time and end time in hours and minutes — seconds are optional and default to zero. Results appear as you type.

Example: Start 09:00, End 17:30

  • Duration: 8 hours 30 minutes 0 seconds
  • Total Hours: 8.50
  • Total Minutes: 510
  • Total Seconds: 30,600

Overnight Wrap

If the end time is earlier than the start time, the calculator adds 24 hours to span midnight automatically.

Example: Start 10:00 PM (22:00), End 6:00 AM (06:00)

  • Duration: 8 hours 0 minutes 0 seconds
  • The note ⚑ Spans midnight (+1 day) confirms the overnight interpretation.

24-Hour vs 12-Hour Mode

Use 24-hour mode when you have clock times in military or ISO format (00:00–23:59). Use 12-hour mode when times are written with AM and PM (12:00 AM is midnight, 12:00 PM is noon). Switching modes clears all fields.

Reading the Totals

RowMeaningExample (8h 30m)
Total HoursDecimal hours8.50
Total MinutesWhole minutes510
Total SecondsWhole seconds30,600

Total Hours is especially useful for payroll and billing where time is tracked as a decimal fraction.

Frequently Asked Questions

How do I calculate the duration between two times?

Enter a start time and an end time in hours and minutes (seconds are optional). The calculator subtracts start from end and shows the result as hours, minutes, and seconds plus totals. If the end time is earlier than the start, it automatically adds 24 hours to account for an overnight span.

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

The calculator treats it as an overnight duration — it adds 24 hours to the end time before subtracting. For example, Start 10:00 PM and End 6:00 AM gives a duration of 8 hours. A note 'Spans midnight (+1 day)' appears to confirm this.

What is the difference between 24-hour and 12-hour mode?

In 24-hour mode, hours run from 0 to 23 (e.g. 14:30 for 2:30 PM). In 12-hour mode, hours run from 1 to 12 with an AM/PM selector. Switching modes clears all fields so you can re-enter times in the correct format.

How do I read the Total Hours result?

Total Hours shows the duration as a decimal. For example, 1 hour 30 minutes is shown as 1.50, and 2 hours 15 minutes is 2.25. This is useful for payroll, billing, or any calculation that requires fractional hours.

What can I use this calculator for?

Common uses include calculating work hours for a shift, measuring the length of a meeting or event, finding out how long a journey took, and computing billable time between a start and end timestamp.