{
  "schemaVersion": 1,
  "slug": "internet-speed-calculator",
  "category": "everyday",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "4e305e1abbcd522870a54cf908a8e4462eb69b5d7097506fc46323e54f796f67",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/internet-speed-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": "download minutes = file size (decimal GB) × 1,000 × 8 ÷ effective Mbps ÷ 60",
    "vars": [
      [
        "v",
        "Effective throughput (Mbps)"
      ],
      [
        "S",
        "Nominal connection speed (Mbps)"
      ],
      [
        "o",
        "Protocol overhead (%)"
      ],
      [
        "t",
        "Download time (seconds)"
      ],
      [
        "F",
        "File size (GB)"
      ]
    ],
    "note": "Per-device throughput assumes an even split; stream counts use rough planning thresholds. Latency is reported without a universal gaming verdict."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const effective = speed*(1-overhead/100); const mbps = effective/8; const seconds=mbps>0?fileSize*1000/mbps:0; return { mbps, downloadMinutes: seconds/60, perDevice: effective/devices, streams4k: Math.floor(effective/25), streamsHd: Math.floor(effective/5) };",
    "inputs": [
      {
        "name": "speed",
        "type": "number",
        "default": 200,
        "min": 0.1,
        "max": 100000,
        "step": 1
      },
      {
        "name": "fileSize",
        "type": "number",
        "default": 10,
        "min": 0.001,
        "max": 100000,
        "step": 0.1
      },
      {
        "name": "devices",
        "type": "number",
        "default": 4,
        "min": 1,
        "max": 200,
        "step": 1,
        "slider": true
      },
      {
        "name": "overhead",
        "type": "number",
        "default": 8,
        "min": 0,
        "max": 40,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "downloadMinutes",
        "precision": 1,
        "unit": "min"
      },
      {
        "name": "mbps",
        "precision": 2,
        "unit": "MB/s"
      },
      {
        "name": "perDevice",
        "precision": 1,
        "unit": "Mbps"
      },
      {
        "name": "streams4k",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "streamsHd",
        "precision": 1,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
