{
  "schemaVersion": 1,
  "slug": "basketball-stats-calculator",
  "category": "sports",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "933faa2c4ccf75434deb476720d5043ca6c8d7edbe7e95e0e5adbeefb6a4a16b",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/basketball-stats-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": "E = p + X + S − T; TS% = p ÷ (2(F + 0.44Q)) × 100; PPM = p ÷ m",
    "vars": [
      [
        "p",
        "Points"
      ],
      [
        "F",
        "Field-goal attempts"
      ],
      [
        "Q",
        "Free-throw attempts"
      ],
      [
        "T",
        "Turnovers"
      ],
      [
        "X",
        "Rebounds + assists + blocks"
      ],
      [
        "S",
        "Steals"
      ],
      [
        "TS%",
        "True shooting percentage"
      ],
      [
        "E",
        "Efficiency (PTS+REB+AST+STL+BLK-TO)"
      ],
      [
        "m",
        "Minutes played"
      ],
      [
        "PPM",
        "Points per minute"
      ]
    ],
    "note": "True shooting percentage = Points / [2 × (FGA + 0.44 × FTA)]. Box-score efficiency is the simple sum shown on this page; it is not NBA PER and is not pace-adjusted."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "NBA Stats — True shooting percentage glossary",
        "url": "https://www.nba.com/stats/help/glossary"
      }
    ],
    "referenceRole": "definition",
    "implementationHash": "933faa2c4ccf75434deb476720d5043ca6c8d7edbe7e95e0e5adbeefb6a4a16b",
    "basis": "E = p + X + S − T; TS% = p ÷ (2(F + 0.44Q)) × 100; PPM = p ÷ m",
    "limitations": "The references explain definitions and methods; any extra preset must be checked against the assumptions on this page."
  },
  "contract": {
    "compute": "const tsa = fgAttempts + 0.44*ftAttempts; const trueShooting = tsa > 0 ? points/(2*tsa)*100 : null; const efficiency = points + rebounds + assists + steals + blocks - turnovers; return { trueShooting, efficiency, perMinute: minutes > 0 ? points/minutes : null };",
    "inputs": [
      {
        "name": "points",
        "type": "number",
        "default": 24,
        "min": 0,
        "max": 200,
        "step": 1,
        "slider": true
      },
      {
        "name": "rebounds",
        "type": "number",
        "default": 8,
        "min": 0,
        "max": 100,
        "step": 1,
        "slider": true
      },
      {
        "name": "assists",
        "type": "number",
        "default": 6,
        "min": 0,
        "max": 60,
        "step": 1,
        "slider": true
      },
      {
        "name": "steals",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 30,
        "step": 1,
        "slider": true
      },
      {
        "name": "blocks",
        "type": "number",
        "default": 1,
        "min": 0,
        "max": 30,
        "step": 1,
        "slider": true
      },
      {
        "name": "turnovers",
        "type": "number",
        "default": 3,
        "min": 0,
        "max": 40,
        "step": 1,
        "slider": true
      },
      {
        "name": "fgAttempts",
        "type": "number",
        "default": 18,
        "min": 0,
        "max": 100,
        "step": 1,
        "slider": true
      },
      {
        "name": "ftAttempts",
        "type": "number",
        "default": 6,
        "min": 0,
        "max": 60,
        "step": 1,
        "slider": true
      },
      {
        "name": "minutes",
        "type": "number",
        "default": 32,
        "min": 0,
        "max": 60,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "trueShooting",
        "precision": 1,
        "unit": "%",
        "optional": true
      },
      {
        "name": "efficiency",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "perMinute",
        "precision": 3,
        "unit": "",
        "optional": true
      }
    ],
    "interpret": null
  }
}
