{
  "schemaVersion": 1,
  "slug": "flight-carbon-footprint-calculator",
  "category": "travel",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "b67e8eda7d962100d67928341e4c5606af900ce790f6ab3d4d2f5440b965fcf3",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/flight-carbon-footprint-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 = D × (1 + t) × 0.09 × c × p; trees = ceil(E × (1 + 0.9r) ÷ 21)",
    "vars": [
      [
        "D",
        "One-way distance (km)"
      ],
      [
        "t",
        "Return flag (1/0)"
      ],
      [
        "r",
        "Scenario adjustment flag (1/0)"
      ],
      [
        "c",
        "Fixed cabin multiplier"
      ],
      [
        "p",
        "Passengers"
      ],
      [
        "E",
        "Simplified CO₂ estimate (kg)"
      ],
      [
        "trees",
        "Illustrative tree-years (21 kg CO₂/year assumed)"
      ]
    ],
    "note": "The 90 g/km baseline, cabin multipliers, ×1.9 scenario, car comparison, and 21 kg/tree-year are simplified assumptions. The tree-year figure is not an offset recommendation or verified sequestration estimate. Route, aircraft, load, and airline data are not modeled."
  },
  "externalEvidence": {
    "reviewedAt": "2026-09-25",
    "sources": [
      {
        "name": "ICAO — Carbon Emissions Calculator methodology",
        "url": "https://icec.icao.int/Methodology%20ICAO%20Carbon%20Emissions%20Calculator_v13_Final.pdf"
      },
      {
        "name": "ICAO — Carbon Emissions Calculator FAQ",
        "url": "https://www.icao.int/environmental-protection/environmental-tools/icec/faq"
      }
    ]
  },
  "contract": {
    "compute": "const C = { economy:1, premium:1.6, business:2.9, first:4 }; const totalDistance = distance*(tripType === 'return' ? 2 : 1); const co2Kg = totalDistance*0.09*(C[cabinClass] || 1)*passengers; const adjustedKg = radiative === 'yes' ? co2Kg*1.9 : co2Kg; const treeKg = 21; return { totalDistance, co2Kg, co2Tonnes: co2Kg/1000, adjustedKg, comparison: 'About '+Math.round(adjustedKg/0.171)+' km driven in an average petrol car', treesToOffset: Math.ceil(adjustedKg/treeKg) };",
    "inputs": [
      {
        "name": "distance",
        "type": "number",
        "default": 5500,
        "min": 1,
        "max": 30000,
        "step": 10,
        "slider": true
      },
      {
        "name": "cabinClass",
        "type": "select",
        "default": "economy",
        "options": [
          {
            "value": "economy"
          },
          {
            "value": "premium"
          },
          {
            "value": "business"
          },
          {
            "value": "first"
          }
        ]
      },
      {
        "name": "passengers",
        "type": "number",
        "default": 1,
        "min": 1,
        "max": 20,
        "step": 1,
        "slider": true
      },
      {
        "name": "tripType",
        "type": "select",
        "default": "oneWay",
        "options": [
          {
            "value": "oneWay"
          },
          {
            "value": "return"
          }
        ]
      },
      {
        "name": "radiative",
        "type": "select",
        "default": "yes",
        "options": [
          {
            "value": "yes"
          },
          {
            "value": "no"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "co2Kg",
        "precision": 1,
        "unit": "kg"
      },
      {
        "name": "adjustedKg",
        "precision": 1,
        "unit": "kg"
      },
      {
        "name": "totalDistance",
        "precision": 0,
        "unit": "km"
      },
      {
        "name": "co2Tonnes",
        "precision": 3,
        "unit": "tonnes"
      },
      {
        "name": "comparison",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "treesToOffset",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
