Skip to main content
HSCalculadora

Hours Between Times Calculator

Find the hours between two clock times.

24-hour format, HH:MM

24-hour format, HH:MM

Results update as you type.

Total hours
—
Total minutes—

How it works

An hours between times calculator finds how much time passes between two clock times, returning the span both as decimal hours and as total minutes. It answers questions like "how long from 09:00 to 17:30" — eight and a half hours — and correctly handles spans that run past midnight, so a window from 22:00 to 06:00 reads as eight hours rather than a negative value. The midnight wrap is the usual stumbling block. Subtracting the start time from the end time works only when the end is later on the same day; when the end time is earlier on the clock, the span crossed midnight and a full 24 hours must be added. This calculator handles that automatically by adding 1,440 minutes whenever the end is before the start, so overnight windows come out right without any manual adjustment. Working in minutes past midnight keeps the arithmetic exact, avoiding the base-60 traps of subtracting HH:MM values directly. The decimal-hours output is ready for pay and billing calculations, while the total minutes are handy for pacing and rate work. People measuring a work window, an appointment length, a parking or delivery duration, or any gap between two times use an hours between times calculator to get the elapsed time cleanly, including across the midnight boundary.

Formula

totalMinutes = endTime − startTime (+1440 if end < start); totalHours = totalMinutes ÷ 60

Both clock times are converted to minutes past midnight and the start is subtracted from the end. If the end time is earlier than the start, the span must have crossed midnight, so 1,440 minutes — one full day — is added to make the result positive. That minute total is the elapsed time, reported directly and also divided by sixty for decimal hours. Converting to a single minute unit first avoids the errors of subtracting hours and minutes separately in base 60.

Source:Gregorian calendar / ISO 8601

We review all our tools from time to time to ensure accuracy.

Worked example

Start time:09:00End time:17:30
From 09:00 to 17:30 is 510 minutes, which is 8.5 hours.

How to use this calculator

  1. 1

    Enter your values

    Enter start time and end time.

  2. 2

    Adjust the options

    Fine-tune any options to match your situation.

  3. 3

    Read your result

    Total hours updates instantly as you type — no button to press.

Frequently asked questions

How do I calculate the hours between two times?

Convert each time to minutes past midnight, subtract the start from the end, and divide by 60 for hours. If the end time is earlier on the clock than the start, add 24 hours first because the span crossed midnight. The calculator does all of this, so 09:00 to 17:30 gives 8.5 hours and an overnight window like 22:00 to 06:00 correctly gives 8 hours rather than a negative result.

Does it handle times crossing midnight?

Yes. When the end time is earlier than the start time, the calculator assumes the span ran past midnight and adds a full 24 hours, so a window from 22:00 to 06:00 reads as eight hours. This makes it reliable for night shifts, overnight parking, or any interval that spans two days. It assumes a single span under 24 hours, which covers essentially every everyday case of measuring the gap between two clock times.

How do I enter the times?

Use 24-hour format as HH:MM, so 9 in the morning is 09:00 and half past five in the afternoon is 17:30. For PM times add twelve to the hour: 1:15 PM is 13:15 and 11:45 PM is 23:45, while midnight is 00:00. Entering times this way removes AM/PM ambiguity and lets the calculator correctly detect and handle windows that cross the midnight boundary between two days.

What is the difference between total hours and total minutes?

Both describe the same span in different units. Total minutes is the raw elapsed time as a whole number, convenient for rate and pacing calculations, while total hours expresses it as a decimal, which multiplies directly by an hourly rate for pay or billing. So 510 minutes and 8.5 hours are the same duration; you pick whichever unit your next calculation needs, with the decimal hours being the more common payroll input.

Can I use this to work out hours worked?

Yes, for a single shift enter your clock-in as the start and clock-out as the end to get the elapsed hours, including overnight shifts. Note that this measures the full span and does not subtract unpaid breaks, so deduct any break time yourself, or use a dedicated time-card tool that includes a break field. The decimal-hours output is the figure most payroll systems expect once breaks are accounted for.