{
  "id": "home-affordability",
  "version": "b30c7c2c54ae",
  "status": "published",
  "name": "Home Affordability Calculator",
  "question": "What is my mortgage affordability?",
  "summary": "Computes the highest home price whose monthly payment, with property tax, insurance, HOA dues, and PMI, fits the lender’s housing and total debt-to-income limits.",
  "category": "finance",
  "subcategory": "loans",
  "url": "https://www.acalculator.org/finance/home-affordability-calculator",
  "markdown": "https://www.acalculator.org/finance/home-affordability-calculator.md",
  "kind": "function",
  "method": "budget = min(front × income ÷ 12, back × income ÷ 12 − debts); price = (budget − insurance − HOA + D × a) ÷ (a + tax ÷ 12), with a = r ÷ (1 − (1 + r)^−n), adding PMI when the loan is over 80% of the price.",
  "assumptions": [
    "Lenders compare the housing payment and all debt payments with gross monthly income; the limits are yours to set.",
    "The rate is fixed; property tax is a percent of the price; insurance and HOA dues are fixed amounts.",
    "PMI is charged as a yearly percent of the loan when the loan is over 80% of the price.",
    "Closing costs and cash reserves are not included. Defaults are examples, not current rates."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "income": {
        "title": "Gross income",
        "description": "Your household income before tax and deductions.",
        "type": "number",
        "x-unit": "USD",
        "x-period": "year",
        "exclusiveMinimum": 0,
        "maximum": 100000000
      },
      "debts": {
        "title": "Other debt payments a month",
        "description": "Monthly payments on other debts: car loans, student loans, minimum credit card payments, child support.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 10000000
      },
      "down": {
        "title": "Down payment",
        "description": "The cash you will put toward the price.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 100000000
      },
      "rate": {
        "title": "Interest rate",
        "description": "The fixed yearly mortgage rate. The monthly rate is this ÷ 12.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 30
      },
      "years": {
        "title": "Loan term (years)",
        "description": "The length of the mortgage, for example 30 or 15 years.",
        "type": "integer",
        "minimum": 1,
        "maximum": 40
      },
      "tax": {
        "title": "Property tax (per year)",
        "description": "The yearly property tax as a percent of the home price.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 10
      },
      "insurance": {
        "title": "Home insurance",
        "description": "The homeowners insurance premium.",
        "type": "number",
        "x-unit": "USD",
        "x-period": "year",
        "minimum": 0,
        "maximum": 1000000
      },
      "hoa": {
        "title": "HOA dues",
        "description": "Homeowners association or condo dues.",
        "type": "number",
        "x-unit": "USD",
        "x-period": "month",
        "minimum": 0,
        "maximum": 100000
      },
      "pmi": {
        "title": "PMI rate (per year)",
        "description": "Private mortgage insurance per year, as a percent of the loan, charged under 20% down.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 5
      },
      "front": {
        "title": "Housing limit (front-end ratio)",
        "description": "The most the housing payment may be, as a percent of gross monthly income.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 1,
        "maximum": 100
      },
      "back": {
        "title": "Total debt limit (back-end ratio)",
        "description": "The most all debt payments, housing included, may be, as a percent of gross monthly income.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 1,
        "maximum": 100
      }
    }
  },
  "outputs": {
    "price": {
      "label": "Home price you can afford",
      "description": "The highest price whose monthly payment fits both debt-to-income limits.",
      "format": "money"
    },
    "loan": {
      "label": "Loan amount",
      "description": "The price minus the down payment.",
      "format": "money"
    },
    "payment": {
      "label": "Monthly housing payment",
      "description": "Principal and interest, property tax, insurance, HOA dues, and PMI at that price.",
      "format": "money"
    },
    "pi": {
      "label": "Principal and interest",
      "description": "The level monthly payment on the loan.",
      "format": "money"
    },
    "taxes": {
      "label": "Property tax",
      "description": "The property tax for one month.",
      "format": "money"
    },
    "insurance": {
      "label": "Home insurance",
      "description": "The home insurance for one month.",
      "format": "money"
    },
    "hoa": {
      "label": "HOA dues",
      "description": "The HOA dues for one month.",
      "format": "money"
    },
    "pmiAmount": {
      "label": "PMI",
      "description": "Private mortgage insurance for one month, when the down payment is under 20%.",
      "format": "money"
    },
    "downPct": {
      "label": "Down payment",
      "description": "The down payment as a percent of the price.",
      "format": "percent"
    },
    "frontRatio": {
      "label": "Housing ratio (front-end)",
      "description": "The housing payment as a percent of gross monthly income.",
      "format": "percent"
    },
    "backRatio": {
      "label": "Total debt ratio (back-end)",
      "description": "The housing payment plus other debts, as a percent of gross monthly income.",
      "format": "percent"
    },
    "limit": {
      "label": "Limit",
      "description": "Which debt-to-income limit sets the budget.",
      "format": "text"
    },
    "note": {
      "label": "Note",
      "description": "A note when the down payment is under 3% of the price, below what most conventional loans allow.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "income": 100000,
      "debts": 500,
      "down": 60000,
      "rate": 6.5,
      "years": 30,
      "tax": 1.1,
      "insurance": 1500,
      "hoa": 0,
      "pmi": 0.5,
      "front": 30,
      "back": 36
    },
    "outputs": {
      "price": 363108.9479145657,
      "loan": 303108.9479145657,
      "payment": 2500,
      "pi": 1915.8547361139124,
      "taxes": 332.84986892168524,
      "insurance": 125,
      "hoa": 0,
      "pmiAmount": 126.29539496440238,
      "downPct": 16.5239662488618,
      "frontRatio": 30,
      "backRatio": 36,
      "limit": "The housing limit (front-end ratio) sets the budget."
    },
    "text": "With $100,000.00 of yearly income and $500.00 of other monthly debts, you can afford a home of about $363,108.95, a $2,500.00 monthly payment."
  },
  "examples": [
    {
      "given": {
        "income": 100000,
        "debts": 500,
        "down": 60000,
        "rate": 6.5,
        "years": 30,
        "tax": 1.1,
        "insurance": 1500,
        "hoa": 0,
        "pmi": 0.5,
        "front": 30,
        "back": 36
      },
      "expect": {
        "price": 363108.9479145651,
        "loan": 303108.9479145651,
        "payment": 2500,
        "pmiAmount": 126.29539496440213,
        "frontRatio": 30,
        "backRatio": 36
      },
      "source": "Freddie Mac: a housing ratio under 30%; Fannie Mae Selling Guide B3-6-02: a 36% total ratio; hand calculation in content.mdx, checked in Python 3 (docs/progress/WP-48/python/affordability.py)"
    },
    {
      "given": {
        "income": 150000,
        "debts": 1000,
        "down": 100000,
        "rate": 6,
        "years": 30,
        "tax": 1,
        "insurance": 1800,
        "hoa": 100,
        "pmi": 1.5,
        "front": 30,
        "back": 36
      },
      "expect": {
        "price": 500000,
        "loan": 400000,
        "pmiAmount": 0,
        "payment": 3064.8687672776964
      },
      "source": "hand calculation in content.mdx: without PMI the budget reaches $563,720, but above $500,000 (80% loan-to-value) PMI applies and the budget reaches only $491,971, so the price stops at $500,000; Python 3 in docs/progress/WP-48/python/affordability.py"
    },
    {
      "given": {
        "income": 60000,
        "debts": 0,
        "down": 0,
        "rate": 0,
        "years": 30,
        "tax": 0,
        "insurance": 1200,
        "hoa": 0,
        "pmi": 0,
        "front": 30,
        "back": 36
      },
      "expect": {
        "price": 504000,
        "loan": 504000,
        "payment": 1500,
        "note": "Most conventional loans need at least 3% down (at most 97% loan-to-value)."
      },
      "source": "hand calculation in content.mdx: at 0% with no tax, (1,500 − 100) × 360 = 504,000"
    }
  ],
  "sources": [
    "Fannie Mae Selling Guide B3-6-02, Debt-to-Income Ratios (36% manual, up to 45% with credit score and reserves, 50% for Desktop Underwriter). https://selling-guide.fanniemae.com/sel/b3-6-02/debt-income-ratios",
    "U.S. Department of Housing and Urban Development, Mortgagee Letter 2014-02 (FHA manual underwriting: 31% housing and 43% total without compensating factors). https://www.hud.gov/sites/documents/14-02ml.pdf",
    "38 CFR 36.4340, Underwriting standards (VA: debt-to-income ratio of 41% and residual income). https://www.ecfr.gov/current/title-38/chapter-I/part-36/subpart-B/section-36.4340",
    "Freddie Mac, How much home can I afford? (housing expense ratio ideally less than 30%). https://myhome.freddiemac.com/blog/homebuying/how-much-can-you-afford",
    "Freddie Mac, What are closing costs and how much will I pay? (2% to 5% of the purchase price). https://myhome.freddiemac.com/blog/homebuying/what-are-closing-costs-and-how-much-will-i-pay",
    "Consumer Financial Protection Bureau, What is a debt-to-income ratio? https://www.consumerfinance.gov/ask-cfpb/what-is-a-debt-to-income-ratio-en-1791/"
  ],
  "related": [
    "mortgage-preapproval",
    "mortgage",
    "debt-to-income-ratio",
    "down-payment"
  ],
  "changelog": []
}
