Hours Between Calculator

Select a start date and time, select an end date and time, and get the exact elapsed duration in hours, minutes, and days. Choose 24-hour time or AM/PM input.

Examples

Same-day interval

From 09:00 to 17:30 on the same date.

Time format
24-hour
Start date and time
May 27, 2026, 9:00 AM
End date and time
May 27, 2026, 5:30 PM
Duration
0d 8h 30m
Decimal hours
8.5 h
Total minutes
510 min
Total days
0.3542 days

Embed this calculator

Copy a free iframe snippet for articles, learning pages, forums, wikis, newsletters, and internal docs.

How It Works

Formula

startMinutes=dateIndexstart×1440+hourstart×60+minutestart\text{startMinutes} = \text{dateIndex}_{start} \times 1440 + \text{hour}_{start} \times 60 + \text{minute}_{start}

endMinutes=dateIndexend×1440+hourend×60+minuteend\text{endMinutes} = \text{dateIndex}_{end} \times 1440 + \text{hour}_{end} \times 60 + \text{minute}_{end}

durationHours=(endMinutesstartMinutes)/60\text{durationHours} = (\text{endMinutes} - \text{startMinutes}) / 60

Variables, symbols and units

dateIndex\text{dateIndex}

Whole calendar-day index for the selected date

startMinutes\text{startMinutes}

Start date-time converted to total minutes

endMinutes\text{endMinutes}

End date-time converted to total minutes

durationHours\text{durationHours}

Elapsed minutes divided by 60

14401440

Minutes in one day
Calculation method explained

Choose the start and end date-times. The calculator converts each local date-time into a minute index, subtracts the start from the end, and shows the difference as days-hours-minutes, decimal hours, total minutes, and total days.

Each selected date is converted to a whole-day index, then the selected hour and minute are added. Subtracting the start minute index from the end minute index gives the elapsed minutes. Negative intervals are rejected so the result is never ambiguous.

Examples

Same-day interval24-hour · May 27, 2026, 9:00 AM0d 8h 30m

From 09:00 to 17:30 on the same date.

Time format
24-hour
Start date and time
May 27, 2026, 9:00 AM
End date and time
May 27, 2026, 5:30 PM
Duration
0d 8h 30m
Overnight interval24-hour · May 27, 2026, 10:00 PM0d 8h 0m

From late evening to early morning on the next date.

Time format
24-hour
Start date and time
May 27, 2026, 10:00 PM
End date and time
May 28, 2026, 6:00 AM
Duration
0d 8h 0m
Multi-day intervalAM/PM · May 27, 2026, 2:15 PM2d 19h 30m

A longer span where days and hours both matter.

Time format
AM/PM
Start date and time
May 27, 2026, 2:15 PM
End date and time
May 30, 2026, 9:45 AM
Duration
2d 19h 30m

Frequently Asked Questions

Does it handle intervals across midnight?
Yes. Because both inputs include a date, midnight crossings are handled by the selected dates instead of a separate overnight toggle.
Can I use AM/PM instead of 24-hour time?
Yes. Change the Time format control to AM/PM and the hour dropdowns switch to 1-12 with an AM/PM selector. The stored value remains unambiguous.
Does this include time zones or daylight saving changes?
No. The calculator treats the selected date and time as local civil values and measures the calendar-clock difference between them.
Why was the break field removed?
This calculator now measures pure elapsed time between two date-times. Breaks, payroll rules, and shift policy belong in a separate work-hours calculator.

Related Calculators

All calculators