Count Hours Calculator

Count the hours between two times the way a timesheet would.

Everyday Decimal hours for payroll Overnight shift toggle Optional pay estimate
Rate this calculator

How many hours did you work?

Hours & minutes · decimal hours · breaks · overnight shifts · optional pay

Instructions — Count Hours Calculator

1

Enter start and end times

Use 24-hour format from the time pickers (e.g. 09:00 and 17:30). The calculator works in minutes internally, so you do not need to convert anything yourself before typing.

2

Subtract unpaid breaks

Enter total break time in minutes — lunch, coffee breaks, anything not paid. A standard U.S. shift typically includes a 30 or 60 minute unpaid lunch break.

3

Toggle overnight if needed

Enable "Shift crosses midnight" when end time is on the next calendar day (e.g. 22:00 to 06:00). Without that flag, an end time earlier than the start time returns an error.

Decimal hours for payroll: most U.S. payroll systems want decimal hours (7.5) rather than hours-and-minutes (7h 30m). Divide minutes by 60: 30 / 60 = 0.5, so 7h 30m = 7.50.
Add an hourly rate: enter your wage and pick a currency to see a gross-pay estimate. Gross means before tax and deductions — net pay will be lower.

Formulas

The calculation runs in minutes and converts back to hours at the end. Working in minutes avoids floating-point errors that show up when you mix decimals and clock arithmetic.

GROSS TIME (BEFORE BREAKS)
$$ G = T_{end} - T_{start} $$
Times are in total minutes since midnight. For an overnight shift, add 1440 minutes (24 hours) to the end time before subtracting.
NET TIME (AFTER BREAKS)
$$ N = G - B $$
B is unpaid break minutes. If N is negative, the break is longer than the shift — the calculator returns an error instead of a number.
HOURS AND MINUTES
$$ H = \left\lfloor \frac{N}{60} \right\rfloor \quad; \quad M = N \bmod 60 $$
Floor divide for whole hours; modulo 60 for the remaining minutes. 450 minutes = 7 hours and 30 minutes.
DECIMAL HOURS & PAY
$$ D = \frac{N}{60} \quad; \quad P = D \times R $$
D is decimal hours (450 / 60 = 7.5). Multiply by hourly rate R for gross pay. Most payroll systems round D to two decimals.

Reference

Minutes to decimal hours
MinutesDecimalCommon use
150.25Quarter hour
200.33Third
300.50Half hour
450.75Three quarters
500.83Five sixths
601.00One hour
Standard work weeks by country
CountryStatutory weekDaily limit
United States (FLSA)40 hNo federal cap
United Kingdom48 h maxNo statutory cap
Germany40 h typical8 h (10 h max)
France35 h10 h max
Poland40 h8 h (avg)
Japan40 h8 h
Quick reference: common shift lengths (with breaks)
ShiftGrossBreakNet hoursDecimal
09:00 – 17:008h 0m60 min7h 0m7.00
09:00 – 17:308h 30m60 min7h 30m7.50
08:00 – 16:308h 30m30 min8h 0m8.00
22:00 – 06:00 (overnight)8h 0m45 min7h 15m7.25
07:00 – 19:00 (12-hr)12h 0m60 min11h 0m11.00
06:00 – 22:00 (extended)16h 0m90 min14h 30m14.50

Article — Count Hours Calculator

To count hours worked, subtract the start time from the end time and then subtract unpaid breaks. A 09:00 to 17:30 shift with a 60-minute lunch comes to 7 hours and 30 minutes, or 7.5 hours on a payroll spreadsheet. The math is one subtraction. The complications — overnight shifts that cross midnight, paid versus unpaid breaks, rounding rules used by payroll software, and overtime that kicks in past 40 hours per week under U.S. federal law — are where the cleanly stated formula gets messy.

This article walks through how the calculation actually works, what the U.S. Department of Labor and equivalent regulators in Europe count as "hours worked," and the rounding habits that decide whether your timesheet matches your paycheck.

What it means to count hours

"Hours worked" is a legal term, not just an arithmetic one. The U.S. Fair Labor Standards Act (FLSA) defines it as time an employee is "suffered or permitted" to work — any time during which the employer benefits from the employee's presence, including waiting time when the worker is on call at the workplace. Time spent commuting from home is usually excluded; time spent travelling between job sites during the day usually is not.

