{
  "schemaVersion": 1,
  "slug": "paper-size-calculator",
  "category": "conversion",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "c80f821d4f8c22035b6e402080234d1d461a2af593a4eb7ce672a8a59303f138",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/paper-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": "(w, h) = lookup(size); A = w × h ÷ 100; w_in = w ÷ 25.4; h_in = h ÷ 25.4",
    "vars": [
      [
        "size",
        "Paper format (A0-A10, B0-B5, C4, Letter...)"
      ],
      [
        "w",
        "Width (mm)"
      ],
      [
        "h",
        "Height (mm)"
      ],
      [
        "A",
        "Area (cm2)"
      ]
    ],
    "note": "A/B are nominal trimmed paper sizes; C sizes are nominal envelope sizes. Dimensions are in millimetres; real manufacturing tolerances may vary."
  },
  "externalEvidence": {
    "reviewedAt": "2026-09-25",
    "sources": [
      {
        "name": "ISO 216:2007 — A and B paper series",
        "url": "https://www.iso.org/standard/36631.html"
      },
      {
        "name": "ISO 269:1985 — C envelope series (withdrawn)",
        "url": "https://www.iso.org/standard/4178.html"
      },
      {
        "name": "HP — Supported paper sizes (US sizes)",
        "url": "https://support.hp.com/us-en/document/c04454374"
      }
    ]
  },
  "contract": {
    "compute": "size=String(size).toLowerCase();if(![\"a0\",\"a1\",\"a2\",\"a3\",\"a4\",\"a5\",\"a6\",\"a7\",\"a8\",\"a9\",\"a10\",\"b0\",\"b1\",\"b2\",\"b3\",\"b4\",\"b5\",\"b6\",\"b7\",\"b8\",\"b9\",\"b10\",\"c0\",\"c1\",\"c2\",\"c3\",\"c4\",\"c5\",\"c6\",\"c7\",\"c8\",\"c9\",\"c10\",\"letter\",\"legal\",\"tabloid\",\"executive\"].includes(size))return {\"result\":null,\"width\":null,\"height\":null,\"areaCm2\":null,\"widthInches\":null,\"heightInches\":null,\"__error\":\"inputError\"};const out=(function(size){const S={\"a0\":[841,1189],\"a1\":[594,841],\"a2\":[420,594],\"a3\":[297,420],\"a4\":[210,297],\"a5\":[148,210],\"a6\":[105,148],\"a7\":[74,105],\"a8\":[52,74],\"a9\":[37,52],\"a10\":[26,37],\"b0\":[1000,1414],\"b1\":[707,1000],\"b2\":[500,707],\"b3\":[353,500],\"b4\":[250,353],\"b5\":[176,250],\"b6\":[125,176],\"b7\":[88,125],\"b8\":[62,88],\"b9\":[44,62],\"b10\":[31,44],\"c0\":[917,1297],\"c1\":[648,917],\"c2\":[458,648],\"c3\":[324,458],\"c4\":[229,324],\"c5\":[162,229],\"c6\":[114,162],\"c7\":[81,114],\"c8\":[57,81],\"c9\":[40,57],\"c10\":[28,40],\"letter\":[216,279],\"legal\":[216,356],\"tabloid\":[279,432],\"executive\":[184,267]},s=S[size]||S.a4;return{width:s[0],height:s[1],areaCm2:s[0]*s[1]/100,widthInches:s[0]/25.4,heightInches:s[1]/25.4}})(size);if(out.__error)return {...{\"result\":null,\"width\":null,\"height\":null,\"areaCm2\":null,\"widthInches\":null,\"heightInches\":null},...out};out.result=(['letter','legal','tabloid','executive'].includes(size)?'≈ ':'')+out.width+' × '+out.height+' mm';return out;",
    "inputs": [
      {
        "name": "size",
        "type": "select",
        "default": "a4",
        "options": [
          {
            "value": "a0"
          },
          {
            "value": "a1"
          },
          {
            "value": "a2"
          },
          {
            "value": "a3"
          },
          {
            "value": "a4"
          },
          {
            "value": "a5"
          },
          {
            "value": "a6"
          },
          {
            "value": "a7"
          },
          {
            "value": "a8"
          },
          {
            "value": "a9"
          },
          {
            "value": "a10"
          },
          {
            "value": "b0"
          },
          {
            "value": "b1"
          },
          {
            "value": "b2"
          },
          {
            "value": "b3"
          },
          {
            "value": "b4"
          },
          {
            "value": "b5"
          },
          {
            "value": "b6"
          },
          {
            "value": "b7"
          },
          {
            "value": "b8"
          },
          {
            "value": "b9"
          },
          {
            "value": "b10"
          },
          {
            "value": "c0"
          },
          {
            "value": "c1"
          },
          {
            "value": "c2"
          },
          {
            "value": "c3"
          },
          {
            "value": "c4"
          },
          {
            "value": "c5"
          },
          {
            "value": "c6"
          },
          {
            "value": "c7"
          },
          {
            "value": "c8"
          },
          {
            "value": "c9"
          },
          {
            "value": "c10"
          },
          {
            "value": "letter"
          },
          {
            "value": "legal"
          },
          {
            "value": "tabloid"
          },
          {
            "value": "executive"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "result",
        "precision": 4,
        "trimTrailingZeros": true,
        "type": "text"
      },
      {
        "name": "width",
        "precision": 0,
        "unit": "mm",
        "showWhen": {
          "size": []
        },
        "notation": "auto"
      },
      {
        "name": "height",
        "precision": 0,
        "unit": "mm",
        "showWhen": {
          "size": []
        },
        "notation": "auto"
      },
      {
        "name": "areaCm2",
        "precision": 2,
        "unit": "cm²",
        "notation": "auto"
      },
      {
        "name": "widthInches",
        "precision": 2,
        "unit": "in",
        "notation": "auto"
      },
      {
        "name": "heightInches",
        "precision": 2,
        "unit": "in",
        "notation": "auto"
      }
    ],
    "interpret": null
  }
}
