How this instrument works
Subtracting two clock times looks like plain arithmetic until the end time is numerically smaller than the start time — a 10:00 PM start and a 6:00 AM end can't simply be subtracted (6:00 minus 22:00 gives a negative number), because the span actually crosses midnight into the next calendar day. This calculator converts both times to minutes since midnight, then adds a full 24 hours (1,440 minutes) to the difference whenever the raw subtraction would come out negative, correctly handling any overnight span.
Every input uses the 24-hour clock (0 to 23 for the hour, no AM/PM), the format most timesheet and scheduling systems store internally, so 5:30 PM is entered as hour 17, minute 30. If you're used to a 12-hour clock, convert any PM hour by adding 12 (except 12 PM itself, which is already hour 12) before entering it.
When the start and end time are identical, this calculator treats the span as 0 hours rather than a full 24 — a deliberate tie-break choice, since 'start equals end' more naturally describes an instant with no elapsed time than a complete day having passed. If you genuinely mean a full 24-hour span, enter an end time one minute short of the start instead.
- Enter Start time — hour (0-23) and Start time — minute using the 24-hour clock.
- Enter End time — hour (0-23) and End time — minute the same way.
- Read Hours between for the elapsed time, shown as decimal hours.
- For a PM start or end time, convert it first — add 12 to any PM hour except 12 PM itself, which is already hour 12.
- If the end time is numerically earlier than the start time, the calculator assumes the span crosses midnight and adds 24 hours automatically — no need to split an overnight shift into two separate entries.
Worked example — an overnight security shift crossing midnight
A security guard clocks in at 22:00 (10:00 PM) and clocks out at 06:00 (6:00 AM) the next morning. Entering Start time as 22:00 and End time as 06:00 shows the end time is numerically earlier than the start, so the calculator adds 24 hours before subtracting: (6:00 − 22:00 + 24:00) = 8:00. Hours between reads 8.0 — a clean 8-hour overnight shift, correctly computed despite crossing into the next calendar day.
Compare that to a same-day 9:00 AM to 5:30 PM shift: Start time 09:00, End time 17:30, no midnight crossing needed, and Hours between reads 8.5 directly from the straightforward subtraction — the same formula handles both cases without the user needing to flag which one crosses midnight.
Questions
How does this handle a shift that crosses midnight?
Automatically. Whenever the end time, converted to minutes since midnight, comes out numerically smaller than the start time, the calculator assumes 24 hours (1,440 minutes) have been skipped over into the next day and adds that back before subtracting — so a 10:00 PM to 6:00 AM shift correctly returns 8 hours rather than a negative number or an error.
Why do I need to enter times on the 24-hour clock instead of AM/PM?
Because storing time as a single hour number from 0 to 23 removes any AM/PM ambiguity — there's no risk of confusing 8:00 AM with 8:00 PM. To convert a familiar 12-hour PM time, add 12 to the hour (5:30 PM becomes hour 17, minute 30); 12 PM itself is already hour 12, and 12 AM (midnight) is hour 0.
What does it return if I enter the exact same start and end time?
Zero hours, not 24. Identical start and end times are treated as describing a single instant with no elapsed time, following the calculator's tie-break rule (the formula only adds 24 hours when the end time is strictly earlier than the start, not when they're equal). If you actually intend a full calendar day, enter an end time one minute before the start instead.
Can this handle a span longer than 24 hours?
No — this calculator is built for a single start-to-end span within one day or one overnight crossing, so it can add at most 24 hours to correct for a midnight wraparound. For a multi-day duration, use a date-and-time based duration calculator that takes full dates rather than clock times alone.
Is the result exact to the minute, or rounded?
Exact. Hours between is computed directly from the minute-level inputs and displayed as a precise decimal (for example, a 45-minute span shows as 0.75 hours), so there's no rounding error introduced beyond whatever precision you entered the start and end minutes with.