{
  "schemaVersion": 1,
  "slug": "ceiling-fan-size-calculator",
  "category": "household",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "c3ab65ab981ddff5e51ad143be2d53850b224084b5b5975b7e488c17e29dd42f",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/ceiling-fan-size-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": "span: 36 (A≤75), 42 (≤144), 52 (≤225), 60 (≤400), 72 (>400) in;  fans = ⌈A ÷ 400⌉",
    "vars": [
      [
        "A",
        "Floor area (sq ft)"
      ],
      [
        "span",
        "Blade span (in)"
      ],
      [
        "fans",
        "Number of fans"
      ]
    ],
    "note": "Blades should hang 8–9 ft above the floor; add 12 in of downrod per foot above a 9 ft ceiling."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const area = length*width; let span; if (area <= 75) span = 36; else if (area <= 144) span = 42; else if (area <= 225) span = 52; else if (area <= 400) span = 60; else span = 72; const drop = 12+(ceilingHeight > 9 ? (ceilingHeight-9)*12 : 0); return { area, bladeSpan: span, mountHeight: drop, fanCount: area > 400 ? Math.ceil(area/400) : 1, mountNote: ceilingHeight > 9 ? 'Use a downrod — blades should sit 8-9 ft above the floor' : 'Flush mount is fine at this ceiling height' };",
    "inputs": [
      {
        "name": "length",
        "type": "number",
        "default": 14,
        "min": 0,
        "max": 200,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "width",
        "type": "number",
        "default": 12,
        "min": 0,
        "max": 200,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "ceilingHeight",
        "type": "number",
        "default": 9,
        "min": 6,
        "max": 30,
        "step": 0.5,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "bladeSpan",
        "precision": 0,
        "unit": "in"
      },
      {
        "name": "fanCount",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "area",
        "precision": 1,
        "unit": "sq ft"
      },
      {
        "name": "mountHeight",
        "precision": 2,
        "unit": "in"
      },
      {
        "name": "mountNote",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
