Methodology: Time Card Calculator with Lunch
What the calculator computes
The calculator takes a 7-day grid of clock-in / clock-out times (Monday–Sunday) plus a per-day break in minutes, and produces a weekly hours total with an optional regular-vs-overtime split. When an hourly rate is supplied, it also produces gross pay; with the rate blank or zero, only hours render. Inputs accept 1- or 2-digit hours and minutes (9, 9:00, 9:3 all parse as 9:00, 9:00, and 9:03 respectively) with an AM/PM toggle per side.
Math
Per-day calculation:
inMinutes = parse "HH:MM" + AM/PM → minutes since midnight (0–1439)
outMinutes = parse "HH:MM" + AM/PM → minutes since midnight
if outMinutes < inMinutes:
spannedMidnight = true
grossMinutes = outMinutes + 24 * 60 - inMinutes
else:
grossMinutes = outMinutes - inMinutes
roundedGross = round(grossMinutes, rounding_interval) # half-away-from-zero
workedMinutes = max(0, roundedGross - breakMinutes)
Weekly aggregation sums the per-day worked-minutes, then applies a single overtime rule:
weekly40— hours above 40 in the week move to the 1.5× bucket.daily8/daily10/daily12— hours above the threshold IN EACH DAY move to the 1.5× bucket.none— no overtime split.
Pay calculation, when a rate is set:
regularPay = regularHours * rate
overtimePay = overtimeHours * rate * 1.5
totalPay = regularPay + overtimePay
Why rounding happens before break deduction
29 CFR §785.48(b) — the federal rounding rule — describes rounding "the time an employee starts or stops working." That's a punch-level operation. The calculator applies rounding to the raw clock-in-to-clock-out span (the punch event), then deducts the break afterward. Applying rounding after the break would compound rounding error and conflict with the regulation's text.
If you turn rounding off (the default), this difference doesn't matter.
Midnight crossover
When the clock-out time is earlier than the clock-in time, the calculator assumes the shift wrapped past midnight and adds 24 hours to the difference. A 10 PM → 6 AM entry registers as an 8-hour shift, and the row shows a "+1d" marker so you can see the assumption.
Equal in and out times — for example a 9 AM clock-in followed by a 9 AM clock-out — register as a 0-hour shift, not 24 hours. The reasoning: equal-time entries are almost always a forgotten punch, and silently inflating the timesheet by 24 hours is the worse failure mode. The user fixes the row instead.
Overtime model — one rule, not stacked rules
The calculator applies exactly one overtime rule per calculation:
weekly40(FLSA baseline). Federal floor. Hours over 40 in a workweek at 1.5×.daily8,daily10,daily12. Per-day thresholds. Hours over the threshold each day at 1.5×.none. All hours at the regular rate.
State-specific stacked rules — California's daily + weekly + double-time + 7th-day premium, Kentucky's 7th-day rule — are deliberately out of scope here. Modeling them requires the state-by-state logic in the State Overtime Calculator (the companion Overtime Rules by State article covers the underlying law). Cross-link rather than duplicate. The day-of-week stacking and California's "greater of daily or weekly, never both for the same hour" rule live there.
What's not modeled
- California's trend toward rejecting rounding. Camp v. Home Depot (2022 Court of Appeal — currently under California Supreme Court review, case S277518; the Court of Appeal opinion has only "persuasive value" per CA Rule 8.1115(e)(1) until the Supreme Court decides) and Woodworth v. Loma Linda (2023 Court of Appeal) reject rounding when actual time can be captured. Donohue v. AMN Services (2021, California Supreme Court — final) already banned rounding for meal periods. The calculator surfaces a caution callout under any non-exact rounding setting; it does not block the user from selecting rounding. The article on time clock rounding rules covers the case law in depth.
- California double-time after 12 hours. Stacked with the daily rule, so it belongs in the state overtime calculator.
- 7th-consecutive-day premiums (California, Kentucky). Same reason.
- Blended regular rate (FLSA §7(g)). Multi-rate workers (shift differentials, non-discretionary bonuses, piece-rate, commissions) have a different blended rate for OT. Out of scope for v1.
- Salaried-exempt classification. Calculator assumes non-exempt and entitled to overtime under whatever mode is selected.
- Meal break premium pay. California Labor Code §226.7 obligates an extra hour of pay when a meal break is missed/late/short — that's a different math problem; use the California Meal Break Premium Pay calculator.
Rounding behavior in detail
The rounding interval (5/10/15/30 min) is applied to the gross shift in minutes using JavaScript's Math.round — standard half-away-from-zero behavior. A few worked examples for a 9:00 AM → 5:07 PM shift (487 raw minutes):
| Mode | Rounded minutes | Hours |
|---|---|---|
| Exact | 487 | 8.12 |
| 5 min | 485 | 8.08 |
| 10 min | 490 | 8.17 |
| 15 min | 480 | 8.00 |
| 30 min | 480 | 8.00 |
Note the FLSA's §785.48(b) requirement of neutrality over time: rounding policies that systematically reduce paid hours violate the regulation. The calculator's rounding is symmetric — a 9:00 → 5:08 shift (488 min) rounds UP to 495 min at 15-min granularity, while 9:00 → 5:07 (487 min) rounds DOWN to 480 min. Over many shifts, neutral rounding nets to zero. Systematically biased rounding does not, and federal law catches the difference.
Time parsing details
The calculator accepts a handful of 12-hour input shapes:
9→ 9:00 (default minutes 0)9:00,09:00→ 9:009:30→ 9:309:3→ 9:03 (1-digit minutes accepted to support mid-typing)12:00AM → midnight;12:00PM → noon
Rejected formats:
13:00— 24-hour input not accepted; use the AM/PM toggle.9:60— minute out of range (0–59).abc,9.30,9:— not a valid clock format.
The AM/PM toggle is mandatory because the calculator does not infer AM/PM from context (no "if hours > 7 assume PM" guesses — that's the kind of helpful that produces wrong payroll).
When this gets re-reviewed
- FLSA §785.48 changes — any rulemaking that revises the rounding regulation, including DOL opinion letters that meaningfully shift interpretation.
- State court rulings on rounding — California already reads the rule effectively closed; a similar opinion in any other state (Texas, New York, Florida have meaningful nonexempt populations) would trigger a callout update.
- Major federal-level rate change — currently the multiplier is hard-coded to 1.5× per FLSA §7(a). If a federal proposal to alter the multiplier becomes law, the multiplier becomes a user-selectable input.
Data sources
- 29 CFR §785.48 — Use of time clocks — the federal rounding regulation
- 29 CFR §785.7 — Judicial construction — hours-worked definition
- DOL Fact Sheet #22 — Hours Worked — work-time vs non-work-time
- DOL Fact Sheet #23 — Overtime — FLSA §7(a) baseline
- Camp v. Home Depot USA, Inc., 84 Cal. App. 5th 638 (2022) — California Court of Appeal opinion rejecting rounding when actual time is captured. Under California Supreme Court review (S277518); Court of Appeal opinion has "persuasive value only" until the Supreme Court decides.
- Woodworth v. Loma Linda Univ. Med. Ctr., 93 Cal. App. 5th 1038 (2023) — California Court of Appeal extending Camp's reasoning on independent grounds
- Donohue v. AMN Services, LLC, 11 Cal. 5th 58 (2021) — California Supreme Court (final) rejecting rounding for meal periods
Companion article: Time clock rounding rules — recent California case law on rounding (Camp v. Home Depot, Donohue v. AMN, Woodworth v. Loma Linda).
For state-stacked overtime rules (California daily + weekly + double-time + 7th-day premium; Kentucky 7th-day), use the State Overtime Calculator. For California meal-break premium pay (§226.7), use the California Meal Break Premium Pay calculator. Both handle math the time card calculator deliberately doesn't.
How accurate is this?
Accurate for a single non-exempt hourly worker on a normal weekly schedule under the chosen overtime rule. Two things it deliberately doesn't try to be:
- A state-by-state authority on overtime. That's the state overtime calculator's job — it stacks California daily + weekly + double-time + 7th-day, Kentucky 7th-day, Alaska/Nevada daily, Colorado 12-hour. Use that tool when the state's rules stack.
- A wage-claim damages engine. Liquidated damages (FLSA §16(b) doubling), California waiting-time penalties (§203), wage-statement penalties (§226), and PAGA cascades can multiply underlying overtime owed by 3–10× in litigation. The calculator computes the underlying hours; legal exposure is for employment counsel.
For the typical "did I get my hours right this week" check, this tool is accurate. For specific compliance posture, your timekeeping system needs to capture the actual minutes — and the easiest way to do that is software that records the punches in real time instead of reconstructing them after the fact.
Frequently asked questions
Why is rounding applied to the gross shift before the break is deducted?
Because rounding is a punch-level operation under 29 CFR §785.48(b) — the regulation talks about rounding "the time an employee starts or stops working," not the resulting hours-paid total. Applying it to the raw in-to-out span (before lunch is taken out) matches the regulation. Applying it after the break is deducted would compound rounding error — the break itself is not a punch event being rounded, and double-applying the interval to a derived number is mathematically different.
Why only one overtime mode at a time?
A unified state-by-state model exists in the State Overtime Calculator — that tool stacks California daily + weekly + double-time + 7th-day premium correctly. Recreating that complexity inside the time card calculator would either duplicate it (a maintenance liability) or oversimplify (silently miss the stack). Linking the user to the right tool when their state has stacked rules is the cleanest split.
Why does the calculator treat equal clock-in/out times as a zero shift?
Because that case is almost always a forgotten punch, not a 24-hour shift. Treating it as 24h would produce a $400+ payroll line item from one user error — almost certainly worse than treating it as zero and forcing the user to fix the row. The midnight-crossover path (out earlier than in) is different — that's an explicit signal the shift wraps the day boundary.
Why default to "Exact" rounding instead of a default like 15-minute rounding?
Two reasons. First, the modern compliance posture — both California court rulings since 2021 and the underlying FLSA neutrality requirement — push toward not rounding at all when actual time is available. Defaulting to rounding nudges users into a policy they may not want. Second, calculators that round by default surprise users when their math does not match their actual hours. Exact totals match what people expect; the user can opt into rounding deliberately.
Why allow rates above $100/hour at all?
The same reason TurboTax does not cap salary inputs at $200k: the calculator should not enforce a value judgment about who is allowed to use it. Specialty consultants, contractors with overhead, and bonus weeks all push the effective hourly rate above what a typical W-2 employee earns. Capping the field would force those users into a different tool with no upside.
About Clockspot
Clockspot is online time clock software for small businesses — the simplest way to track employee time, with GPS location tracking, PTO accruals, job costing, and overtime calculation. Used in all 50 states since 2007.
Calculating timesheets one week at a time is fine for a free utility; managing them across a team week after week is what Clockspot was built for — automatic clock in/out, lunch tracking, overtime detection, and per-employee timesheets ready for payroll. See how Clockspot tracks timesheets.