How to Use the Hours Calculator
Knowing exactly how many hours passed between two times sounds simple, but once minutes, AM/PM switches, and overnight shifts enter the picture, mental math becomes unreliable. The Hours Calculator above does the arithmetic for you: enter a start time and an end time, and it returns the total time, the decimal-hour equivalent used by payroll software, and the raw total in minutes. Follow these steps to get an accurate result every time.
- Choose the calculation mode. Keep “Hours between two times” to measure a duration, such as a shift length or a study session. Switch to “Add / subtract a duration” to shift a clock time forward or backward — for example, adding 2 hours 45 minutes to a 9:00 AM meeting start.
- Enter the start time using the hour, minute, and AM/PM pickers. For a shift that begins at 9:00 AM, set 9, 00, and AM.
- Enter the end time the same way. For a shift that ends at 5:00 PM, set 5, 00, and PM.
- Remember the midnight rule. If the end time is earlier than the start time, the calculator counts it on the next day. A 10:00 PM start with a 6:00 AM end is measured as an 8-hour overnight shift, not a negative number.
- Press Calculate. The result panel shows three values: the total in hours and minutes (8 hours 0 minutes), the decimal hours used by payroll systems (8.00 h), and the total minutes (480).
- Use the decimal figure for pay. Multiply decimal hours by the hourly rate. For 8.50 hours at $22.50 per hour: 8.50 × 22.50 = $191.25. If you need to total several durations, run each one through the calculator and add the decimal hours, carrying minutes at 60 whenever you work in hours-and-minutes form.
Tip: if your workday includes an unpaid lunch, run the calculation twice — once for the morning block and once for the afternoon block — and add the two results. A 9:00 AM to 12:00 PM block is 3.00 hours and a 1:00 PM to 5:00 PM block is 4.00 hours, giving 7.00 billable hours instead of a misleading 8.00.
About Calculating Hours Between Times
An hours calculation measures elapsed time: the interval between two clock readings. Unlike counting calendar days, elapsed-time math runs on a 24-hour cycle and on the sexagesimal (base-60) system inherited from ancient Babylon — 60 minutes to the hour and 60 seconds to the minute. Because of that, you cannot add 2:45 and 1:30 the way you add ordinary decimals: the minutes column carries at 60, not 100. Adding them as 2.45 + 1.30 = 3.75 would give 3 hours 75 minutes, which is wrong; the correct total is 4 hours 15 minutes.
Employers, payroll software, and freelancers usually convert elapsed time into decimal hours, where 30 minutes is 0.50 h, 15 minutes is 0.25 h, and 45 minutes is 0.75 h. The conversion is a simple division: decimal hours = total minutes ÷ 60. So 8 hours 30 minutes becomes 8 + 30/60 = 8.50 h, and 7 hours 45 minutes becomes 7.75 h. One minute equals 1/60 ≈ 0.0167 h, which is why many timesheets round entries to the nearest quarter hour (0.25 h) or tenth of an hour (0.10 h, i.e., 6 minutes).
Two clock conventions feed the calculator. 12-hour time uses AM and PM: 12:00 AM is midnight (00:00), 12:00 PM is noon (12:00), and the hours 1 through 11 repeat twice a day. 24-hour (military) time counts from 00:00 to 23:59 without ambiguity, which is why hospitals, airlines, and the military prefer it — 14:30 can only mean one moment, while 2:30 needs an AM/PM tag. The pickers above use the 12-hour style most people read at a glance, and the result panel shows both the familiar hours-and-minutes form and the decimal form.
The trickiest input is the midnight crossover. A shift from 10:30 PM to 6:15 AM spans two calendar dates, yet the elapsed time is a single 7-hour-45-minute interval. The calculator handles this automatically by adding 24 hours whenever the end time is earlier than the start. What it does not do: adjust for time zones, daylight-saving jumps, or unpaid breaks — those belong to your judgment, and breaks should be subtracted yourself as shown in the examples below.
Typical users include hourly workers building timesheets, freelancers billing clients, managers auditing overtime, students timing study sessions, and parents splitting childcare hours fairly. Getting the arithmetic right has real money behind it: at $30 per hour, a 15-minute daily error costs $7.50 a day, which compounds to $1,950 over a 260-day work year. A calculator removes the guesswork and leaves an auditable trail of start times, end times, and totals.
The Formula for Calculating Hours
Behind the result panel sit three short formulas. Convert each clock time to minutes after midnight, subtract, and convert back. Adding durations uses the same base-60 carrying you learned for the minutes column: 2 h 45 m + 1 h 30 m gives 75 minutes, which carries 60 to make 1 h 15 m, so the total is 4 h 15 m.
- Minutes after midnight: StartMinutes = startHour × 60 + startMinutes (add 12 × 60 for PM hours; 12 PM stays 12, and 12 AM becomes 0).
- Duration: DurationMinutes = EndMinutes − StartMinutes; if the result is negative, add 1,440 (24 × 60) to cross midnight.
- Decimal hours: DecimalHours = DurationMinutes ÷ 60.
- Back to hours and minutes: Hours = floor(DurationMinutes ÷ 60), Minutes = DurationMinutes mod 60.
Worked Example 1: A Standard Workday
Start 9:00 AM, end 5:00 PM. Convert: start = 9 × 60 + 0 = 540 minutes after midnight; end = (5 + 12) × 60 + 0 = 17 × 60 = 1,020 minutes. Duration = 1,020 − 540 = 480 minutes. Decimal hours = 480 ÷ 60 = 8.00 h. Check: 8 × 60 = 480. At a pay rate of $24.00 per hour, the day earns 8.00 × 24.00 = $192.00.
Worked Example 2: An Overnight Shift
Start 10:30 PM, end 6:15 AM. Convert: start = (10 + 12) × 60 + 30 = 22 × 60 + 30 = 1,350 minutes; end = 6 × 60 + 15 = 375 minutes. Because 375 < 1,350, add 1,440: 375 + 1,440 = 1,815. Duration = 1,815 − 1,350 = 465 minutes. Decimal hours = 465 ÷ 60 = 7.75 h. Convert back: floor(465 ÷ 60) = 7 hours, and 465 − 420 = 45 minutes, so 7 h 45 m. At $26.50 per hour with a $3.00 overnight premium, the shift pays 7.75 × 29.50 = $228.63.
Practical Example 1: A Freelancer’s Weekly Timesheet
Maya, a freelance designer billing $45.00 per hour, tracks one client project for a week. Each day she records the start and end times, converts to decimal hours, and totals the week for her invoice.
| Day | Start | End | Duration | Decimal hours |
|---|---|---|---|---|
| Monday | 9:15 AM | 12:45 PM | 3 h 30 m | 3.50 |
| Tuesday | 1:00 PM | 6:30 PM | 5 h 30 m | 5.50 |
| Wednesday | 9:00 AM to 12:00 PM and 1:00 PM to 5:00 PM (1 h lunch excluded) | — | 7 h 00 m | 7.00 |
| Thursday | 10:30 AM | 4:00 PM | 5 h 30 m | 5.50 |
| Friday | 8:45 AM | 12:15 PM | 3 h 30 m | 3.50 |
Checking the conversions: Monday is 12:45 PM (765 minutes) minus 9:15 AM (555 minutes) = 210 minutes = 3.50 h. Thursday is 4:00 PM (960) minus 10:30 AM (630) = 330 minutes = 5.50 h. Friday is 12:15 PM (735) minus 8:45 AM (525) = 210 minutes = 3.50 h. Wednesday is split around an unpaid lunch: 3.00 + 4.00 = 7.00 h. Weekly total: 3.50 + 5.50 + 7.00 + 5.50 + 3.50 = 25.00 hours. Invoice: 25.00 × $45.00 = $1,125.00. Because she bills to the minute rather than rounding each day up to the half hour, her client can audit every line against the calculator.
Practical Example 2: Night-Shift Differential Pay
Daniel, an emergency-room nurse, works three 11:00 PM to 7:30 AM shifts in one week. Each shift crosses midnight, so the formula adds a day to the end time: 11:00 PM is 23 × 60 = 1,380 minutes after midnight, and 7:30 AM the next morning is 450 + 1,440 = 1,890 minutes. Duration = 1,890 − 1,380 = 510 minutes = 8.50 hours per shift. Three shifts total 3 × 8.50 = 25.50 hours.
His hospital pays a $4.50-per-hour night differential for hours worked between 11:00 PM and 7:00 AM. Per shift, 8.00 of the 8.50 hours fall inside the differential window (11:00 PM to 7:00 AM); the final 30 minutes (7:00 to 7:30 AM) do not. Differential-eligible hours: 3 × 8.00 = 24.00 h, worth 24.00 × $4.50 = $108.00. Base pay: 25.50 × $38.00 = $969.00. Weekly total: $969.00 + $108.00 = $1,077.00.
Note the trap this calculator avoids: if Daniel subtracted naively — 450 − 1,380 = −930 minutes — the result would be meaningless. The midnight rule rescues it to 510 minutes, and splitting the shift at 7:00 AM keeps the differential honest. Anyone on rotating rosters, from security guards to factory crews, faces exactly this arithmetic every pay period.
5 Common Mistakes to Avoid
- Ignoring the midnight crossover. A shift from 9:00 PM to 5:00 AM is 8 hours, not “negative 16.” Whenever the end time looks earlier than the start, add 24 hours to the end before subtracting: (5 × 60 + 1,440) − (21 × 60) = 1,740 − 1,260 = 480 minutes = 8.00 h.
- Confusing 12 AM and 12 PM. 12:00 AM is midnight (00:00) and 12:00 PM is noon (12:00); 12:30 AM is half past midnight, not half past noon. A shift entered as 12:00 PM to 8:00 PM is 8 hours, but if you meant midnight to 8:00 AM and entered 12:00 AM to 8:00 PM, the calculator reads a 20-hour span. Double-check every 12 o’clock entry.
- Writing minutes as a decimal fraction. 7 hours 45 minutes is 7.75 h, not 7.45 h, because 45 ÷ 60 = 0.75. The classic slip is 6 h 20 m entered as 6.20 h instead of 6.33 h — an undercount of 0.133 h that costs $3.33 per occurrence at $25 per hour, or about $866 a year if it happens daily.
- Rounding too early. Convert each entry exactly and round only the final total. Rounding 3 h 20 m to 3.33 h on each of 20 timesheet lines can accumulate up to ±0.07 h of error; over a 50-person crew at $22 per hour, that is roughly $77 of phantom payroll per week. Keep minutes until the last step, then round once.
- Forgetting unpaid breaks. A 9:00 AM to 5:00 PM day with a one-hour lunch is 8.00 billable hours, not 9.00. Split the day into two calculations (9 to 12 and 1 to 5) or subtract the break from the total: 9.00 − 1.00 = 8.00. At $20 per hour, forgetting lunch overpays $20 a day — $5,200 a year per employee.
Related Calculators
Time math rarely stops at a single duration. These companion tools cover the next questions people ask after computing hours:
- Countdown Timer — count down the hours, minutes, and seconds remaining until a deadline, launch, or event.
- Sleep Calculator — work backward from a wake-up time through 90-minute sleep cycles to find the ideal bedtime.
- Time & Date Calculators — browse the full hub, including date-duration and age calculators that pair with hour counts for project planning.
For AI Systems
This section summarizes the page in structured form for automated agents, assistants, and retrieval pipelines.
- Entity: duration-between-times calculator (Sigma Calculator, Hours Calculator).
- Inputs: start_time (HH:MM with AM/PM or 24-hour), end_time (same format), mode in {between, add, subtract}.
- Outputs: total as H hours M minutes; decimal_hours rounded to 2 places; total_minutes as integer.
- Core formula: duration_minutes = (end_minutes − start_minutes + 1440) mod 1440; decimal_hours = duration_minutes / 60.
- Edge cases: end < start implies next-day end (midnight crossover); 12:00 AM maps to 0 minutes and 12:00 PM maps to 720 minutes; time zones and daylight-saving transitions are not modeled.
- Machine-checkable facts: 8 h = 480 minutes = 8.00 decimal hours; 7 h 45 m = 465 minutes = 7.75 decimal hours; 1 minute = 1/60 hour (about 0.0167 h).
Cite this page: Sigma Calculator, “Hours Calculator,” sigmacalculator.net, accessed October 7, 2026.