{
  "schemaVersion": 1,
  "slug": "ltv-calculator",
  "category": "finance",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "34ef6d9f167f9dcf56c4a112b5296e423df4ad8b198cae4d620f7525b5da8d01",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/ltv-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": "LTV = L ÷ V × 100; CLTV = (L + A) ÷ V × 100; equity% = (V − L − A) ÷ V × 100; maxLoanNoPMI = 0.8 × V",
    "vars": [
      [
        "V",
        "property value"
      ],
      [
        "L",
        "loan amount"
      ],
      [
        "A",
        "additional loans"
      ],
      [
        "LTV",
        "loan-to-value (%)"
      ],
      [
        "CLTV",
        "combined LTV (%)"
      ],
      [
        "equity%",
        "owner equity (%)"
      ]
    ],
    "note": "The 80% PMI comparison is a US conventional-loan rule of thumb only; actual mortgage-insurance requirements vary by loan program, lender, property, and jurisdiction."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const v = propertyValue>0 ? propertyValue : 1;\nconst totalLoan = loanAmount + additionalLoans;\nreturn {\n  ltv: loanAmount/v*100,\n  cltv: totalLoan/v*100,\n  equity: propertyValue - totalLoan,\n  equityPercent: (propertyValue-totalLoan)/v*100,\n  maxLoanNoPmi: propertyValue*0.8,\n};",
    "inputs": [
      {
        "name": "propertyValue",
        "type": "number",
        "default": 400000,
        "min": 1,
        "max": 100000000,
        "step": 1000
      },
      {
        "name": "loanAmount",
        "type": "number",
        "default": 320000,
        "min": 0,
        "max": 100000000,
        "step": 1000
      },
      {
        "name": "additionalLoans",
        "type": "number",
        "default": 0,
        "min": 0,
        "max": 100000000,
        "step": 1000
      }
    ],
    "outputs": [
      {
        "name": "ltv",
        "precision": 1,
        "unit": "%"
      },
      {
        "name": "cltv",
        "precision": 1,
        "unit": "%"
      },
      {
        "name": "equity",
        "precision": 0,
        "unit": "$"
      },
      {
        "name": "equityPercent",
        "precision": 1,
        "unit": "%"
      },
      {
        "name": "maxLoanNoPmi",
        "precision": 0,
        "unit": "$"
      }
    ],
    "interpret": [
      {
        "max": 80,
        "key": "ltvNoPmi"
      },
      {
        "max": 95,
        "key": "ltvPmi"
      },
      {
        "max": null,
        "key": "ltvHigh"
      }
    ]
  }
}
