{
  "schemaVersion": 1,
  "slug": "present-value-calculator",
  "category": "finance",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "6f6310c9a1690880bfa9dd773084361209fa3e7c0a169ae4964e624a29b7ac4e",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/present-value-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": "PV = FV ÷ (1 + r ÷ 100)^n; D = FV − PV",
    "vars": [
      [
        "PV",
        "Present value"
      ],
      [
        "FV",
        "Future value"
      ],
      [
        "r",
        "Discount rate (% per year)"
      ],
      [
        "n",
        "Years"
      ],
      [
        "D",
        "Discount amount"
      ]
    ],
    "note": "Annual compounding; the rate is entered as a percentage."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-04",
    "sources": [
      {
        "name": "OpenStax — Compound interest and present value",
        "url": "https://openstax.org/books/contemporary-mathematics/pages/6-4-compound-interest"
      }
    ],
    "basis": "PV = future value / (1 + annual percent / 100)^years.",
    "limitations": "Annual compounding with a constant discount rate; excludes cash flows during the term.",
    "implementationHash": "6f6310c9a1690880bfa9dd773084361209fa3e7c0a169ae4964e624a29b7ac4e"
  },
  "contract": {
    "compute": "const pv = futureValue/Math.pow(1+rate/100, years); return { presentValue:pv, discount: futureValue-pv };",
    "inputs": [
      {
        "name": "futureValue",
        "type": "number",
        "default": 20000,
        "min": 0,
        "max": 1000000000,
        "step": 100
      },
      {
        "name": "rate",
        "type": "number",
        "default": 7,
        "min": -50,
        "max": 100,
        "step": 0.01
      },
      {
        "name": "years",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 100,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "presentValue",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "discount",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
