{
  "schemaVersion": 1,
  "slug": "dti-calculator",
  "category": "finance",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "72d7d4d2501414a04e66f4b8b63444c02666e98b645723ec12f827ecdb4b750f",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/dti-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": "DTI = (H + D) ÷ I × 100",
    "vars": [
      [
        "H",
        "Monthly housing payment"
      ],
      [
        "D",
        "Other monthly debt payments"
      ],
      [
        "I",
        "Gross monthly income"
      ],
      [
        "DTI",
        "Debt-to-income ratio (%)"
      ]
    ],
    "note": "Front-end ratio = H ÷ I × 100. The 28%, 36% and 43% values are comparison examples, not universal limits. Difference = 0.43 × I − (H + D); positive is below the example and negative is above. Income 0 is treated as 1."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "CFPB — Debt-to-income ratio definition",
        "url": "https://www.consumerfinance.gov/ask-cfpb/what-is-a-debt-to-income-ratio-en-1791/"
      }
    ],
    "referenceRole": "definition",
    "implementationHash": "72d7d4d2501414a04e66f4b8b63444c02666e98b645723ec12f827ecdb4b750f",
    "basis": "DTI = (H + D) ÷ I × 100",
    "limitations": "The references explain definitions and methods; any extra preset must be checked against the assumptions on this page."
  },
  "contract": {
    "compute": "const total = housingCost + otherDebts;\nconst inc = grossIncome>0 ? grossIncome : 1;\nreturn {\n  dti: total/inc*100,\n  frontEnd: housingCost/inc*100,\n  maxHousing: grossIncome*0.28,\n  maxTotalDebt: grossIncome*0.36,\n  headroom: grossIncome*0.43 - total,\n};",
    "inputs": [
      {
        "name": "grossIncome",
        "type": "number",
        "default": 6000,
        "min": 1,
        "max": 1000000,
        "step": 100
      },
      {
        "name": "housingCost",
        "type": "number",
        "default": 1500,
        "min": 0,
        "max": 1000000,
        "step": 50
      },
      {
        "name": "otherDebts",
        "type": "number",
        "default": 500,
        "min": 0,
        "max": 1000000,
        "step": 50
      }
    ],
    "outputs": [
      {
        "name": "dti",
        "precision": 1,
        "unit": "%"
      },
      {
        "name": "frontEnd",
        "precision": 1,
        "unit": "%"
      },
      {
        "name": "maxHousing",
        "precision": 0,
        "unit": "$"
      },
      {
        "name": "maxTotalDebt",
        "precision": 0,
        "unit": "$"
      },
      {
        "name": "headroom",
        "precision": 0,
        "unit": "$"
      }
    ],
    "interpret": [
      {
        "max": 20,
        "key": "dtiExcellent"
      },
      {
        "max": 36,
        "key": "dtiGood"
      },
      {
        "max": 43,
        "key": "dtiAcceptable"
      },
      {
        "max": 50,
        "key": "dtiStretched"
      },
      {
        "max": null,
        "key": "dtiHigh"
      }
    ]
  }
}
