Sub topic 4
Down payment and closing costs
This chapter covers the one-time cash a buyer must pay before moving in, and why that cash belongs in a rent-versus-buy comparison. It assumes you can work with percentages and compound growth, you know what a mortgage and a lease are, and you have read the earlier chapters on renting and recurring ownership costs. Mortgage mechanics and the full opportunity-cost argument get their own chapters, so this one only introduces them where they affect upfront cash.
Why upfront cash matters
A monthly payment compares two flows of money. Upfront costs are a lump sum, and a lump sum behaves differently in two ways:
- It must exist before you can buy. If you lack it, the comparison is moot.
- It could have been doing something else. Cash in a house is not in an investment account.
Renters also pay upfront, but the amounts are small. A typical renter pays a security deposit (often one month's rent, refundable if the unit is left in good condition), the first month's rent, and sometimes a broker or application fee. Deposits come back, so they are a loan to the landlord rather than a cost. Fees do not come back.
A buyer's upfront cash is usually larger by a factor of ten or more, and part of it is never recovered.
The three pieces of buyer cash
Buyers generally need three pools of money:
- Down payment. The part of the price not covered by the loan. It is not a fee. It becomes equity, your ownership stake, though you only get it back by selling or refinancing.
- Closing costs. Fees paid to complete the purchase. These are spent, not stored. They create no equity.
- Reserves. Cash kept after closing for repairs, a job gap, or a broken water heater. Lenders sometimes require some. Even when they do not, a buyer without reserves is fragile.
The split matters for the model. Equity is recovered at sale, though the amount depends on price changes and loan paydown. Closing costs are lost for good. Both still carry an opportunity cost for every year they are tied up.
The down payment
The down payment is set as a percentage of the price. The common benchmark is 20%, but many lenders accept far less. Three effects follow from the size you choose.
It sets the loan size
A bigger down payment means a smaller loan, a smaller monthly payment, and less total interest. On a 400,000 home, 20% down leaves a loan of 320,000. At 10% down the loan is 360,000.
It can trigger mortgage insurance
Many lenders require private mortgage insurance (PMI), or an equivalent product, when the down payment is below about 20%. PMI protects the lender, not you. It is typically charged as a yearly percentage of the loan, paid monthly, and usually ends once your loan balance falls to a set share of the home's value. Rules and names differ by country and loan type, so check your lender's terms.
It sets your margin against price drops
If prices fall 10% and you put down 5%, you owe more than the home is worth. A larger down payment gives a cushion. This links to the equity and appreciation chapter.
The next script estimates how long PMI lasts on a 10% down purchase. It assumes a flat 0.5% annual PMI rate, ending when the balance reaches 80% of the original price.
def monthly_payment(principal, annual_rate, years):
r = annual_rate / 12
n = years * 12
if r == 0:
return principal / n
return principal * r / (1 - (1 + r) ** -n)
def pmi_duration(price, down_pct, annual_rate=0.06, years=30,
pmi_rate=0.005, target_ltv=0.80):
loan = price * (1 - down_pct)
pay = monthly_payment(loan, annual_rate, years)
monthly_pmi = loan * pmi_rate / 12
balance = loan
months = 0
while balance > price * target_ltv:
balance -= pay - balance * annual_rate / 12
months += 1
return months, months * monthly_pmi
months, total = pmi_duration(400_000, 0.10)
print(months, round(total))The code prints about 89 months (a little over seven years) and a total of roughly 13,000 in PMI premiums. That money buys the buyer no equity. The simple model also ignores price growth, which can shorten this period if the lender accepts a new valuation.
Closing costs
Closing costs are the fees to finalize the purchase and the loan. In many markets they run roughly 2% to 5% of the price, though local rules and transfer taxes can push the figure outside that range. The table lists common items. Names differ by country.
| Item | What it pays for | Recovered later? |
|---|---|---|
| Loan origination or lender fees | The lender's work to create the loan | No |
| Appraisal | An independent value estimate the lender requires | No |
| Home inspection | Your own check of the property's condition | No |
| Title search and title insurance | Confirming the seller can legally sell | No |
| Transfer, recording or stamp taxes | Government charges to register the sale | No |
| Legal or notary fees | Document preparation and signing | No |
| Prepaid items (insurance, property tax, interest to month end) | Costs paid in advance | No, but they replace costs you would owe anyway |
Prepaids are the one grey area. You would pay property tax and insurance after buying regardless, so they are timing, not extra cost. In a model, treat them as recurring costs that happen to be due early.
Can closing costs be rolled into the loan?
Sometimes. Some lenders offer a higher interest rate in exchange for covering fees ("lender credits"). Sellers may also agree to pay part of them. Neither removes the cost. A higher rate raises every future payment, and a seller concession is often priced into the offer. If you finance fees, the cost is spread out and charged interest, not erased.
Counting upfront cash as an investment
Suppose you spend 92,000 on a 400,000 home: 80,000 for a 20% down payment and 12,000 for closing costs at 3%. That cash could instead sit in an investment earning, say, 5% a year. Each year it is tied up, you forgo that growth. This is the opportunity cost of capital, covered more fully in the next chapter.
def upfront_cash(price, down_pct, closing_pct):
down = price * down_pct
closing = price * closing_pct
return down, closing, down + closing
def foregone_growth(cash, annual_return, years):
return cash * ((1 + annual_return) ** years - 1)
down, closing, total = upfront_cash(400_000, 0.20, 0.03)
print(down, closing, total)
for years in (3, 7, 15):
print(years, round(foregone_growth(total, 0.05, years), 2))Output:
80000.0 12000.0 92000.0
3 14501.5
7 37453.24
15 99261.12This growth is not a cash payment, so it never shows up on a statement. It is still a real cost of the buying choice. It is why the simulation in the spine starts the renter with the buyer's down payment as an investment portfolio.
Common errors
- Counting the down payment as a pure cost. Equity is recovered at sale. The cost is the growth you give up on it, not the principal itself.
- Counting closing costs as recoverable. They are not. They only pay off if you stay long enough for other advantages to cover them. That is why they raise the break-even point.
- Ignoring reserves. A buyer who spends everything on the down payment may have to borrow at high rates for the first repair.
- Using one rate everywhere. The opportunity cost depends on where the cash would actually go. A buyer who would otherwise pay off a 20% credit card has a very different opportunity cost from one who would hold a savings account.
- Forgetting the renter's version. If a renter lacks the discipline to invest the difference, the renter's model overstates their gains. Check your own behavior, not only the arithmetic.
Putting it into the model
For the comparison model later in the tutorial, three inputs come from this chapter:
down_pctsets the loan and the starting portfolio of the renter.closing_pctis a one-time loss for the owner. The simple simulation does not include it as written, so add it by subtractingprice * closing_pctfrom the owner's wealth, or by adding it to the renter's starting portfolio.invest_returnis the opportunity cost rate.
Leaving closing costs out flatters buying, most of all over short stays.
Exercise
A buyer purchases a 250,000 home with 10% down and 3% closing costs. (a) How much cash is needed at closing, excluding reserves? (b) If that cash could earn 4% a year, how much growth is foregone over 5 years, using annual compounding?
Show answer
(a) Down payment is 25,000 and closing costs are 7,500, so 32,500 in total. (b) 32,500 × (1.04^5 − 1) = 32,500 × 0.21665 ≈ 7,041 in foregone growth.
Exercise
A lender offers to roll 8,000 of closing costs into your loan. Explain why the cost has not disappeared, and name one effect on the later numbers.
Show answer
The 8,000 is still owed. It is added to the loan balance, so it accrues interest, and it raises the monthly payment and total interest paid. The buyer has traded a lump sum now for a larger cost later, which is also a larger loan to pay off at the time of sale.
Exercise
Why do closing costs raise the break-even time horizon, but a larger down payment does not necessarily do so?
Show answer
Closing costs are spent and never recovered, so the buyer must stay long enough for other gains to cover them. A down payment becomes equity that is returned at sale. Its cost is the foregone growth, which can be smaller than the benefit of a lower loan and no PMI.