Sub topic 11
A Simple Rent-versus-Buy Model
Assume you know basic percentages, monthly budgeting, and the general purpose of a mortgage and a lease. This chapter combines those ideas into a simple model. The model estimates net wealth under two choices:
- Buy: home value after selling costs, minus the remaining mortgage.
- Rent: an investment portfolio containing the money not used for a down payment, adjusted for monthly cost differences.
The model is not a forecast. It is a way to make assumptions visible and compare them.
Define the comparison
A monthly mortgage payment is only one part of ownership cost. In this model, the buyer pays:
- Mortgage principal and interest.
- Property tax, insurance, and maintenance, represented by one annual carrying-cost rate.
- The original down payment.
- Selling costs when the home is sold.
The renter pays rent and invests the buyer's down payment. Each month, the renter also invests the difference if owning costs more than renting. If renting costs more, the portfolio is reduced by that difference.
| Input | Meaning |
|---|---|
| Home price | Purchase price at the start |
| Down payment | Percentage paid in cash |
| Mortgage rate | Annual fixed interest rate |
| Appreciation | Annual home-price growth |
| Investment return | Annual portfolio return |
| Carrying cost | Annual tax, insurance, and maintenance rate |
| Selling cost | Percentage paid when the home is sold |
The model compares wealth at a chosen time horizon. It does not compare only the mortgage payment with rent because that would omit cash tied up in the home, maintenance, investment growth, and selling costs.
Build the simulation
The mortgage payment uses the fixed-rate amortization formula. Amortization is the gradual repayment of a loan through scheduled payments. Each payment covers interest first. The rest reduces the loan balance.
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 simulate(years, price=400_000, down_pct=0.20, mort_rate=0.06,
term=30, appreciation=0.03, invest_return=0.05,
rent=2_000, rent_growth=0.03, carry_rate=0.02,
sell_cost=0.06):
loan = price * (1 - down_pct)
payment = monthly_payment(loan, mort_rate, term)
balance = loan
portfolio = price * down_pct
for month in range(years * 12):
interest = balance * mort_rate / 12
balance -= payment - interest
value = price * (1 + appreciation) ** ((month + 1) / 12)
owner_cost = payment + value * carry_rate / 12
rent_this_month = rent * (1 + rent_growth) ** (month // 12)
portfolio = (
portfolio * (1 + invest_return / 12)
+ owner_cost - rent_this_month
)
value = price * (1 + appreciation) ** years
owner_wealth = value * (1 - sell_cost) - balance
renter_wealth = portfolio
return owner_wealth, renter_wealth
for years in (3, 7, 15):
owner, renter = simulate(years)
choice = "buy" if owner > renter else "rent"
print(f"{years} years: {choice}")
print(f" owner wealth: ${owner:,.0f}")
print(f" renter wealth: ${renter:,.0f}")The simulation tracks the mortgage balance month by month. It grows the home's value and the renter's portfolio separately. At the end, it subtracts selling costs and the remaining loan from the home's value.
Read the result carefully
A short horizon often favors renting because buying has large transaction costs. A longer horizon gives the buyer more time to repay principal and benefit from appreciation. However, a longer horizon does not guarantee that buying wins. Low appreciation, high maintenance costs, or strong investment returns can keep renting ahead.
The model also simplifies several details:
- It does not include income taxes or mortgage-interest deductions.
- It treats carrying costs as a percentage of home value.
- It assumes regular investment returns rather than volatile market results.
- It assumes the home and rent grow at steady rates.
- It does not model refinancing, renovations, vacancy, or unexpected repairs.
Use the model to identify which assumptions control the result. Then test several reasonable values instead of trusting one output.
flowchart TD
A[Choose assumptions] --> B[Calculate mortgage payment]
B --> C[Update loan balance each month]
A --> D[Grow home value]
A --> E[Grow rent and renter portfolio]
C --> F[Calculate owner's wealth]
D --> F
E --> G[Calculate renter's wealth]
F --> H[Compare at each time horizon]
G --> HExercise
Why does the model subtract the remaining mortgage balance from the home's sale value?
Show answer
The seller must repay that balance from the sale proceeds. Only the amount left after the loan and selling costs belongs to the owner.