How this calculator works
Enter a start time and an end time and this calculator returns the elapsed time between them — as hours and minutes, as a decimal number of hours (useful for timesheets and billing), and as a total minute count. It is built for a single stretch of time, such as a meeting, a workout, a phone call, or a work shift.
Overnight spans are handled automatically: if the end time is earlier in the day than the start time (say, start at 22:00 and end at 06:00), the calculator assumes the end time falls on the following day rather than treating the duration as negative, and it says so plainly in the result.
The calculation
Convert both times to minutes past midnight: minutes = hours × 60 + minutes.If end time ≥ start time: duration = end minutes − start minutes.If end time < start time: duration = end minutes + 1,440 − start minutes (1,440 = minutes in a day), assuming the end time is on the next day.Decimal hours = total minutes ÷ 60. This is the format most timesheets and payroll systems expect (7.5 hours rather than 7 hours 30 minutes).
Worked example: an overnight shift
- Start: 23:00. End: 01:00.
- Because 01:00 is earlier in the day than 23:00, the calculator assumes the end time is the next day.
- Duration: (1×60 + 0) + 1,440 − (23×60 + 0) = 60 + 1,440 − 1,380 = 120 minutes.
- Result: 2 hours 0 minutes, or 2.0 decimal hours.
Frequently asked questions
What if my start and end times are the same?
The duration is 0 — the calculator does not assume a full 24 hours just because the two times match. If you mean a full day, enter the end time as 23:59 or add a day manually.
How does the calculator know if a shift crosses midnight?
It compares the two times directly: if the end time is earlier in the clock than the start time, it must be on the next day for the duration to make sense, so 1,440 minutes (24 hours) are added before subtracting.
Why do I need decimal hours as well as hours and minutes?
Hours and minutes (like 7h 30m) are how people read a duration; decimal hours (7.5) are how most payroll and billing systems store and multiply it against an hourly rate.
Can I calculate pay directly from a work shift instead of just the duration?
Yes — use the Work Hours Calculator, which adds an unpaid break deduction, a weekly total, and an optional hourly rate on top of the same midnight-crossing duration logic.
Can this calculator find a duration longer than 24 hours?
No — since it only takes a start and end clock time with no date attached, it can represent at most one midnight crossing, which caps any result at under 24 hours. For a span that runs across more than one full day, use a date-and-time based tool such as the Date Difference Calculator, which tracks full calendar dates rather than just times of day.