curatedapi

Mortgage affordability calculator

The largest loan and home price an income supports, from housing and debt-to-income ratios you set (28% and 36% by default).

Income per month before tax.
Other debt payments per month: car loans, student loans, credit card minimums.
The mortgage's annual interest rate.
The mortgage term in years.
Cash paid towards the price.
Property tax, home insurance, mortgage insurance and association fees per month.
The most of gross income that may go to housing costs (the front-end ratio).
The most of gross income that may go to housing costs and other debts together (the back-end or debt-to-income ratio).
More options: rounding and decimals
Precision and rounding
Rounding mode applied once to each result. Default half_even.
Round results to this many digits after the decimal point.

Examples

Result: 6,000 a month, 500 of other debts, 6.5% over 30 years

Max monthly housing payment
The largest monthly housing cost that meets both ratios.
1,660.00 exact
Max principal and interest
What is left for the loan payment after taxes, insurance and fees.
1,210.00 exact
Max loan amount
The loan that payment repays.
191,435.09 rounded
Max home price
The loan plus the down payment.
231,435.09 rounded
Limited by
Which ratio set the limit: housing_ratio or debt_ratio.
debt_ratio

Rounding: Half even, 2 decimal places. Calculator finance/mortgage-affordability@1.

How it is calculated

housing = min(income × housing ratio, income × debt ratio − debts); P&I = housing − taxes, insurance and fees; loan = P&I × ((1+r)^n − 1) ÷ (r × (1+r)^n), r = annual rate ÷ 12

Lenders compare monthly payments with gross monthly income. This calculator takes two limits: the share of income that may go to housing costs, and the share that may go to all debt payments together. It finds the largest housing payment that meets both, takes off property tax, insurance and fees, and turns what is left into the loan that a level monthly payment repays at the given rate and term. The ratios are inputs because lenders and loan programmes use different ones.

  • 28% and 36% are a common rule of thumb, not a law. Set the ratios your lender or loan programme uses.
  • This is arithmetic on the figures given, not a credit decision or advice.
  • Amounts are plain numbers in any single currency; no currency conversion is done.

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Use it from your code

POST /v1/calc/finance/mortgage-affordabilityVersion 1
curl https://api.curatedapi.com/v1/calc/finance/mortgage-affordability \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "gross_monthly_income": "6000",
    "monthly_debt_payments": "500",
    "annual_rate_percent": "6.5",
    "term_years": 30,
    "down_payment": "40000",
    "monthly_taxes_insurance_and_fees": "450"
  }'
The same call in Python
import os

import requests

payload = {
    "gross_monthly_income": "6000",
    "monthly_debt_payments": "500",
    "annual_rate_percent": "6.5",
    "term_years": 30,
    "down_payment": "40000",
    "monthly_taxes_insurance_and_fees": "450",
}
response = requests.post(
    "https://api.curatedapi.com/v1/calc/finance/mortgage-affordability",
    headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
    json=payload,
    timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
    "gross_monthly_income": "6000",
    "monthly_debt_payments": "500",
    "annual_rate_percent": "6.5",
    "term_years": 30,
    "down_payment": "40000",
    "monthly_taxes_insurance_and_fees": "450",
};
const response = await fetch("https://api.curatedapi.com/v1/calc/finance/mortgage-affordability", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});
console.log((await response.json()).result);

MCP tool calc_finance_mortgage_affordability at https://mcp.curatedapi.com. Inputs, outputs and errors in the API reference.

Put it on your website

<div data-curatedapi-widget="finance/mortgage-affordability" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>

Use a public key registered for your site. Calculations are billed like API calls. How widgets work.

Related calculators

Add this calculator to your website

Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.

Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.