Formula and calculation method
Convert both clock times to minutes after midnight. Subtract the start from the end, add 1,440 minutes if the difference is negative, then divide by 60.
Worked example
| Input | Example 1 | Example 2 |
|---|---|---|
| Start hour (0–23) | 9 | 22 |
| Start minute (0–59) | 30 | 45 |
| End hour (0–23) | 17 | 1 |
| End minute (0–59) | 15 | 15 |
| Result | 7.75 hours | 2.5 hours |
How to use the result
Enter times in 24-hour notation. An end time earlier than the start is treated as next day; equal times mean zero, not 24 hours. Dates and daylight-saving changes are excluded.
What happens when the end time is earlier?
In the clock-only mode that means the end time falls on the next day. For example, 22:30 to 02:15 is 3 hours 45 minutes. For more than one night use the dated inputs, and enter both times in UTC so the interpretation is clear.