Time Tracking•8 min read

How to Calculate Hours Worked: The Complete Step-by-Step Guide

Learn how to calculate daily and weekly work hours, subtract unpaid breaks, calculate overnight shifts crossing midnight, and convert minutes into payroll decimals.

TimeCard Web Editorial TeamProject Editorial & Engineering
Editorial & Engineering Project Team
Published 2026-10-24

Key Takeaways

  • Standard 12-hour AM/PM times must be converted to 24-hour military time or integer minutes before subtraction.
  • For shifts crossing 12:00 AM midnight, use the modulo midnight formula: (1440 - Clock In) + Clock Out.
  • Under federal 29 CFR § 785.19, an unpaid meal period ordinarily lasts at least 30 minutes (though shorter periods may qualify under special conditions); complete relief from all duties is central.
  • Clock notation (8:30 = 8h 30m) must be distinguished from decimal-hours entry (8.30 = 8h 18m); entering minutes directly into decimal fields creates a 12-minute shortfall.
  • Under the federal FLSA, covered nonexempt employees must receive at least 1.5× regular pay for weekly hours worked exceeding 40.
  • Computing weekly wages from total integer minutes prevents penny rounding shortfalls compared to prematurely rounding daily shifts.

Whether you are an hourly employee auditing your paystub, a freelancer logging billable time, or a small business manager tallying weekly timesheets, knowing how to accurately calculate hours worked is an essential arithmetic and financial skill.

While the basic principle is simple—subtracting start time from finish time—real-world shifts introduce complications: converting 12-hour clock times, subtracting unpaid meal breaks, tracking overnight graveyard shifts that cross midnight, and translating minutes into decimal fractions for payroll software.

