How to Calculate Hours Between Two Times
Calculating the exact number of hours and minutes between two times is a fundamental operation in payroll management, freelance billing, time tracking, project scheduling, and daily planning. While subtracting numbers on a standard base-10 calculator is straightforward, time measurement follows the sexagesimal (base-60) system, in which 1 hour contains 60 minutes and 1 minute contains 60 seconds. Consequently, subtracting 8:30 from 5:30 cannot be treated as ordinary decimal subtraction without properly adjusting for 12-hour AM/PM cycles and base-60 modulo math.
To calculate elapsed time accurately by hand or programmatically, adhere to the following systematic procedure:
- Convert Both Times to 24-Hour (Military) Format: If a time is in the afternoon or evening (PM) and is not 12:00 PM, add 12 to the hour value (e.g., 5:30 PM becomes 17:30). If a time is 12:00 AM (midnight), set the hour to 00:00. 8:30 AM remains 08:30.
- Convert Both Times into Total Minutes from Midnight: Multiply the hours by 60 and add the minutes. For 8:30 AM:
(8 × 60) + 30 = 510 minutes. For 5:30 PM:(17 × 60) + 30 = 1,050 minutes. - Calculate the Elapsed Minutes: Subtract the start minutes from the end minutes:
1,050 - 510 = 540 minutes. - Handle Overnight Shifts Crossing Midnight: If the end time is numerically earlier than the start time (e.g., 10:00 PM to 6:00 AM, where 1,320 minutes start and 360 minutes end), the calculation would produce a negative value (-960 minutes). Simply add 1,440 minutes (one full 24-hour day):
-960 + 1,440 = 480 minutes (8 hours). - Convert Total Minutes Back to Hours and Minutes: Divide the elapsed minutes by 60 using integer division for hours, and use the remainder as minutes:
540 ÷ 60 = 9 hours, remainder 0 minutes.
Converting Minutes to Decimal Hours for Payroll & Billing
Human resources departments, accounting systems, and invoicing software universally require work hours to be expressed in decimal hours rather than sexagesimal hours and minutes. For example, logging 8 hours and 30 minutes on an employee timesheet must be recorded as 8.50 hours so that multiplying by an hourly wage (e.g., $30.00/hr × 8.50 = $255.00) produces the mathematically correct compensation.
To convert minutes into decimal hours, divide the minute value by 60:
For example, 7 hours and 45 minutes converts to:
7 + (45 ÷ 60) = 7 + 0.75 = 7.75 decimal hours.
Why Fraction Arithmetic Matters in Financial Time Tracking
Fraction arithmetic is indispensable in financial and corporate payroll calculations because fractions preserve exact mathematical ratios that infinite decimal representations can distort. For instance, an employee working 20 minutes performs exactly 1/3 of an hour. In decimal notation, 1/3 produces a repeating decimal (0.333333...), which introduces truncation error when rounded to two decimal places (0.33 hours). Over hundreds of employees and thousands of billing hours, minute fraction rounding discrepancies can result in significant accounting drift.
By evaluating time durations through exact simplified fractions—such as 15 min = 1/4 hr, 30 min = 1/2 hr, 45 min = 3/4 hr, and exact fraction of an 8-hour shift (e.g. 9/8 = 1 1/8 workday)—our Hours Calculator ensures mathematically pure outputs suitable for auditing, timesheet reconciliation, and statutory overtime assessments.
Minutes to Decimal and Fraction Conversion Chart
| Minutes | Fraction of Hour | Decimal Equivalent | Standard Payroll Rounding |
|---|---|---|---|
| 5 min | 1/12 hr | 0.0833 hrs | 0.08 hrs |
| 10 min | 1/6 hr | 0.1667 hrs | 0.17 hrs |
| 15 min | 1/4 hr | 0.2500 hrs | 0.25 hrs (Quarter hour) |
| 20 min | 1/3 hr | 0.3333 hrs | 0.33 hrs |
| 25 min | 5/12 hr | 0.4167 hrs | 0.42 hrs |
| 30 min | 1/2 hr | 0.5000 hrs | 0.50 hrs (Half hour) |
| 35 min | 7/12 hr | 0.5833 hrs | 0.58 hrs |
| 40 min | 2/3 hr | 0.6667 hrs | 0.67 hrs |
| 45 min | 3/4 hr | 0.7500 hrs | 0.75 hrs (Three-quarter hour) |
| 50 min | 5/6 hr | 0.8333 hrs | 0.83 hrs |
| 55 min | 11/12 hr | 0.9167 hrs | 0.92 hrs |
| 60 min | 1/1 hr | 1.0000 hrs | 1.00 hr (Full hour) |
Frequently Asked Questions (FAQ)
14:30 or 17:00) or standard 12-hour format (2:30 with PM selected). Our parser flexibly accommodates inputs like 830, 8.5, and full hour-minute-second strings.