Time Duration Calculator

Enter a start and end time to find the duration between them, in hours and minutes — spans that cross midnight are handled automatically.

Duration

{{ result.hours }}h {{ result.minutes }}m

This span crosses midnight into the next day.

Total minutes
{{ result.totalMinutes }}
Hours : Minutes
{{ result.hours }}:{{ String(result.minutes).padStart(2,'0') }}

Enter a start and end time above to see the duration.

Every calculation runs in your browser. Nothing you enter is uploaded to a server.

How it's calculated

Both times are converted to minutes since midnight, and the start is subtracted from the end. If the end time is earlier than or equal to the start time, the span is treated as crossing midnight — a full 24 hours is added before subtracting, so 10:00 PM to 2:00 AM correctly comes out to 4 hours rather than a negative number.

Example: 09:30 AM to 05:45 PM is 8 hours 15 minutes — 495 minutes in total.

What this is useful for

Shift lengths, meeting spans, and any "how long was that" question that stays within a day or crosses a single midnight — timesheets, call logs, and travel itineraries all reduce to this same calculation.

How does it know when a span crosses midnight?

If the end time is earlier than or equal to the start time, the tool treats the span as running into the next day and adds 24 hours before calculating — so 10:00 PM to 2:00 AM correctly comes out to 4 hours instead of a negative number.

Can I use 24-hour time instead of AM/PM?

Yes — switch to the 24-hour format and enter times like 17:45 directly.

What's the difference between this and the Date Difference Calculator?

This tool measures a span within a single day (or across one midnight), in hours and minutes. The Date Difference Calculator measures spans of days, months or years between two calendar dates.

Why is the total in minutes useful?

It's the figure most timesheet and billing systems actually want — 8 hours 15 minutes and 495 minutes are the same duration, just in different units.