{
  "schemaVersion": 1,
  "slug": "concrete-steps-calculator",
  "category": "construction",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "2ba3c595d33f4c97c406506ea9d83321953d79e4c93f3f9063aabb6872959508",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/concrete-steps-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "s = ⌈R ÷ h⌉; V = w × d ÷ 12 × t × Σ i (i = 1…s)",
    "vars": [
      [
        "R",
        "total rise in inches"
      ],
      [
        "h",
        "riser height in inches"
      ],
      [
        "s",
        "number of steps"
      ],
      [
        "d",
        "tread depth in inches"
      ],
      [
        "w",
        "width in ft"
      ],
      [
        "t",
        "slab thickness in inches"
      ],
      [
        "V",
        "concrete volume in ft³"
      ]
    ],
    "note": "The tool rounds the step count up, computes actualRiser = totalRise ÷ steps, and estimates total run as (steps − 1) × tread depth. Its illustrative dimension check uses actual riser ≤ 7.75 in and tread depth ≥ 10 in; local rules may differ."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const steps = Math.max(1, Math.ceil(totalRise/riserHeight)); const actualRiser = totalRise/steps; const t = thicknessIn/12; const yd = []; for (let i = 1; i <= steps; i++) { yd.push(width*(treadDepth/12)*t*i); } const total = yd.reduce((a, b) => a+b, 0); const ok = actualRiser <= 7.75 && treadDepth >= 10; return { steps, actualRiser, totalRun: Math.max(0,steps-1)*treadDepth, cubicYards: total/27, codeCheck: ok ? \"Meets the calculator reference\" : \"Outside the calculator reference\" };",
    "inputs": [
      {
        "name": "totalRise",
        "type": "number",
        "default": 36,
        "min": 6,
        "max": 240,
        "step": 1,
        "slider": true
      },
      {
        "name": "riserHeight",
        "type": "number",
        "default": 7,
        "min": 4,
        "max": 8,
        "step": 0.25,
        "slider": true
      },
      {
        "name": "treadDepth",
        "type": "number",
        "default": 12,
        "min": 8,
        "max": 24,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "width",
        "type": "number",
        "default": 4,
        "min": 1,
        "max": 30,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "thicknessIn",
        "type": "number",
        "default": 6,
        "min": 3,
        "max": 18,
        "step": 0.5,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "steps",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "actualRiser",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "totalRun",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "cubicYards",
        "precision": 3,
        "unit": "cu yd"
      },
      {
        "name": "codeCheck",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
