{
  "schemaVersion": 1,
  "slug": "area-calculator",
  "category": "conversion",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "41e1758a939029527864d2d4204e9bbaf57d7a76ac788502a4be78a52eda4fc5",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/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₂ = A₁ × k₁ ÷ k₂",
    "vars": [
      [
        "A₁",
        "Input value"
      ],
      [
        "A₂",
        "Converted result"
      ],
      [
        "k₁",
        "Factor of source unit, in m²"
      ],
      [
        "k₂",
        "Factor of target unit"
      ]
    ],
    "note": "Factors express each unit in square metres; e.g. 1 ft² = 0.09290304 m²."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-04",
    "sources": [
      {
        "name": "NIST SP 811 — Conversion factors by quantity",
        "url": "https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors/nist-guide-si-appendix-b9"
      }
    ],
    "basis": "Convert area via square metres; square units use squared length factors.",
    "limitations": "Only the displayed unit definitions are converted; rounding and measurement uncertainty are separate.",
    "implementationHash": "41e1758a939029527864d2d4204e9bbaf57d7a76ac788502a4be78a52eda4fc5",
    "domain": "conversion"
  },
  "contract": {
    "compute": "const units={\"mm2\":\"mm²\",\"cm2\":\"cm²\",\"m2\":\"m²\",\"km2\":\"km²\",\"in2\":\"in²\",\"ft2\":\"ft²\",\"yd2\":\"yd²\",\"ac\":\"ac\",\"ha\":\"ha\",\"mi2\":\"mi²\"}, factors={\"mm2\":0.000001,\"cm2\":0.0001,\"m2\":1,\"km2\":1000000,\"in2\":0.00064516,\"ft2\":0.09290304,\"yd2\":0.83612736,\"ac\":4046.8564224,\"ha\":10000,\"mi2\":2589988.110336}; if(!Number.isFinite(value)||value<0||value>1000000000000||!Object.prototype.hasOwnProperty.call(units,from)||!Object.prototype.hasOwnProperty.call(units,to))return {\"result\":null,\"sqMetres\":null,\"sqFeet\":null,\"acres\":null,\"__error\":\"inputError\"}; const out=(function(){if (value < 0) return { result: null, sqMetres: null, sqFeet: null, acres: null, __error: 'inputError' };\nconst F={mm2:1e-6,cm2:1e-4,m2:1,km2:1e6,in2:0.00064516,ft2:0.09290304,yd2:0.83612736,ac:4046.8564224,ha:10000,mi2:2589988.110336}; const m2=value*F[from]; return { result: m2/F[to], sqMetres: m2, sqFeet: m2/0.09290304, acres: m2/4046.8564224 };})(); if(out.__error)return {...{\"result\":null,\"sqMetres\":null,\"sqFeet\":null,\"acres\":null},...out}; out.__resultUnit=units[to]; out.__unitRatio=factors[to]/factors[from]; return out;",
    "inputs": [
      {
        "name": "value",
        "type": "number",
        "default": 1,
        "min": 0,
        "max": 1000000000000,
        "step": 0.01,
        "requiredValue": true,
        "strictRange": true
      },
      {
        "name": "from",
        "type": "select",
        "default": "m2",
        "options": [
          {
            "value": "m2"
          },
          {
            "value": "mm2"
          },
          {
            "value": "cm2"
          },
          {
            "value": "km2"
          },
          {
            "value": "in2"
          },
          {
            "value": "ft2"
          },
          {
            "value": "yd2"
          },
          {
            "value": "ac"
          },
          {
            "value": "ha"
          },
          {
            "value": "mi2"
          }
        ]
      },
      {
        "name": "to",
        "type": "select",
        "default": "ft2",
        "options": [
          {
            "value": "ft2"
          },
          {
            "value": "mm2"
          },
          {
            "value": "cm2"
          },
          {
            "value": "m2"
          },
          {
            "value": "km2"
          },
          {
            "value": "in2"
          },
          {
            "value": "yd2"
          },
          {
            "value": "ac"
          },
          {
            "value": "ha"
          },
          {
            "value": "mi2"
          }
        ]
      },
      {
        "name": "precision",
        "type": "select",
        "default": 4,
        "options": [
          {
            "value": 0
          },
          {
            "value": 2
          },
          {
            "value": 4
          },
          {
            "value": 6
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "result",
        "precision": 4,
        "unit": "",
        "precisionField": "precision",
        "unitField": "__resultUnit",
        "trimTrailingZeros": true,
        "notation": "auto"
      },
      {
        "name": "sqMetres",
        "precision": 6,
        "unit": "m²",
        "showWhen": {
          "to": [
            "mm2",
            "cm2",
            "km2",
            "in2",
            "ft2",
            "yd2",
            "ac",
            "ha",
            "mi2"
          ]
        },
        "notation": "auto"
      },
      {
        "name": "sqFeet",
        "precision": 6,
        "unit": "ft²",
        "showWhen": {
          "to": [
            "mm2",
            "cm2",
            "m2",
            "km2",
            "in2",
            "yd2",
            "ac",
            "ha",
            "mi2"
          ]
        },
        "notation": "auto"
      },
      {
        "name": "acres",
        "precision": 6,
        "unit": "ac",
        "showWhen": {
          "to": [
            "mm2",
            "cm2",
            "m2",
            "km2",
            "in2",
            "ft2",
            "yd2",
            "ha",
            "mi2"
          ]
        },
        "notation": "auto"
      }
    ],
    "interpret": null
  }
}
