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
min
h
min
Crosses midnight
8 hr 30 min between the two times
- 1
Start in minutes
9 × 60 + 0 = 540 - 2
End in minutes
17 × 60 + 30 = 1,050 - 3
Difference in minutes
|1,050 − 540| = 510 - 4
Total hours
510 ÷ 60 = 8.50
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
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
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
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.
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
@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?
