Hours Between Two Times Calculator

Our free hours between two times calculator tells you the elapsed time between any two clock times — a work shift, a flight, a sleep session. Enter the start and end times and get the answer instantly in hours + minutes and decimal hours. Overnight periods (like 10 PM to 6 AM) are handled automatically.

Start time

End time

Your results

Elapsed time
Decimal hours
From
To
Total minutes
Crosses midnight

If the end time is earlier than the start time, it's counted as the next day (overnight).

How to use this calculator

Enter the start time (for example 9:00 AM) and the end time (for example 5:30 PM) using the hour, minute and AM/PM controls. The elapsed time updates instantly — you'll see it as hours + minutes ("8h 30m") and as decimal hours ("8.5").

Working a night shift? Just enter the real clock times: 10:00 PM to 6:00 AM automatically counts as 8 hours overnight. No extra settings, no date picking.

How it works

Both times are first converted to 24-hour "minutes since midnight": 12 AM becomes 0, 12 PM becomes 720 (12 × 60), and PM hours get 12 added. The elapsed time is then end − start.

The overnight rule: if the end time is earlier than or equal to the start time, 24 hours (1,440 minutes) are added to the end. That makes 10:00 PM → 6:00 AM work out to 8 hours instead of a negative number, which matches how overnight shifts and sleep durations are measured in real life. If both times are identical, a full 24-hour period is counted.

This is elapsed clock time between two times on the same day or overnight — up to 24 hours. It's different from counting calendar working days: for that, see our business days calculator.

Frequently asked questions

How do you calculate the hours between two times?

Convert both times to minutes since midnight (12-hour times become 24-hour times first), then subtract the start from the end. For example, 9:00 AM is 540 minutes and 5:30 PM is 1050 minutes; 1050 − 540 = 510 minutes, which is 8 hours 30 minutes, or 8.5 hours.

What if the end time is before the start time, like an overnight shift?

When the end time is earlier than the start time, the calculator assumes it falls on the next day and adds 24 hours. So 10:00 PM to 6:00 AM is counted as 8 hours, not negative 16 hours. This matches how overnight work shifts and sleep durations are normally measured.

How do I convert the result to decimal hours?

Divide the total minutes by 60. The calculator does this for you: 8 hours 30 minutes is 510 ÷ 60 = 8.5 hours. Decimal hours are handy for payroll, time sheets, and billing, where 15 minutes is always 0.25 hours.

Can this calculate periods longer than 24 hours?

No. This tool measures a single elapsed period between two clock times, up to 24 hours. If the same time is entered twice, it counts a full 24-hour period. For spans across multiple calendar days, use the days between dates calculator instead.

Is this the same as the business days calculator?

No. This page finds elapsed time between two clock times on the same day or overnight — for example, the length of a shift or a flight. The business days calculator counts working days between two calendar dates, skipping weekends and US holidays.

Related calculators