{
  "schemaVersion": 1,
  "slug": "lawn-area-calculator",
  "category": "gardening",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "7ab25344b304d7c2a0d41c1644c72a4a965c765496cb33ebb1ecc9cca4cf59f3",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/lawn-area-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": "A = {L×W rectangle; π×(L÷2)² circle; L×W÷2 triangle; L×W + L₂×W₂ for two non-overlapping L-shape sections}",
    "vars": [
      [
        "A",
        "Lawn area"
      ],
      [
        "s",
        "Shape code: rect, circ, tri, L"
      ],
      [
        "L",
        "Length"
      ],
      [
        "W",
        "Width"
      ],
      [
        "L₂",
        "Second section length"
      ],
      [
        "W₂",
        "Second section width"
      ]
    ],
    "note": "L-shape area is the sum of two non-overlapping rectangles. No mowing-time or watering estimate is returned."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "University of Minnesota Extension — Mowing practices",
        "url": "https://extension.umn.edu/lawn-care/mowing-practices-healthy-lawns"
      }
    ],
    "referenceRole": "input",
    "implementationHash": "7ab25344b304d7c2a0d41c1644c72a4a965c765496cb33ebb1ecc9cca4cf59f3",
    "basis": "A = {L×W rectangle; π×(L÷2)² circle; L×W÷2 triangle; L×W + L₂×W₂ for two non-overlapping L-shape sections}",
    "limitations": "Use the cited guidance and your own measurements, bills or product specifications to choose inputs. Sample defaults are not current local data."
  },
  "contract": {
    "compute": "let area; if (shape === 'circle') area = Math.PI*Math.pow(length/2, 2); else if (shape === 'triangle') area = length*width/2; else if (shape === 'lshape') area = length*width+length2*width2; else area = length*width; return { area, areaSqm: area*0.09290304, thousandSqft: area/1000 };",
    "inputs": [
      {
        "name": "shape",
        "type": "select",
        "default": "rectangle",
        "options": [
          {
            "value": "rectangle"
          },
          {
            "value": "circle"
          },
          {
            "value": "triangle"
          },
          {
            "value": "lshape"
          }
        ]
      },
      {
        "name": "length",
        "type": "number",
        "default": 50,
        "min": 0.1,
        "max": 5000,
        "step": 0.5
      },
      {
        "name": "width",
        "type": "number",
        "default": 30,
        "min": 0.1,
        "max": 5000,
        "step": 0.5
      },
      {
        "name": "length2",
        "type": "number",
        "default": 20,
        "min": 0,
        "max": 5000,
        "step": 0.5
      },
      {
        "name": "width2",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 5000,
        "step": 0.5
      }
    ],
    "outputs": [
      {
        "name": "area",
        "precision": 1,
        "unit": "sq ft"
      },
      {
        "name": "areaSqm",
        "precision": 2,
        "unit": "m²"
      },
      {
        "name": "thousandSqft",
        "precision": 3,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
