{
  "schemaVersion": 1,
  "slug": "carbon-footprint-calculator",
  "category": "everyday",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "83c9e791dcd83a4aac55325dddf3d18cedaa1ea8504e7642f4c5885f80ab6086",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/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 = C + F + H + d·h,  C = 8.887·m ÷ (1000·mpg),  F = 0.25 f_s + 1.6 f_l,  H = (g·kWh + 5.3 t) ÷ 1000",
    "vars": [
      [
        "E",
        "Annual footprint (t CO₂e)"
      ],
      [
        "C",
        "Car emissions"
      ],
      [
        "F",
        "Flight emissions"
      ],
      [
        "H",
        "Home-energy emissions"
      ],
      [
        "d",
        "Diet emissions per person (0.9–2.5 t)"
      ],
      [
        "h",
        "Household size"
      ],
      [
        "m",
        "Miles driven per year"
      ],
      [
        "mpg",
        "Fuel economy (miles per gallon)"
      ],
      [
        "f_s",
        "Short-haul flights per year"
      ],
      [
        "f_l",
        "Long-haul flights per year"
      ],
      [
        "g",
        "Home electricity use (kWh/year)"
      ],
      [
        "t",
        "Natural gas use (therms/year)"
      ]
    ],
    "note": "This rough model adds entered car fuel use, fixed flight factors, electricity × user-supplied grid intensity, natural gas at 5.3 kg CO₂ per therm, and preset diet factors. It includes listed categories only and is not a complete footprint or inventory. The gasoline factor 8.887 kg CO₂/gallon follows the U.S. EPA tailpipe factor; EPA estimates are approximate."
  },
  "externalEvidence": {
    "reviewedAt": "2026-09-25",
    "sources": [
      {
        "name": "U.S. EPA — Greenhouse Gas Emissions from a Typical Passenger Vehicle",
        "url": "https://www.epa.gov/greenvehicles/greenhouse-gas-emissions-typical-passenger-vehicle"
      },
      {
        "name": "U.S. EPA — Greenhouse Gas Equivalencies Calculator: Calculations and References",
        "url": "https://www.epa.gov/energy/greenhouse-gas-equivalencies-calculator-calculations-and-references"
      },
      {
        "name": "U.S. EPA — Greenhouse Gas Equivalencies Calculator",
        "url": "https://www.epa.gov/energy/greenhouse-gas-equivalencies-calculator"
      }
    ]
  },
  "contract": {
    "compute": "const carEmissions = carMpg > 0 ? carMiles/carMpg*8.887/1000 : 0; const flightEmissions = flightsShort*0.25+flightsLong*1.6; const homeEmissions = (electricityKwh*gridIntensity+gasTherms*5.3)/1000; const D = { meatHeavy: 2.5, average: 2.0, lowMeat: 1.6, vegetarian: 1.2, vegan: 0.9 }; const dietEmissions = (D[diet] || 2)*householdSize; const total = carEmissions+flightEmissions+homeEmissions+dietEmissions; const perPerson = total/householdSize; return { carEmissions, flightEmissions, homeEmissions, dietEmissions, total, perPerson, comparison: 'Rough estimate for listed categories only; not a full emissions inventory' };",
    "inputs": [
      {
        "name": "carMiles",
        "type": "number",
        "default": 10000,
        "min": 0,
        "max": 200000,
        "step": 500,
        "slider": true
      },
      {
        "name": "carMpg",
        "type": "number",
        "default": 30,
        "min": 5,
        "max": 200,
        "step": 1,
        "slider": true
      },
      {
        "name": "flightsShort",
        "type": "number",
        "default": 4,
        "min": 0,
        "max": 200,
        "step": 1,
        "slider": true
      },
      {
        "name": "flightsLong",
        "type": "number",
        "default": 1,
        "min": 0,
        "max": 100,
        "step": 1,
        "slider": true
      },
      {
        "name": "electricityKwh",
        "type": "number",
        "default": 8000,
        "min": 0,
        "max": 200000,
        "step": 100,
        "slider": true
      },
      {
        "name": "gasTherms",
        "type": "number",
        "default": 600,
        "min": 0,
        "max": 20000,
        "step": 10,
        "slider": true
      },
      {
        "name": "householdSize",
        "type": "number",
        "default": 3,
        "min": 1,
        "max": 20,
        "step": 1,
        "slider": true
      },
      {
        "name": "diet",
        "type": "select",
        "default": "average",
        "options": [
          {
            "value": "meatHeavy"
          },
          {
            "value": "average"
          },
          {
            "value": "lowMeat"
          },
          {
            "value": "vegetarian"
          },
          {
            "value": "vegan"
          }
        ]
      },
      {
        "name": "gridIntensity",
        "type": "number",
        "default": 0.4,
        "min": 0,
        "max": 1.5,
        "step": 0.01,
        "slider": true,
        "advanced": true
      }
    ],
    "outputs": [
      {
        "name": "carEmissions",
        "precision": 2,
        "unit": "tonnes/year"
      },
      {
        "name": "flightEmissions",
        "precision": 2,
        "unit": "tonnes/year"
      },
      {
        "name": "homeEmissions",
        "precision": 2,
        "unit": "tonnes/year"
      },
      {
        "name": "dietEmissions",
        "precision": 2,
        "unit": "tonnes/year"
      },
      {
        "name": "total",
        "precision": 2,
        "unit": "tonnes/year"
      },
      {
        "name": "perPerson",
        "precision": 2,
        "unit": "tonnes/year"
      },
      {
        "name": "comparison",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
