Construction math looks simple until you have to get it right for a stranger. "How many 80 lb bags of concrete for this slab?" mixes feet, inches, cubic yards, a waste allowance, and a bag yield that is a property of the product rather than the geometry. Get one unit wrong and someone buys twice the concrete they need.
We run Free Construction Calculators , a set of 35 free calculators for concrete, gravel, mulch, roofing, paint, drywall, stairs and more. This post is about the structure that kept those 35 pages consistent: no framework, no build step in the browser, and one file of pure functions that every calculator shares.
The rule: all internal math in feet and cubic feet
Every input gets converted to feet (or inches for small depths) at the edge, and every function inside works in one unit system. Metric users still type metres and centimetres.β¦