{
  "schemaVersion": 1,
  "slug": "inflation-calculator",
  "category": "finance",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "8c7520e18bfef01e45898c173ebfff7ed645ef28ff3be41ac4e02f35cd8c0aa3",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/inflation-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": "F = A × (1 + i ÷ 100)^y ; P = A ÷ (1 + i ÷ 100)^y ; L = (1 − P ÷ A) × 100",
    "vars": [
      [
        "A",
        "current amount"
      ],
      [
        "i",
        "annual inflation rate (%)"
      ],
      [
        "y",
        "years"
      ],
      [
        "F",
        "future cost"
      ],
      [
        "P",
        "future purchasing power"
      ]
    ],
    "note": "L is the percentage of purchasing power lost; a constant annual inflation rate is assumed."
  },
  "externalEvidence": {
    "reviewedAt": "2026-09-28",
    "sources": [
      {
        "name": "U.S. Bureau of Labor Statistics — CPI Inflation Calculator",
        "url": "https://www.bls.gov/data/inflation_calculator_inside.htm"
      }
    ]
  },
  "contract": {
    "compute": "const factor = Math.pow(1+inflationRate/100, years); const pp = factor>0 ? amount/factor : 0; return { futureCost: amount*factor, purchasingPower:pp, lossPercent: amount > 0 ? (1-pp/amount)*100 : 0 };",
    "inputs": [
      {
        "name": "amount",
        "type": "number",
        "default": 1000,
        "min": 0,
        "max": 1000000000,
        "step": 100
      },
      {
        "name": "inflationRate",
        "type": "number",
        "default": 3,
        "min": 0,
        "max": 100,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "years",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 100,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "futureCost",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "purchasingPower",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "lossPercent",
        "precision": 2,
        "unit": "%"
      }
    ],
    "interpret": null
  }
}
