How Many Hours Between Two Times? Shift & Work Hours Guide
Learn how to calculate the exact hours worked between two times, deduct break times, handle shifts that cross midnight, and convert to decimal hours.

Calculating the number of hours worked between a start time and an end time is a daily chore for millions of employees, freelancers, and employers. While it may seem simple, complications like breaks, AM/PM transitions, and shifts crossing midnight can make manual calculations frustrating. Use our free Hours Calculator to compute your work hours instantly, and read on to learn the exact formulas and methods.
How to Calculate Worked Hours Manually
To calculate the elapsed time between two times, follow these steps:
Step 1: Convert to 24-Hour Military Time
Using a 24-hour clock removes AM/PM confusion:
- If the time is AM, keep it as is (except for 12:00 AM, which becomes 00:00).
- If the time is PM (from 1:00 PM to 11:59 PM), add 12 to the hours. E.g., 5:30 PM becomes
17:30.
Step 2: Subtract Start Time from End Time
Subtract the hours and minutes separately:
- Example: Start time of 9:00 AM (
09:00) and end time of 5:30 PM (17:30). - Minutes: $30 - 00 = 30$ minutes.
- Hours: $17 - 9 = 8$ hours.
- Total: 8 hours and 30 minutes.
If the end minutes are smaller than the start minutes, borrow 1 hour (60 minutes) from the end hour before subtracting.
- Example: 9:45 AM (
09:45) to 5:15 PM (17:15). - Borrow 1 hour from
17(leaving16) and add 60 to15(making75). - Minutes: $75 - 45 = 30$ minutes.
- Hours: $16 - 9 = 7$ hours.
- Total: 7 hours and 30 minutes.
Step 3: Deduct Break Times
If you took an unpaid break (e.g., 30 minutes for lunch), subtract those minutes from the total:
- Calculation: 7 hours 30 minutes − 30 minutes = 7 hours.
Handling Midnight Shifts
If your shift crosses midnight, the end time will be numerically smaller than the start time. E.g., starting at 10:00 PM (22:00) and ending at 6:00 AM (06:00). Subtracting 06:00 − 22:00 results in a negative number.
To calculate this correctly:
- Add 24 hours to the end time: $6 + 24 = 30$ hours.
- Subtract the start time: $30 - 22 = 8$ hours.
- Apply any break deductions.
Our free Hours Calculator automatically detects when an end time is earlier than a start time, assuming a midnight crossover and calculating the elapsed time correctly.
Related Calculators
If you are tracking time and wages, check out these related tools:
- Time Card Calculator: Calculate daily shift hours, break deductions, and overtime earnings.
- Time Calculator: Add or subtract time durations.
- Time Zone Converter: Translate times between different UTC offsets.
Try our free Hours Calculator to quickly prepare your timesheets without math mistakes.
RECOMMENDED TOOL


