Time & Payroll

Time Duration Calculator

Calculate the exact duration between two clock times, in hours, minutes, and decimal hours.

Duration

8h 30m

8.50 decimal hours · 510 minutes total

Working out how much time falls between two clock readings is one of those calculations that's simple in theory and easy to get wrong by hand, especially once the span crosses midnight. This calculator takes a start time and an end time and returns the exact duration in hours and minutes, plus decimal hours for anything that needs a single number — timesheets, cooking or workout timing, travel duration, or just settling an argument about how long something actually took. If the end time is earlier than the start time, it's treated as spanning into the next day rather than producing a negative result.

How to Use This Calculator

1. Enter the start time

The time something began.

2. Enter the end time

The time it ended. If it's earlier than the start time, the calculator assumes it crossed midnight.

3. Read the duration

Shown as hours and minutes, decimal hours, and total minutes.

How It Works

duration = end_time − start_time (+24h if end_time < start_time)

From 9:00 AM to 5:30 PM: 17:30 − 9:00 = 8 hours 30 minutes, or 8.5 decimal hours.

Time Duration Examples

The time between common start and end times, including shifts that cross midnight.

StartEndDurationDecimal hoursTotal minutes
9:00 AM5:30 PM8h 30m8.5510
8:30 AM4:45 PM8h 15m8.25495
7:30 AM4:00 PM8h 30m8.5510
12:00 PM8:30 PM8h 30m8.5510
10:00 PM6:00 AM8h 0m8480
11:30 PM7:15 AM7h 45m7.75465

If the end time is earlier than the start time on the clock, the span crosses midnight and 24 hours are added before subtracting.

Frequently Asked Questions

How do I calculate hours between two times?

Subtract the start time from the end time. If the end time is earlier on the clock than the start time, add 24 hours first to account for the span crossing midnight, then subtract. For example, 9:00 AM to 5:30 PM is 8 hours 30 minutes, which is 8.5 decimal hours.

How do I calculate the time between two times that cross midnight?

Add 24 hours to the end time, then subtract the start time. From 10:00 PM to 6:00 AM, treat 6:00 AM as 30:00, so 30:00 minus 22:00 is 8 hours. Another way is to add the hours until midnight, 2 hours here, to the hours after midnight, 6 hours here. This calculator does it automatically.

How many hours is 7:30 AM to 4:00 PM?

Seven thirty in the morning to four in the afternoon is 8 hours 30 minutes, or 8.5 decimal hours. That is the elapsed time on the clock. If you take an unpaid lunch during that time, subtract it, so a 30-minute lunch leaves 8 hours of paid work. Enter your own times above to check any span.

How do I convert hours and minutes to decimal hours?

Divide the minutes by 60 and add them to the whole hours. Eight hours 30 minutes is 8.5, and 8 hours 45 minutes is 8.75. The common error is writing 8.30 or 8.45, which treats minutes as decimals of an hour. Payroll and invoicing software almost always wants the true decimal format.

What is the difference between this and a work hours calculator?

This tool calculates the raw duration between any two clock times for any purpose. A work-hours calculator also subtracts unpaid breaks and projects weekly or monthly totals for payroll. Use this one for a quick general duration, and the work hours or timesheet calculator when you are totalling paid time.

Can I use this for durations longer than 24 hours?

This tool is built for a single start and end clock time within one day, or crossing into the next day. For a span covering several full days, use the days between dates calculator instead. For a multi-day shift or travel time, add the full days to the result from this calculator.

Common Mistakes

  • ❌ Treating an overnight span as a negative or zero duration

    If a shift or event runs from, say, 10:00 PM to 6:00 AM, subtracting the times directly gives a negative number. The correct duration crosses midnight and adds 24 hours before subtracting — this calculator does that automatically whenever the end time is earlier than the start time.

  • ❌ Confusing decimal hours with hours and minutes

    8 hours 30 minutes is 8.5 decimal hours, not 8.30 — the minutes portion needs to be divided by 60, not just moved after the decimal point. Payroll and invoicing software almost always wants the decimal format.

Related Pay & Time Calculators

Disclaimer: These results are estimates for informational purposes only and are not legal, tax, or payroll advice. Wage-and-hour rules vary by state, employer, and individual circumstances, so confirm important figures with your employer, your payroll provider, or a qualified professional.