How Numberwright HOS calculates your hours
An engineering overview of the pure mathematical calculation engine powering Numberwright HOS.
Live clocks vs log review
The engine distinguishes between what a driver sees in real time (live view) and how an enforcement officer evaluates a completed log (retroactive review). The live clock only evaluates rest periods that have already been completed by the current minute. If you are mid-shift planning to take a sleeper break later, your live 14-hour clock does not stop until that break is actually finished.
Conversely, when evaluating violations on past segments, the engine applies retroactive pairing just as FMCSA does. For instance, in FMCSA Example 14, driving between 00:30 and 02:00 on Day 2 appears to exceed the 14-hour window when viewed live, but is fully legal once the subsequent 7-hour sleeper period pairs retroactively with the earlier 3-hour break.
How pairs are found
The engine processes duty segments through a deterministic four-stage pipeline:
- Identify shift start (S0): The engine walks backward to locate the end of the last consecutive 10-hour rest block (OFF and/or SB).
- Collect candidate blocks: All merged rest blocks starting at or after S0 with durations between 2 hours (120 min) and 10 hours (600 min) are marked as qualifying split candidates.
- Match valid pairs: Candidate blocks are examined chronologically. When a candidate pairs with an earlier qualifying block—where one contains ≥ 7 hours sleeper berth, both are ≥ 2 hours, and both total ≥ 10 hours—a recalculation point is established at the end of the earlier block.
- Recalculate window and driving: Elapsed window time excludes the second rest period of the pair, and driving limits count from the end of the first period.
What we test against
The entire calculation engine runs as pure TypeScript functions verified by automated tests against FMCSA Example 14 and our own test logs; all pass. Every calculation vector is verified against the official FMCSA published log guidance.
What we don't cover
This calculator specifically models US interstate property-carrying rules. It deliberately omits passenger-carrying regulations, short-haul 150 air-mile radius exceptions, 16-hour short-haul exceptions, personal conveyance, yard moves, team-driver passenger-seat time, and Canadian or state intrastate exceptions.
Sources
- 49 CFR 395.3 — Maximum driving time for property-carrying vehicles (Cornell LII)
10/11/14 hours, 30-minute break, 60/70, 34-hour restart
- 49 CFR 395.1 — Scope of rules; (b) adverse conditions; (e) short-haul; (g) sleeper berths (Cornell LII)
Split-sleeper conditions, adverse +2 h, short-haul scope note
- 49 CFR 395.2 — Definitions (Cornell LII)
On-duty, driving time, 24-hour period, adverse conditions
- FMCSA — Summary of Hours of Service Regulations (updated 28 Mar 2022)
Official summary of hours of service regulations
- FMCSA — HOS Examples (PDF, 28 Apr 2022)
Example 14 test vector; Examples 6–8 (restart), 29 (70-hour)
- eCFR — 49 CFR Part 395 (official current text)
Official electronic Code of Federal Regulations text
Last reviewed: 2026-10-26
Built and maintained by Numberwright. The rules engine follows 49 CFR Part 395 and reproduces FMCSA's published Example 14. Found a mistake? Contact details coming soon.