Federal guidelines established by the U.S. Department of Labor under the Fair Labor Standards Act (FLSA Fact Sheet #22) govern which hours must be counted as compensable working time under federal law.

Step 1: Convert Standard Clock Times to 24-Hour Military Time

Standard 12-hour clocks cycle twice per day. Subtracting 8:30 AM from 5:00 PM directly (5:00 - 8:30) produces an invalid negative result on a calculator. To make time easily subtractable, convert afternoon and evening PM times into 24-hour military time by adding 12 to any PM hour (except 12:00 PM noon):

Standard 12-Hour Time24-Hour Military TimeConversion Logic
8:00 AM08:00Morning hours stay identical (00:00 - 11:59)
12:30 PM (Noon)12:30Noon remains 12:30
5:00 PM17:005 + 12 = 17:00
9:30 PM21:309 + 12 = 21:30

Step 2: Calculate Gross Elapsed Shift Duration

Once times are in 24-hour format, subtract your start time from your end time. If the clock-out minutes are smaller than the clock-in minutes, borrow 1 hour (60 minutes) from the hours column:

Example: 8:45 AM to 5:15 PM

  • 1. Convert to 24-hour: Start = 08:45 | End = 17:15
  • 2. Since 15 minutes is less than 45, borrow 1 hour: 17:15 becomes 16 hours and 75 minutes (16:75).
  • 3. Subtract hours: 16 - 8 = 8 hours.
  • 4. Subtract minutes: 75 - 45 = 30 minutes.
  • 5. Gross elapsed duration = 8 hours and 30 minutes (510 total minutes).

Step 3: Deduct Unpaid Meal Breaks (Federal Standard & State Distinctions)

Under federal regulations codified at 29 CFR § 785.19 (Meal Periods), bona fide meal periods are not compensable work time and are deducted from gross shift hours.

Federal vs. State Meal Period Standards:

  • Federal Standard (29 CFR § 785.19): A bona fide meal period ordinarily lasts at least 30 minutes, although a shorter period may qualify under special conditions where the worker has adequate time to eat. Complete relief from all duties—active and inactive—is the central requirement. An employee required to monitor machinery or answer phones while eating has not received an unpaid meal period.
  • No Federal Requirement to Provide Meals: The federal FLSA does not mandate that employers provide meal or rest periods; it only defines compensability when breaks are provided.
  • State-Specific Mandates (e.g., California): Several states enforce independent statutory meal mandates. Under California Labor Code § 512(a), an employer must provide an uninterrupted, duty-free meal period of at least 30 minutes no later than the end of the employee's fifth hour of work (unless waived by mutual agreement for shifts of six hours or less). If an employer fails to provide a qualifying meal period in compliance with applicable Wage Orders, California Labor Code § 226.7 mandates that the employer pay the employee one additional hour of pay at their regular rate of compensation for each workday a meal period was missed or non-compliant. As affirmed by the California Supreme Court, this statutory remedy is an earned wage premium rather than a civil penalty. Official source: California DIR Meal Periods FAQ.
Net Paid Work Time = Gross Elapsed Time - Unpaid Meal Break
Example: 8 hours 30 minutes gross elapsed - 30 minutes meal break = 8 hours 00 minutes net paid time.

Step 4: Handling Overnight Shifts Crossing Midnight

When a shift begins in the evening and ends the next morning (for example, clocking in at 10:00 PM and clocking out at 6:30 AM), standard subtraction produces negative values because the clock-out hour is smaller than the clock-in hour.

Use the Midnight Modulo Formula:

The Midnight Modulo Formula

Part 1 (Pre-Midnight): 24:00 (1,440 min) - Clock-In Time
Part 2 (Post-Midnight): Clock-Out Time
Total Shift = Part 1 + Part 2 - Unpaid Meal Break

Worked Example: 10:00 PM (22:00 = 1,320 minutes) to 6:30 AM (390 minutes) with a 30-minute break:
• Pre-midnight: 1,440 - 1,320 = 120 minutes (2 hours).
• Post-midnight: 390 minutes (6 hours 30 minutes).
• Total elapsed: 120 + 390 = 510 minutes (8h 30m).
• Minus 30m break = 480 paid minutes (8.00 decimal hours).

Step 5: Distinguish Clock Notation from Decimal-Hours Entry

A common timesheet and payroll error is confusing clock notation with decimal-hours entry:

Clock Notation (8:30)

Represents 8 clock hours and 30 clock minutes. In base-60 time, 30 minutes is exactly half of an hour (0.50 hours).

Decimal Entry (8.30)

Represents 8 and 30/100 of an hour (base-10). Because 0.30 × 60 = 18 minutes, entering “8.30” into payroll software pays for only 8 hours and 18 minutes—a shortfall of 12 minutes (0.20 hours).

To convert minutes into decimal hours for payroll software, divide the minutes by 60:

Decimal Hours = Whole Hours + (Minutes ÷ 60)
15 Minutes0.25 hours
30 Minutes0.50 hours
45 Minutes0.75 hours
50 Minutes0.83 hours

Step 6: Complete 7-Day Worked Timesheet Example

Illustrative 7-day schedule demonstrating minute-exact sums, federal overtime isolation, and gross earnings.

DayClock InClock OutMeal BreakGross ElapsedNet MinutesDecimal Hours
Monday08:00 AM04:30 PM30 min8h 30m480 min8.00
Tuesday08:00 AM05:00 PM30 min9h 00m510 min8.50
Wednesday07:45 AM04:45 PM30 min9h 00m510 min8.50
Thursday08:15 AM05:15 PM30 min9h 00m510 min8.50
Friday08:00 AM05:00 PM30 min9h 00m510 min8.50
Saturday09:00 AM01:00 PM0 min4h 00m240 min4.00
SundayOffOff-0h 00m0 min0.00
Weekly Total:2,760 min46.00 hrs

Weekly Overtime & Pay Calculation ($22.00/Hour Base Wage)

  • 1. Total Weekly Hours: 2,760 minutes ÷ 60 = 46.00 decimal hours.
  • 2. Federal Straight-Time Threshold: 40.00 hours @ $22.00 = $880.00.
  • 3. Overtime Hours Worked: 46.00 - 40.00 = 6.00 overtime hours.
  • 4. Overtime Premium Rate: 1.5 × $22.00 = $33.00/hour.
  • 5. Overtime Pay: 6.00 hours @ $33.00 = $198.00.
  • 6. Total Gross Pay: $880.00 + $198.00 = $1,078.00.

Step 7: Integer-Minute Precision vs. Premature Rounding Discrepancies

A subtle arithmetic discrepancy in payroll calculations occurs when daily shifts are rounded prematurely before summing weekly totals.

The 8-Hour 20-Minute Decimal Rounding Variance ($0.60/Week Discrepancy)

Assumed Shift Parameters: An employee works 5 shifts of exactly 8 hours and 20 minutes (500 minutes each) during a 7-day workweek. The base hourly wage is $24.00 per hour, the overtime rate is $36.00 per hour (1.5 × $24.00), and the federal straight-time threshold is 40.0 hours:

Method A: Premature Daily 2-Decimal Rounding
Daily decimal: 500 ÷ 60 = 8.333333... rounded to 8.33 hrs.
Weekly total: 5 days × 8.33 hrs = 41.65 weekly hours.
Straight time: 40.00 hrs × $24.00 = $960.00.
Overtime: 1.65 hrs × $36.00 = $59.40.
Total Gross Pay (Method A) = $1,019.40
Method B: Minute-Exact Summation
Total minutes: 5 shifts × 500 min = 2,500 minutes.
Weekly total: 2,500 ÷ 60 = 41h 40m = 41.666667... hrs.
Straight time: 2,400 min (40.0 hrs) × $24.00 = $960.00.
Overtime: 100 min (1.666667... hrs) × $36.00 = $60.00.
Total Gross Pay (Method B) = $1,020.00

Mathematical Discrepancy: $1,020.00 (Method B) - $1,019.40 (Method A) = $0.60 per week. Over a recurring 52-week work year, this rounding shortfall represents a potential $31.20 annual gross-pay calculation difference under the stated assumptions ($0.60 × 52 = $31.20). TimeCard Web avoids this variance by summing integer minutes first before converting to final dollar compensation.

Important Statutory Caveats & Educational Disclaimers

  • FLSA White-Collar Exemptions: Under 29 CFR Part 541, employees meeting executive, administrative, or professional duties tests paid on a qualifying salary basis are exempt from federal overtime.
  • State Daily Overtime Standards: While federal law evaluates overtime strictly after 40 weekly hours under 29 U.S.C. § 207, specific state statutes impose daily overtime rules:
    • California (Labor Code § 510): Mandates 1.5× after 8 hours in a workday and for the first 8 hours on the 7th consecutive day; 2.0× double-time after 12 hours in a day.
    • Nevada (NRS 608.018): Mandates daily overtime after 8 hours only for employees earning less than 1.5 times the state minimum wage. Employees earning 1.5× minimum wage or more are subject to the standard 40-hour weekly rule unless an exception applies.
    • Alaska (AS 23.10.060): Mandates daily overtime after 8 hours in a workday.
    • Colorado (7 CCR 1103-1): Mandates overtime after 12 hours in a workday or 40 hours in a workweek.
  • Educational Limitations: This guide provides mathematical models and general statutory overviews. It does not provide legal advice or guarantee universal compliance with all local wage orders. Consult an employment attorney for specific wage claims.

Editorial Process, Verification Standards & Educational Disclaimers

Algorithmic Math & Automated Regression Coverage

Calculations in this guide rely on base-60 integer-minute arithmetic matching our calculation engines. Automated regression test suites validate specific computational classes: elapsed-minute tallying, midnight rollover modulo arithmetic, meal break deductions, weekly 40-hour overtime thresholds, multi-tier multipliers, and published case study arithmetic (such as daily rounding variances, unrecorded meal deduction impact, regular rate bonus reallocations, and biweekly single-workweek calculations). These test suites verify numerical and algorithmic consistency; they do not establish statutory compliance, legal validity, or applicability to individual employment situations.

Selection of Authoritative Primary Sources

Statutory references are drawn directly from official U.S. government sources, including Title 29 of the Code of Federal Regulations (29 CFR § 785.11, § 785.18, § 785.19, and 29 CFR Part 541) and U.S. Department of Labor Wage and Hour Division publications. We provide direct hyperlinks to official .gov repositories.

Content Drafting, AI Assistance & Attribution

Educational content is compiled and structured with AI assistance and synthesized from public labor standards and mathematical algorithms, published under the organizational byline “TimeCard Web Editorial Team”. We do not claim individual human credentials, legal degrees, or licensed payroll certifications. Factual corrections or regulatory amendments are updated with documented revision dates.

Educational Limitations & Legal Disclaimers

This publication provides educational calculation examples and general statutory overviews. It does not provide formal legal, accounting, tax, or human resources advice, nor does it establish binding wage determinations. State and municipal laws (such as California Labor Code § 510 or state-mandated meal break penalties) often differ significantly from federal FLSA baselines. Consult qualified employment counsel or state labor authorities for specific wage disputes.

Interactive Calculator

Free Time Card Calculator

Enter your daily clock-in and clock-out times to automatically calculate total hours, overtime, and gross pay.

Open Free Time Card Calculator

Related Time & Pay Calculators

Related Educational Guides