Calculate hours between two times

Find the gross wall-clock interval between two HH:MM values, treating an equal or earlier end as the next day.

freeworks offlinenothing uploaded
ToolHours Between Two Times Calculator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Both clock readings become minutes since midnight; a zero or negative difference receives 1,440 minutes before quotient and remainder yield hours and minutes. Decimal hours round that same minute total to two places.

  • The next-day rule lets one pair express an overnight shift.
  • Dates, seconds, timezones, and breaks are outside this two-clock-value calculation.

Worked example

A night shift
Clocking on at 22:00 and off at 06:00
Input
											Start time: 22:00
End time: 06:00
										
Output
												Hours: 8
Minutes: 0
Total minutes: 480
Total hours decimal: 8
Duration: 8h 0m
											

When to use this

Night shifts use gross clock spans, same-zone overnight travel gets a rough duration, and room bookings compare times less than one day apart.

Edge cases

  • 22:00 to 06:00 is eight hours across midnight.
  • 09:00 to 09:00 is defined as 24 hours rather than zero.
  • A daylight-saving or timezone change is ignored, so this is wall-clock arithmetic rather than guaranteed elapsed time.