How Many Hours Calculator: Work Hours & Time
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator works out how many hours are between two times or dates. You enter a start time and an end time, and it returns the total hours and minutes between them, with the option to subtract breaks. The result is shown as a decimal number of hours and as hours and minutes, so you can use it for work shifts, time tracking, or planning.
Formula
The calculator uses a simple subtraction of times converted to minutes:
- Start time = start hours × 60 + start minutes (call it S)
- End time = end hours × 60 + end minutes (call it E)
- Total minutes = E − S − break minutes
- Hours worked = total minutes ÷ 60
All times are on a 24-hour clock. If the end time is earlier than the start time, the calculator assumes the shift crosses midnight (e.g., 23:00 to 07:00). The formula then adds 24 hours (1440 minutes) to the end time before subtracting.
Worked Example
Using the default values: start at 09:00, end at 17:30, break of 30 minutes.
- Start in minutes: 9 × 60 + 0 = 540
- End in minutes: 17 × 60 + 30 = 1050
- Total minutes before break: 1050 − 540 = 510
- Subtract break: 510 − 30 = 480 minutes
- Convert to hours: 480 ÷ 60 = 8.00 hours
The calculator shows 8.00 hours and 8:00 (hours:minutes).
When to Use This Calculator
This tool is useful in several everyday situations:
- Work shifts: Calculate your daily hours for timesheets or payroll.
- Project tracking: See how long you spent on a task from start to finish.
- Event planning: Determine the duration of an event or meeting.
- Study sessions: Track study time including breaks.
- Travel time: Estimate hours between departure and arrival.
For payroll, you may need to round to the nearest quarter-hour (0.25, 0.5, 0.75, or 1.0) depending on your employer’s policy. This calculator gives the exact number, so you can round as needed.
How to Read the Result
The first output is the total hours as a decimal. For example, 7.75 hours means 7 hours and 45 minutes (since 0.75 × 60 = 45). The second output shows the same duration in hours:minutes format (7:45).
If you enter a break longer than the total time, the calculator returns 0 hours, because you cannot work negative hours. If the end time is earlier than the start time, the calculator treats it as crossing midnight. For example, 22:00 to 06:00 with no break gives 8 hours.
Common Mistakes and How to Avoid Them
- Mixing AM/PM with 24-hour time: Always use 24-hour format. 3:00 PM is 15:00, not 3:00.
- Forgetting to subtract breaks: Unpaid breaks must be deducted to get actual working hours.
- Entering minutes as decimals: 1.5 hours is 1 hour 30 minutes, but 1:50 is 1 hour 50 minutes. This calculator expects HH:MM format.
- Assuming the calculator handles time zones: It only works with local times you enter. If you work across time zones, convert to one zone first.
Limitations and Edge Cases
This calculator is for elapsed time, not for time zones or daylight saving changes. If your shift spans a DST transition, the actual elapsed time may differ by one hour. It also does not account for overnight shifts that span multiple days (e.g., 22:00 to 02:00 the next day works, but 22:00 to 02:00 two days later would not). For such cases, enter the total minutes manually or use a date-time calculator.
The calculator assumes all times are on the same day unless the end is earlier than the start, in which case it adds one day. It does not handle shifts longer than 24 hours.
Frequently Asked Questions
How do I calculate hours between two times?
Convert both times to minutes since midnight, subtract the start from the end, then divide by 60. If the end is earlier than the start, add 1440 minutes (24 hours) to the end first. Subtract any break minutes, then convert to hours.
What is 9:00 to 5:30 with a 30-minute lunch?
That is 8 hours and 30 minutes minus 30 minutes, which equals 8 hours exactly. The calculator shows 8.00 hours and 8:00.
How do I convert hours to minutes?
Multiply the number of hours by 60. For example, 7.25 hours × 60 = 435 minutes. To convert back, divide minutes by 60 and the remainder is the minutes.
Can I use this for overnight shifts?
Yes. If the end time is earlier than the start time, the calculator assumes the shift crosses midnight. For example, 23:00 to 07:00 with no break gives 8 hours. If your shift spans more than one midnight, you will need a different tool.
Why do I get 0 hours when I enter a break?
If the break is longer than the total elapsed time, the result would be negative, so the calculator caps it at 0. Check your start and end times to ensure they are correct and that the break is not longer than the shift.
Related
Formula used
in start | Start time (HH:MM) | - | 09:00 | 0 in end | End time (HH:MM) | - | 17:30 | 0 in break | Break (minutes) | min | 30 | 0 out hours | Hours worked | h | max(0, ((end_h*60+end_m) - (start_h*60+start_m) - break) / 60) | 2 out hhmm | Hours:Minutes | - | (end_h*60+end_m) - (start_h*60+start_m) - break | time
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.