The base calculation is simple: end time minus start time, less unpaid breaks. A standard 9-to-5 desk job with a 60-minute lunch comes to 7 hours of paid time, not 8. A 12-hour hospital shift with a 30-minute meal break is 11 hours and 30 minutes — 11.5 decimal hours on the payroll system.

Did you know

The 8-hour day was not federal law in the U.S. until 1938. The Fair Labor Standards Act set 40 hours per week as the threshold above which overtime must be paid at 1.5 times the regular rate — not a cap, just a price signal. Many workers still routinely exceed it; the average U.S. full-time worker logged 41.8 hours per week in 2023 according to the Bureau of Labor Statistics.

Counting hours across midnight

An overnight shift — security guard 22:00 to 06:00, nurse 19:00 to 07:00 — breaks the basic subtraction. If you compute 06:00 minus 22:00, the answer is negative 16 hours. To get the right result, add 24 hours (1,440 minutes) to the end time before subtracting. So 06:00 becomes 30:00 in arithmetic terms, and 30:00 minus 22:00 returns the correct 8 hours.

The calculator above handles this with the "Shift crosses midnight" toggle. Modern timesheet software does it automatically by storing each punch with its date stamp rather than just the time of day — the system sees a punch out at 06:00 the next morning and knows it belongs to the previous evening's shift.

  • 22:00 to 06:00 — 8 hours gross, the most common overnight shift
  • 19:00 to 07:00 — 12 hours, typical for hospital nursing
  • 23:00 to 07:00 — 8 hours, common warehouse third shift
  • 20:00 to 04:00 — 8 hours, retail closing-plus-restock pattern
  • Night-shift differential — typically +10 to +25% on the base rate

Which breaks count and which do not

U.S. federal law (29 CFR 785.18) requires short rest breaks — usually 5 to 20 minutes — to be counted as paid working time. Meal breaks of 30 minutes or more can be unpaid, provided the employee is "completely relieved from duty" during the break. A worker who eats lunch at their desk while still answering phones is technically on the clock; the IRS and DOL have both ruled on this.

The European Union Working Time Directive (2003/88/EC) requires a rest break for any shift longer than 6 hours, with the length and pay status determined by national law. In the UK, the 20-minute minimum break for a 6-hour shift is typically unpaid. In Germany, the Arbeitszeitgesetz mandates a 30-minute break for shifts of 6 to 9 hours, and 45 minutes for longer shifts.

"Working through lunch" is paid time

If your employer expects you to keep answering calls, emails, or customer requests during your lunch break, that break legally counts as paid working time under FLSA. Document it on your timesheet. Wage-and-hour disputes over unpaid working lunches accounted for a significant share of the $274 million in back wages the U.S. Department of Labor recovered in FY2023.

Converting hours to decimal for payroll

Most payroll software stores time as decimal hours, not hours and minutes. The conversion is straightforward: divide the minute portion by 60. So 7 hours 30 minutes becomes 7.5; 7 hours 15 minutes becomes 7.25; 7 hours 45 minutes becomes 7.75. Awkward minute counts — 7 hours 20 minutes — convert to repeating decimals (7.333...). Payroll systems typically round to two decimal places.

The standard rounding rule under FLSA is the "7-minute rule": punches within 7 minutes of a quarter hour can be rounded to the nearest quarter, provided the rounding averages out over time and does not systematically favour the employer. Punch in at 8:53, get rounded to 8:45 in the worker's favour; punch in at 9:08, get rounded to 9:15 against the worker. The rule is legal only if both directions are applied consistently.

Did you know

The decimal-hours convention dates back to early 20th-century factory timekeeping. Time-and-motion engineers like Frederick Taylor pushed for it because hours-and-minutes arithmetic produced too many errors when adding up weekly totals across hundreds of workers. Decimal hours add and multiply like ordinary numbers; hours-and-minutes need carry-the-60 logic that punch-card readers and early computers struggled with.

Counting hours for overtime pay

Under the FLSA, U.S. non-exempt employees earn 1.5 times their regular rate for every hour above 40 in a workweek. The workweek is a fixed 168-hour period that does not have to align with the calendar week — employers can define it Monday to Sunday, Sunday to Saturday, or any other consistent 7-day window. Daily overtime (over 8 hours in one day) is not required by federal law, but several states, including California, Alaska, Nevada, and Puerto Rico, mandate it.

