{
  "schemaVersion": 1,
  "slug": "tv-size-calculator",
  "category": "household",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "9a872717a1b9584cd58017877a33ebe7c4a5b605d6c897602406576ad2c4e0a0",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/tv-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 = 24D×tan(α÷2); H = W÷r; d = √(W²+H²); C = 2.5d÷12",
    "vars": [
      [
        "D",
        "Viewing distance (ft)"
      ],
      [
        "α",
        "Viewing angle (°)"
      ],
      [
        "r",
        "Aspect ratio (width/height)"
      ],
      [
        "W",
        "Screen width (in)"
      ],
      [
        "H",
        "Screen height (in)"
      ],
      [
        "d",
        "Screen diagonal (in)"
      ]
    ],
    "note": "W=24D·tan(α/2); H=W/r; d=√(W²+H²); reference distance C=2.5d/12 ft. THX preset 36°; SMPTE ST 2080-3 horizontal reference 30°; other presets are user-selected examples. C is a heuristic, not a comfort standard."
  },
  "externalEvidence": {
    "reviewedAt": "2026-09-26",
    "sources": [
      {
        "name": "THX — Certified Screen Placement",
        "url": "https://www.thx.com/questions/thx-certified-screen-placement/"
      }
    ]
  },
  "contract": {
    "compute": "const A = { smpte:30, thx:36, wide:35, basic:20 }; const AR = { '16:9':16/9, '21:9':21/9, '4:3':4/3 }; const a = (A[angle] || 40)*Math.PI/180; const ar = AR[aspect] || 16/9; const dIn = distance*12; const width = 2*dIn*Math.tan(a/2); const height = width/ar; const diagonal = Math.sqrt(width*width+height*height); return { diagonal, width, height, comfortable: diagonal*2.5/12 };",
    "inputs": [
      {
        "name": "distance",
        "type": "number",
        "default": 9,
        "min": 1,
        "max": 100,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "angle",
        "type": "select",
        "default": "thx",
        "options": [
          {
            "value": "smpte"
          },
          {
            "value": "thx"
          },
          {
            "value": "wide"
          },
          {
            "value": "basic"
          }
        ]
      },
      {
        "name": "aspect",
        "type": "select",
        "default": "16:9",
        "options": [
          {
            "value": "16:9"
          },
          {
            "value": "21:9"
          },
          {
            "value": "4:3"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "diagonal",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "width",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "height",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "comfortable",
        "precision": 1,
        "unit": "ft"
      }
    ],
    "interpret": null
  }
}
