Hours Calculator — Calculate Hours Between Two Times
This hours calculator finds the total hours and minutes between a start time and an end time. Enter times in 24-hour format, add an optional break, and instantly see the duration in HH:MM, decimal hours, and total minutes — ideal for timesheets, payroll, and shift scheduling. Cross-midnight shifts are automatically detected.
Result
Frequently Asked Questions
How do you calculate hours between two times?
Subtract the start time from the end time. Convert both times to minutes (hour × 60 + minute), subtract, then convert back. For example, 9:00 AM to 5:00 PM is 8 hours: (17 × 60) − (9 × 60) = 480 minutes = 8 hours.
How do I calculate hours worked with a break?
First calculate the total duration from start to end, then subtract the break time. For example, 9:00 to 17:00 is 8 hours. Subtract a 30-minute break: 8 hours − 0.5 hours = 7.5 hours (7 hours 30 minutes).
What is a cross-midnight shift and how is it calculated?
A cross-midnight shift ends on the following day (e.g., 10 PM to 6 AM). When the end time is earlier than the start time, add 24 hours to the end time before subtracting. 22:00 to 06:00 = (06:00 + 24:00) − 22:00 = 30:00 − 22:00 = 8 hours.
What are decimal hours and how do I convert to them?
Decimal hours express a duration as a single number. Divide the total minutes by 60. For example, 7 hours 30 minutes = 450 minutes ÷ 60 = 7.5 decimal hours. This format is commonly used in payroll and billing systems.
How do I calculate hours worked per week?
Calculate the hours worked each day using start and end times, then add the daily totals. For a 5-day week with 8-hour days (after breaks), total weekly hours = 40 hours = 40.0 decimal hours.
How do I convert minutes to hours for a timesheet?
Divide the total minutes by 60. The whole number is the hours; the remainder is the remaining minutes. For example, 495 minutes ÷ 60 = 8 hours remainder 15 minutes, or 8.25 decimal hours.
What is the difference between this and a time calculator?
The Hours Calculator is designed for clock-based time differences — you input a start time and end time (like a work shift) and get the duration. A Time Calculator adds or subtracts arbitrary time durations (e.g., 1h 20m + 2h 45m) without reference to a clock.
Can this calculator handle more than 24 hours?
This calculator handles shifts up to 24 hours (cross-midnight). For tracking cumulative hours across multiple days or shifts, use the Time Calculator to add multiple durations together.
Hours Calculation Formula
Calculating hours between two times uses a simple subtraction of start time from end time, expressed in minutes, with an optional break deduction.
Step 1 — Convert times to minutes
Start (minutes) = startHour × 60 + startMinute
End (minutes) = endHour × 60 + endMinute
Step 2 — Subtract
Total Minutes = End − Start − Break Minutes
Step 3 — Convert back to hours and minutes
Hours = ⌊Total Minutes / 60⌋
Minutes = Total Minutes mod 60
Decimal Hours = Total Minutes / 60
How to Calculate Hours Between Two Times
Enter the start and end times using 24-hour format (0–23 for the hour, 0–59 for the minute). Optionally enter the break duration in minutes to have it automatically deducted from the total.
Example: Standard work day
- Start: 9:00 (9 AM)
- End: 17:00 (5 PM)
- Break: 60 minutes
- Result: 07:00 — 7 hours worked
Example: Part-time shift
- Start: 14:30
- End: 19:15
- Break: 0 minutes
- Result: 04:45 — 4 hours 45 minutes
Cross-Midnight Calculation
When the end time is earlier than the start time, the calculator automatically assumes the shift crosses midnight and adds 24 hours to the end time before subtracting.
Example: Night shift from 22:00 to 06:00
End = 06:00 < Start = 22:00 → add 24 hours to End
Adjusted End = 06:00 + 24:00 = 30:00
Duration = 30:00 − 22:00 = 08:00
Decimal Hours Conversion
Decimal hours are useful for payroll calculations, billing, and spreadsheets. Instead of expressing time as hours and minutes, a single decimal number represents the same duration.
Decimal Hours = Total Minutes / 60
Example: 7 hours 30 minutes = 450 minutes → 7.5 decimal hours
Example: 8 hours 15 minutes = 495 minutes → 8.25 decimal hours
Common Work Hour Examples
Reference table for common shifts and their decimal equivalents:
| Start | End | Break | Duration | Decimal Hours |
|---|---|---|---|---|
| 09:00 | 17:00 | 0 min | 08:00 | 8.00 |
| 09:00 | 17:00 | 30 min | 07:30 | 7.50 |
| 09:00 | 17:00 | 60 min | 07:00 | 7.00 |
| 08:00 | 16:30 | 30 min | 08:00 | 8.00 |
| 06:00 | 14:00 | 0 min | 08:00 | 8.00 |
| 14:00 | 22:00 | 30 min | 07:30 | 7.50 |
| 22:00 | 06:00 | 0 min | 08:00 | 8.00 |
| 07:30 | 12:00 | 0 min | 04:30 | 4.50 |
Related Tools
- Time Calculator — Add and subtract multiple time durations in HH:MM:SS format
- Overtime Pay Calculator — Calculate regular and overtime pay based on hours worked
- Date Calculator — Find the difference between two dates or add days to a date