{"id":"mortgage-affordability","summary":"Indicative self-employed borrowing capacity from net profit (US, ES, UK rule sets), plus what an extra deduction costs in borrowing power.","method":"POST","inputSchema":{"type":"object","properties":{"country":{"type":"string","enum":["us","es","uk"],"description":"Rule set to apply (default us)"},"netProfit":{"type":"number","description":"Annual profit after deductions"},"yearsTrading":{"type":"number","description":"Full years of accounts available"},"otherDebtMonthly":{"type":"number","description":"Existing debt payments per month"},"deposit":{"type":"number","description":"Deposit or down payment saved"},"ratePct":{"type":"number","description":"Annual interest rate, percent"},"termYears":{"type":"number","description":"Mortgage term in years"},"extraDeduction":{"type":"number","description":"Deduction being weighed against borrowing power"},"marginalTaxPct":{"type":"number","description":"Marginal tax rate the deduction saves at, percent"}},"required":["netProfit"]},"exampleInput":{"country":"us","netProfit":90000,"yearsTrading":3,"otherDebtMonthly":500,"deposit":60000,"ratePct":6.5,"termYears":30,"extraDeduction":10000,"marginalTaxPct":30},"exampleOutput":{"qualifyingAnnualIncome":90000,"qualifyingMonthlyIncome":7500,"maxMonthlyPayment":2875,"maxLoan":454856.1061690851,"maxProperty":514856.1061690851,"depositIsTheLimit":false,"meetsHistory":true,"rule":{"model":"payment-ratio","maxDebtSharePct":45,"incomeMultiple":0,"maxLtvPct":95,"yearsOfAccounts":2,"source":"https://selling-guide.fanniemae.com/sel/b3-6-02/debt-income-ratios"},"deduction":{"amount":10000,"taxSaved":3000,"borrowingLost":59329.05732640234,"borrowingPerTaxUnit":19.776352442134115},"rulesChecked":"2026-08-23","note":"Indicative only. No lender scorecard, stress test or credit history is modelled."}}