The math behind buying a house: from down payment to closing costs
Buying a home involves more numbers than most people expect. Here's every cost broken down — down payment, closing costs, mortgage math, and the rent-vs-buy decision.
The sticker price on a house is never the full cost. Between down payments, closing costs, inspection fees, property taxes, insurance, and interest, a $400,000 home can easily cost $600,000 or more by the time you’ve paid off the mortgage. Understanding the math before you start shopping gives you a massive advantage — and keeps you from falling in love with a house you can’t actually afford.
How much house can you afford?
The oldest guideline is the 28/36 rule:
- Spend no more than 28% of gross monthly income on housing costs (mortgage, taxes, insurance)
- Spend no more than 36% of gross monthly income on all debt (housing + car loans + student loans + credit cards)
If you earn $8,000 per month gross, your maximum housing budget is $2,240/month. That includes principal, interest, property taxes, and homeowners insurance (PITI).
But online calculators give a more personalized answer. The Mortgage Affordability Calculator factors in your income, existing debts, down payment, and local property tax rates to show your realistic price range.
The down payment
The traditional 20% down payment still matters because it eliminates Private Mortgage Insurance (PMI) — an extra 0.5% to 1.5% of the loan amount per year. On a $350,000 loan, PMI costs roughly $175 to $440 per month — money that doesn’t build equity or earn interest.
But 20% isn’t required. Many loan programs accept less:
- Conventional loans: as low as 3% down
- FHA loans: 3.5% down with a credit score of 580+
- VA loans: 0% down for eligible veterans
- USDA loans: 0% down in qualifying rural areas
Use the Down Payment Calculator to compare monthly payments and total costs at different down payment levels. Sometimes putting 5% down and investing the remaining 15% in the market is mathematically better — depending on your mortgage rate and expected investment returns.
Closing costs: the hidden expense
Closing costs typically run 2% to 5% of the home’s purchase price. On a $400,000 home, that’s $8,000 to $20,000 due at signing — on top of your down payment.
The major closing cost categories:
- Loan origination fee: 0.5% – 1% of the loan amount
- Appraisal: $300 – $600
- Title insurance: $1,000 – $2,500 (varies by state)
- Escrow deposit: 2–3 months of property taxes and insurance
- Inspection fees: $300 – $700
- Attorney fees: $500 – $2,000 (required in some states)
- Recording fees: $100 – $300
- Prepaid interest: depends on closing date
The Closing Costs Calculator breaks these down by state and loan type so you can budget accurately. In some markets, sellers may cover part of your closing costs — but in competitive markets, expect to pay all of them.
The mortgage payment formula
Your monthly payment (principal + interest only) follows the standard amortization formula:
M = P × r(1 + r)^n / ((1 + r)^n − 1)
On a $320,000 loan at 6.5% for 30 years:
- P = 320,000
- r = 0.065 / 12 ≈ 0.005417
- n = 360
Monthly principal and interest: ~$2,022. Add ~$350/month for property taxes and ~$150/month for insurance, and your total housing payment is roughly $2,522/month.
Use the Mortgage Calculator to model different scenarios — especially the difference between 15-year and 30-year terms, and the impact of making extra payments.
Rent vs. buy: the real comparison
Buying isn’t always better than renting, despite what conventional wisdom says. The math depends on:
- How long you’ll stay. If you move within 5 years, transaction costs (closing costs, realtor fees on sale) often exceed the equity you’ve built. Break-even is typically 5–7 years.
- Home appreciation rate. Historically, US homes appreciate about 3–4% per year — roughly inflation. Some markets do better; some do worse.
- Investment alternatives. If renting lets you invest your down payment in the stock market (historically ~7% real returns), renting can come out ahead financially.
- Maintenance and repairs. Budget 1–2% of the home’s value per year for maintenance. A $400,000 home costs $4,000–$8,000/year in upkeep — that’s entirely the owner’s responsibility.
The Rent vs. Buy Calculator runs a side-by-side comparison factoring in all these variables. In high-rent cities where rents are rising fast, buying often wins even over short time horizons. In low-cost areas where rents are stable, renting and investing the difference can be the better move.
The total cost of homeownership
A $400,000 home with $80,000 down on a 30-year mortgage at 6.5% doesn’t cost $400,000. It costs roughly:
- Mortgage payments: $640,000 (principal + interest over 30 years)
- Property taxes: $126,000 (at 1% per year, assuming modest increases)
- Insurance: $72,000 ($200/month)
- Maintenance: $120,000 ($4,000/year average)
- Closing costs (buy + sell): $40,000
Total: ~$998,000 — two and a half times the purchase price. Some of that comes back through equity and appreciation, but you need to plan for the cash flow. Homeownership is a long-term investment, and understanding the full math helps you buy with your eyes open.