Hours Calculator
An hours calculator helps you find the exact time difference between a start time and end time without counting by hand. This hours calculator works for regular daytime schedules, short appointments, split errands, and overnight shifts that pass midnight. Enter a start time, an end time, and optional break minutes to get the total in minutes, a decimal-hour figure, and a simple hours-and-minutes result you can read at a glance. It is useful when you need to calculate hours between two times for a work shift, lunch break, volunteer block, travel leg, study session, or any schedule where small timing mistakes can add up.
Quick answer
The calculator first converts each clock time into minutes after midnight, which makes the subtraction consistent.
What this tells you
- •The calculator first converts each clock time into minutes after midnight, which makes the subtraction consistent.
- •If the end time is earlier than the start time, the tool treats the range as crossing midnight instead of marking it invalid.
- •Break minutes are subtracted after the raw duration is found, so the result shows net time rather than total on-the-clock time.
- •Results appear in both readable form, such as 7h 45m, and decimal form, such as 7.75 hours, because different records use different formats.
- •If break minutes are longer than the time span entered, the calculator floors the net result at 0 instead of returning a negative number.
How to Use
- 1Enter the start time in 24-hour HH:MM format. For example, type 08:30 for 8:30 AM or 17:45 for 5:45 PM.
- 2Enter the end time in the same HH:MM format. If the shift or event ends after midnight, still enter the actual clock time, such as 06:00.
- 3Add break minutes if part of the period should not count toward the final total. Leave the field at 0 when no break needs to be removed.
- 4Run the calculation to see the total minutes, total decimal hours, and a readable result in hours and minutes.
- 5Use the readable result when you want a quick schedule check, and use the decimal result when you need payroll, billing, or spreadsheet-friendly hours.
How It Works
Formula
Convert start time to minutes after midnight
Convert end time to minutes after midnight
Raw duration = end minutes - start minutes
If raw duration is negative, add 1440 minutes
Net duration = max(0, raw duration - break minutes)
Total hours = net duration / 60The method in this hours calculator matches the formula code exactly. Each time is turned into a minute count from midnight, so 09:00 becomes 540 and 17:30 becomes 1050. Subtracting start from end gives the raw duration. When that subtraction is negative, the tool adds 1,440 minutes, which is one full day, to represent an overnight span. After that, break minutes are removed from the raw duration. If the break is longer than the span entered, the calculator returns zero instead of a negative result. The final answer is shown as total minutes, decimal hours rounded to two decimal places, and a readable hours-and-minutes format.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
Standard day shift with lunch
From 09:00 to 17:30 is 8 hours and 30 minutes, or 510 minutes. Subtract the 30-minute break and the net time becomes 480 minutes. That equals exactly 8h 0m, which is also 8.00 decimal hours.
Overnight shift
The end time is earlier on the clock than the start time, so the calculator treats the shift as crossing midnight. From 22:00 to midnight is 2 hours, and from midnight to 06:00 is 6 more hours. The total is 480 minutes, which equals 8h 0m.
Workday with a longer break
The raw span from 08:15 to 16:45 is 8 hours and 30 minutes, or 510 minutes. After subtracting a 45-minute break, 465 minutes remain. That converts to 7h 45m, which the tool also shows as 7.75 hours in decimal form.
Short appointment window
From 11:30 to 14:00 is 150 minutes. Removing a 15-minute break leaves 135 minutes. That is 2 full hours plus 15 minutes, or 2.25 hours as a decimal.
Late-night task that crosses midnight
The raw time from 23:45 to 01:15 is 90 minutes because the period continues into the next day. Subtract the 10-minute break and 80 minutes remain. That equals 1h 20m, and the decimal display rounds to 1.33 hours.
Break longer than the time span
The raw duration is only 20 minutes. Since the break entered is 30 minutes, the net duration would otherwise fall below zero. The calculator prevents negative time and returns 0h 0m instead.
Common hour differences at a glance
These quick checks match the same logic used by the calculator and can help you sanity-check common schedules before you log them.
| Start | End | Break | Net result |
|---|---|---|---|
| 09:00 | 17:00 | 0 min | 8h 0m |
| 09:00 | 17:00 | 30 min | 7h 30m |
| 08:00 | 16:30 | 30 min | 8h 0m |
| 07:45 | 12:15 | 15 min | 4h 15m |
| 13:00 | 17:30 | 0 min | 4h 30m |
| 21:30 | 05:30 | 30 min | 7h 30m |
Use these as rough reference points only. For any custom shift or unusual break pattern, enter the exact times in the calculator.
When to use decimal hours instead of hours and minutes
Use the readable format when you want to check a schedule quickly. A result like 6h 40m is easier to read than 6.67 if you are planning a day, confirming a shift handoff, or checking whether an appointment block fits before another task.
Use decimal hours when the number needs to go into payroll software, billing logs, spreadsheets, or project reports. Many systems expect values like 7.50 or 2.25 instead of a mixed hours-and-minutes format. The calculator gives both so you do not need a second conversion step.
Be careful not to treat minutes as hundredths of an hour. For example, 7h 30m is 7.50 hours, not 7.30 hours. Likewise, 7h 45m is 7.75 hours because 45 minutes is three quarters of an hour.
Common mistakes
- Typing times in an invalid format such as 9, 9.00, or 24:15 instead of a valid HH:MM entry.
- Forgetting to remove unpaid break minutes, which makes the final hours look too high.
- Reading a decimal answer like 7.50 as 7 hours and 50 minutes when it actually means 7 hours and 30 minutes.
- Assuming an end time earlier than the start time is an error when it may simply mean the shift crossed midnight.
- Entering rounded times from memory instead of the exact clock-in and clock-out values, which can create avoidable small errors.
Embed this calculator on your site
Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.
<script src="https://calctide.com/embed.js" data-tool="hours-calculator" async></script>Preview the embed at /embed/hours-calculator/.