450
min
7.5
h
7
h
30
min
480
min
450
min
7.5
h
7
h
30
min
480
min
The Hours Calculator computes the total number of hours and minutes worked between a start time and an end time, minus any break duration. This is the most fundamental time arithmetic tool for workers, freelancers, students, and anyone who needs to track time spent on an activity. Whether calculating daily work hours for payroll, tracking billable hours for client invoicing, timing a study session, or measuring any time interval, this calculator delivers an instant result.
Time arithmetic is deceptively tricky. The 60-minute hour and 24-hour day create a non-decimal system that trips up mental math. How many hours between 9:15 AM and 5:45 PM with a 45-minute break? Most people cannot compute this instantly in their heads (the answer is 7.5 hours or 7 hours 30 minutes). This calculator handles all such calculations automatically, including overnight shifts that cross midnight.
For employees paid hourly, accurate time calculation is essential. An error of even 15 minutes per day adds up to over 60 hours of pay discrepancy annually. Freelancers and consultants track billable hours meticulously for invoicing accuracy and client trust. Students and professionals use time tracking to manage deep work sessions and study blocks. Athletes and coaches track training duration for performance optimization.
The break duration field allows you to subtract unpaid breaks — lunch, rest periods — from the total, giving you the net working hours that matter for compensation and billing. The output shows total hours as a decimal (useful for payroll calculations), total minutes, and the intuitive hours-and-minutes breakdown.
The calculation converts both times to total minutes since midnight, then computes the difference:
start_minutes = start_hours x 60 + start_minutes_part
end_minutes = end_hours x 60 + end_minutes_part
If end_time > start_time: raw_minutes = end_minutes - start_minutes
If end_time <= start_time (overnight shift): raw_minutes = 1440 - start_minutes + end_minutes
net_minutes = raw_minutes - break_minutes
total_hours = net_minutes / 60 (decimal) | hours_whole = floor(net_minutes / 60) | minutes_remainder = net_minutes mod 60
The total hours decimal (e.g., 7.5) is the format used in payroll systems and time sheets. The hours-and-minutes breakdown (e.g., 7 hours 30 minutes) is the intuitive format for communication. Total minutes is useful when converting to other units or entering into time-tracking software that uses minute-level precision. If the result is 0, it means break_minutes equals or exceeds the time interval — check your inputs.
Inputs
Results
9:00 AM to 5:30 PM minus a 30-minute lunch break = exactly 8.0 working hours.
Inputs
Results
An overnight shift from 10:00 PM to 6:00 AM with no breaks = 8.0 hours (the calculator correctly handles the midnight crossing).
Enter time in 24-hour (HH:MM) format. For example, 9:00 AM is 09:00, 1:30 PM is 13:30, and 11:45 PM is 23:45. The calculator does not use AM/PM — all inputs should be in 24-hour notation for unambiguous results.
Yes. If the end time is earlier than or equal to the start time, the calculator assumes a shift that crosses midnight and adds 24 hours (1440 minutes) to the end time before subtracting the start time. For example, 22:00 to 06:00 correctly calculates as 8 hours.
Calculate each day's hours separately using this tool, then sum the daily totals. For a consistent schedule (e.g., 8 hours/day x 5 days), simply multiply. For varying daily hours, add each day's total hours and minutes separately, converting minutes to decimal hours (minutes / 60) for the sum.
Decimal hours (e.g., 7.5 hours) are the standard format for payroll systems, billing software, and time-tracking apps. This format allows simple multiplication with an hourly rate to calculate pay. For example, 7.5 hours x $25/hour = $187.50. The hours-and-minutes breakdown is shown for human readability.
This calculator handles one shift at a time. For multiple shifts in a day or week, calculate each shift separately and sum the total_hours values. A sum of decimal hours is straightforward (e.g., 4.5 + 3.75 = 8.25 hours).
The calculator uses Math.max(0, net_minutes) to prevent negative results. If break_minutes equals or exceeds the raw time interval, the result is 0 hours. Check your input values for data entry errors in this case.
Multiply total_hours (decimal) by your hourly rate. Example: 8.75 hours x $20/hour = $175. For overtime pay (typically 1.5x after 8 hours/day or 40 hours/week in the US), apply the base rate to the first 8 hours and the overtime rate to any hours beyond 8.
The parser splits on the colon and converts each part to an integer, so both 9:05 and 09:05 should work correctly. For best results, use standard HH:MM format with leading zeros. If you get unexpected results, verify your time format.
total_hours is the decimal representation (e.g., 7.5 hours). hours_whole is the integer part only (e.g., 7). The remaining minutes field shows the fractional part in minutes (e.g., 30 minutes). Together, hours_whole and minutes_remainder give the traditional time format (7 hours 30 minutes).
This calculator includes a break deduction feature, making it specifically useful for work hour calculation. The Hours Between Two Times calculator is a purer interval measurement with no break subtraction. Use this one for work/payroll calculations, and the other for pure duration measurement.
Roboculator Team
The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.
How helpful was this calculator?
Be the first to rate!
Subtract Time Calculator
Time Duration & Arithmetic
Time Adder Calculator
Time Duration & Arithmetic
Time Math Calculator
Time Duration & Arithmetic
Hours and Minutes Calculator
Time Duration & Arithmetic
Hours Between Two Times Calculator
Time Duration & Arithmetic
Minutes Between Two Times Calculator
Time Duration & Arithmetic