{
  "schemaVersion": 1,
  "slug": "net-worth-calculator",
  "category": "finance",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "f46b5865fd0005a87d91f99b1e0d8b896df0ff78e3a715a14f9a070f1ffc84e8",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/net-worth-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": "W = (C + I + P + A) − (M + D)",
    "vars": [
      [
        "W",
        "net worth"
      ],
      [
        "C",
        "cash"
      ],
      [
        "I",
        "investments"
      ],
      [
        "P",
        "property"
      ],
      [
        "A",
        "other assets"
      ],
      [
        "M",
        "total liabilities"
      ]
    ],
    "note": "M = mortgage + other debt; a negative W means liabilities exceed assets."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const totalAssets = cash+investments+property+otherAssets; const totalLiabilities = mortgage+otherDebt; return { totalAssets, totalLiabilities, netWorth: totalAssets-totalLiabilities };",
    "inputs": [
      {
        "name": "cash",
        "type": "number",
        "default": 20000,
        "min": 0,
        "max": 1000000000,
        "step": 500
      },
      {
        "name": "investments",
        "type": "number",
        "default": 60000,
        "min": 0,
        "max": 1000000000,
        "step": 500
      },
      {
        "name": "property",
        "type": "number",
        "default": 300000,
        "min": 0,
        "max": 10000000000,
        "step": 1000
      },
      {
        "name": "otherAssets",
        "type": "number",
        "default": 10000,
        "min": 0,
        "max": 1000000000,
        "step": 500
      },
      {
        "name": "mortgage",
        "type": "number",
        "default": 200000,
        "min": 0,
        "max": 10000000000,
        "step": 1000
      },
      {
        "name": "otherDebt",
        "type": "number",
        "default": 15000,
        "min": 0,
        "max": 1000000000,
        "step": 500
      }
    ],
    "outputs": [
      {
        "name": "totalAssets",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "totalLiabilities",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "netWorth",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