Counting overtime correctly means tracking hours by day, summing them by workweek, and applying the multiplier only to the hours above 40. If you work 9 hours Monday through Thursday (36 hours) and 10 hours Friday (46 total), the first 40 are paid at the regular rate and the last 6 at time-and-a-half — not all 10 Friday hours.

  • 40-hour week — FLSA threshold for federal overtime
  • 1.5x rate — standard U.S. overtime multiplier
  • 2x rate — California double-time after 12 hours in a day
  • Workweek — any fixed 168-hour period, employer-defined
  • Salaried non-exempt — still earns overtime; salary just covers the first 40 hours

Common mistakes when counting hours

Forgetting the overnight toggle

The single most common error in any hours calculator is entering 22:00 and 06:00 without flagging the shift as overnight. The calculator returns either a negative number or zero. Always check whether the end time is before the start time on the clock face — if so, the shift crosses midnight.

Mixing hours-and-minutes with decimals

Writing "7.30" when you mean 7 hours 30 minutes is the second most common error. In decimal hours, 7.30 means 7 hours and 18 minutes (0.30 x 60). The correct decimal for 7 hours 30 minutes is 7.50. Pick one format and stick with it across the whole timesheet.

Counting unpaid breaks as worked time

If your lunch break is unpaid, do not include those minutes in the hours-worked total. A shift of 09:00 to 17:30 with a 60-minute unpaid lunch is 7 hours 30 minutes worked, not 8 hours 30 minutes. Conversely, paid rest breaks under 20 minutes do count as worked time under FLSA.

FAQ

Subtract the start time from the end time and convert the result. A shift from 09:00 to 17:30 is 8 hours 30 minutes gross. Subtract any unpaid break time — a 60-minute lunch leaves 7 hours 30 minutes worked, or 7.5 decimal hours for payroll.
Add 24 hours (1,440 minutes) to the end time before subtracting. A 22:00 to 06:00 shift becomes 22:00 to 30:00 in arithmetic terms, returning 8 hours. The calculator above does this automatically when you enable the "Shift crosses midnight" toggle.
Divide the minute portion by 60 and add to the hour portion. 7 hours 30 minutes is 7 + (30/60) = 7.5. 7 hours 15 minutes is 7.25. 7 hours 45 minutes is 7.75. Decimal hours are what most payroll systems use because they add and multiply cleanly.
No. Under U.S. FLSA regulations (29 CFR 785.19), meal breaks of 30 minutes or more can be unpaid as long as the employee is completely relieved from duty. Short rest breaks of 5 to 20 minutes must be counted as paid working time. EU rules under Directive 2003/88/EC are similar but vary by member state.
A U.S. FLSA-compliant rounding practice where punches within 7 minutes of a quarter hour can be rounded to the nearest quarter. Punch in at 8:53, round to 8:45; punch in at 9:08, round to 9:15. The rule is only legal if rounding goes in both directions and does not systematically favour the employer.
Federal U.S. law requires overtime pay (1.5x the regular rate) for non-exempt employees who work more than 40 hours in a workweek. Some states — including California, Alaska, Nevada, and Puerto Rico — also require daily overtime after 8 hours in a single day. California requires double time (2x) after 12 hours in a day.
If the salary covers a fixed work schedule, you can divide the weekly salary by the contracted hours to get an hourly rate, then track time-worked normally. Non-exempt salaried employees still earn overtime above 40 hours per week — the salary simply replaces the regular hourly rate for the first 40 hours.
No, this calculator handles one shift at a time. To total a week or pay period, run each day through the calculator, write down the decimal hours, then sum them in a spreadsheet. Payroll software automates this once shifts are entered into the system.
You probably have an end time earlier than the start time without flagging the shift as overnight. Either correct the end time, or enable the "Shift crosses midnight" toggle. The other common cause is entering a break longer than the gross shift length — the calculator returns an error rather than negative net hours in that case.
Usually one of three reasons: different rounding rules (your sheet to the minute, payroll to the nearest quarter), different treatment of breaks (you counted lunch, payroll did not), or a missed overnight flag. Pull the raw punch data from the timekeeping system and walk through it minute by minute against your own log to find the discrepancy.