{
  "schemaVersion": 1,
  "slug": "drywall-calculator",
  "category": "construction",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "3d784b57005f54338e66910f331622b2e395f0f1aa44065b7e9bfbb55bf716e5",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/drywall-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": "N = ⌈1.1 × A ÷ a_s⌉, A = 2(L + W)H + cLW − O",
    "vars": [
      [
        "L",
        "Room length (ft)"
      ],
      [
        "W",
        "Room width (ft)"
      ],
      [
        "H",
        "Wall height (ft)"
      ],
      [
        "O",
        "Openings area (ft²)"
      ],
      [
        "c",
        "Ceiling flag: 0 no, 1 yes"
      ],
      [
        "a_s",
        "Sheet area (32, 40 or 48 ft²)"
      ]
    ],
    "note": "N rounded up after 10% waste; compound 0.5 gal/sheet, tape 0.4 ft/ft², screws 1.1/ft². A clamped at 0."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const CEIL = { 'no':0, 'yes':1 }; const SZ = { '4x8':32, '4x10':40, '4x12':48 }; const wallArea = (length+width)*2*height; const totalArea = Math.max(0, wallArea+CEIL[includeCeiling]*length*width-openings); const per = SZ[sheetSize] || 32; const sheets = Math.ceil(totalArea/per*1.1); return { wallArea, totalArea, sheets, compound: Math.ceil(sheets*0.5), tape: Math.round(totalArea*0.4), screws: Math.round(totalArea*1.1) };",
    "inputs": [
      {
        "name": "length",
        "type": "number",
        "default": 14,
        "min": 0,
        "max": 500,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "width",
        "type": "number",
        "default": 12,
        "min": 0,
        "max": 500,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "height",
        "type": "number",
        "default": 8,
        "min": 4,
        "max": 30,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "includeCeiling",
        "type": "select",
        "default": "no",
        "options": [
          {
            "value": "no"
          },
          {
            "value": "yes"
          }
        ]
      },
      {
        "name": "openings",
        "type": "number",
        "default": 40,
        "min": 0,
        "max": 1000,
        "step": 1,
        "slider": true
      },
      {
        "name": "sheetSize",
        "type": "select",
        "default": "4x8",
        "options": [
          {
            "value": "4x8"
          },
          {
            "value": "4x10"
          },
          {
            "value": "4x12"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "wallArea",
        "precision": 1,
        "unit": "sq ft"
      },
      {
        "name": "totalArea",
        "precision": 1,
        "unit": "sq ft"
      },
      {
        "name": "sheets",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "compound",
        "precision": 1,
        "unit": "gal"
      },
      {
        "name": "tape",
        "precision": 0,
        "unit": "ft"
      },
      {
        "name": "screws",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
