Freight Totals
Calculation Methodology
How Freight Totals handles units, rounding, changing rules, and deterministic packing estimates.
Pure calculation first
Unit conversion, volume, density, girth, dimensional weight, chargeable weight, and revenue-ton math live in tested TypeScript functions that do not depend on page copy or browser state. Calculations retain full working precision and round only for display or a sourced billing rule.
Rule data stays separate
Date-sensitive class bands, carrier divisors, rounding instructions, size limits, and equipment references live in typed data records with a publisher, source URL, verification date, applicability, caveat, and maintenance risk.
Packing and placement
Pallet, container, trailer, and linear-foot planners use deterministic rectangular placement heuristics. The same inputs always produce the same result. A returned item never exceeds the configured inner dimensions or payload, but the planner does not claim a global mathematical optimum.
Conversions
Freight Totals uses exact defined constants where available: 1 inch = 2.54 cm, 1 pound = 0.45359237 kg, and 1 cubic foot = 0.028316846592 cubic meters.
Quality checks
Automated fixtures cover the official NMFTA density example, all 13 density boundaries, dimensional and chargeable weight examples, CBM, ocean W/M, pallet fit, girth permutations, conversions, packing invariants, source records, metadata, internal links, and production build output.