Beginner

Time Difference Calculator — Hours and Minutes Between Two Times

Enter a start time and an end time (in 24-hour format) and instantly see the difference in hours, minutes, seconds and decimal hours. Toggle "crosses midnight" to handle overnight spans — for example a shift from 22:00 to 06:00.

h

24-hour clock (0–23)

min

h

min

Crosses midnight

Time difference
8.50hours

8 hr 30 min between the two times

Hours
8
Minutes
510
Seconds
30,600
Decimal hours
8.5
09:0017:308h 30mDuration on a 24-hour timeline
Step by step
  1. 1

    Start in minutes

    9 × 60 + 0 = 540
  2. 2

    End in minutes

    17 × 60 + 30 = 1,050
  3. 3

    Difference in minutes

    |1,050 − 540| = 510
  4. 4

    Total hours

    510 ÷ 60 = 8.50
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Subtract start time from end time (in minutes), add 1440 if the span crosses midnight, then convert back to hours and minutes. The calculator also outputs total minutes, total seconds, and the decimal-hours equivalent used in payroll.

Formula
Difference = |End − Start| (add 24 h if the span crosses midnight)
How this is calculated

The calculator converts each time to total minutes since midnight (hours × 60 + minutes), subtracts the start from the end, and adjusts by ±1440 minutes (24 hours) when the span crosses midnight. The absolute difference is then converted back to hours, minutes and seconds, and also expressed as a decimal fraction of an hour.

All inputs use the 24-hour clock (0–23 for hours, 0–59 for minutes). If you enter times in AM/PM format, convert them first: PM hours add 12 (e.g. 5:30 PM = 17:30), except noon (12:00 PM = 12:00) and midnight (12:00 AM = 0:00).

This tool measures elapsed wall-clock time and does not account for daylight saving time changes. If your time span crosses a DST transition, the actual duration may differ by ±1 hour from the calculated result.

Frequently asked questions

Convert both times to minutes from midnight, subtract start from end, and add 1440 minutes if the result is negative (i.e. crosses midnight). Then divide by 60 for hours.

Switch "Crosses midnight" to Yes. The calculator adds 24 hours to the end time before subtracting, so a shift from 22:00 to 06:00 correctly gives 8 hours.

Decimal time expresses a duration as a single decimal number of hours. For example, 7 hours 30 minutes = 7.5 hours. This is useful for payroll and billing, where fractions of an hour must be entered as a decimal.

Also known as

time difference calculator
hours between two times
time elapsed calculator
how many hours between two times
clock time difference calculator
time duration calculator
time span calculator
overnight hours calculator

APA

TG we-Calculate Editorial Team. (2026). Time Difference Calculator — Hours and Minutes Between Two Times [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/time-difference-calculator

Chicago

TG we-Calculate Editorial Team. "Time Difference Calculator — Hours and Minutes Between Two Times." TG we-Calculate. 2026. https://we-calculate.com/calculator/time-difference-calculator.

IEEE

TG we-Calculate Editorial Team, "Time Difference Calculator — Hours and Minutes Between Two Times," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/time-difference-calculator

BibTeX

@misc{wecalculate_time_difference_calculator, title = {Time Difference Calculator — Hours and Minutes Between Two Times}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/time-difference-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?