What this calculator does
An hours calculator answers how many hours pass between a start time and an end time. Enter both clock times and the gap comes back in hours and minutes, as a decimal figure, and in total minutes and seconds, which covers most of what "how many hours" questions actually need.
The one detail that trips up a manual count is a span that crosses midnight, such as a start time late at night and an end time the next morning. This calculator adds a full day automatically whenever the end time is earlier on the clock than the start time, so an overnight gap still comes out correct.
The formula
The end time is converted to minutes past midnight and the start time is subtracted from it. If that comes out negative, meaning the end time is earlier in the day than the start time, a full 24 hours is added first, which accounts for the span running past midnight into the next day.
| Term | Meaning |
|---|---|
| Start time | The clock time the span begins at. |
| End time | The clock time the span ends at. |
| Unpaid break | Any time in the middle to subtract from the total, such as a lunch break. |
The inputs explained
| Field | What to enter |
|---|---|
| Start time | The time the span starts at, on a 24-hour clock. |
| End time | The time the span ends at. |
| Unpaid break (minutes) | Minutes to subtract from the total, if any time in the middle should not count. |
When to use it
Checking how many hours between two times
The plain question, how many hours between a start and end time, comes up for appointments, travel and study sessions as often as it does for work.
A shift that runs past midnight
An overnight shift, an evening event that runs late, or a flight that lands the next day all need the midnight crossing handled automatically rather than producing a negative number.
Converting a time span to a decimal figure
Some booking systems and spreadsheets want hours expressed as a decimal, such as 8.50 rather than 8 hours 30 minutes, which the decimal figure gives directly.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How many hours fall between a 9am start and a range of finish times
A 9:00 start time against a range of finish times through the day and into the evening.
| End time | Hours between the two times | Crosses midnight? |
|---|---|---|
| 12:00 | 3 h 0 m | No |
| 15:00 | 6 h 0 m | No |
| 17:30 | 8 h 30 m | No |
| 19:00 | 10 h 0 m | No |
| 22:00 | 13 h 0 m | No |
| 02:00 | 17 h 0 m | Yes, counted into the next day |
Questions
How do I calculate hours worked with a break subtracted?
Enter the start and end time, then enter the length of the unpaid break in minutes; it is subtracted from the raw span before the hours are shown.
What happens if the end time is earlier than the start time?
The calculator treats that as an overnight span and adds a full 24 hours before working out the gap, so an end time of 06:00 after a start time of 22:00 correctly comes out as 8 hours rather than a negative figure.
Is this the same as a timesheet calculator?
This is a plain hours-between-two-times calculator. For a full timesheet with days worked, an hourly rate and overtime, see the timesheet and pay calculator.
How do I convert the result to minutes or seconds instead of hours?
The total is shown in minutes and seconds alongside the hours and minutes figure, so no separate conversion is needed.
For a full shift including pay, overtime and days worked, use the timesheet and pay calculator. To add or subtract a duration rather than compare two clock times, see the time duration calculator.