Sub topic 6
The Opportunity Cost of Your Cash
This chapter assumes you know compound growth, the monthly mortgage payment formula from the earlier chapter, and the list of upfront and recurring costs of owning. It covers how to put a price on the cash that buying locks up, and how to use that price in a rent-versus-buy comparison.
What opportunity cost means
Opportunity cost is the value of the best alternative you give up when you make a choice. For housing, the choice is about cash. A buyer who puts 80,000 into a down payment can no longer use that 80,000 for something else. The renter keeps it.
No bank statement shows this cost, which is why people leave it out. Mortgage interest appears on a statement. The growth the down payment would have earned elsewhere does not. A fair comparison counts both.
The idea is simple, but three decisions make it work:
- Which cash counts.
- Which return to assign to it.
- How to apply that return consistently over time.
Which cash counts
Three flows of money belong in the calculation.
- The down payment. This is equity in the house. You may get it back when you sell, but until then you cannot use it.
- Closing costs. These are fees paid at purchase, such as lender fees, title insurance, and transfer taxes. They are usually 2% to 5% of the price. Unlike the down payment, you never get them back. They are spent cash that also loses its growth.
- The monthly difference. If owning costs 2,800 a month and renting costs 2,000, the renter has 800 left over each month. If renting is the more expensive option, the buyer has the surplus. Whoever has the surplus is assumed to invest it.
The down payment and closing costs are a lump sum at time zero. The monthly difference is a stream of contributions. Both earn the same assumed return.
Putting a number on the lump sum
The future value of a lump sum is the amount times the growth factor. With monthly compounding, that is amount * (1 + annual_return / 12) ** (years * 12).
The example below uses a 400,000 house, a 20% down payment, and closing costs of 3% of the price.
def future_value(amount, annual_return, years):
return amount * (1 + annual_return / 12) ** (years * 12)
price = 400_000
down = price * 0.20 # 80,000
closing = price * 0.03 # 12,000
cash = down + closing # 92,000
for rate in (0.0, 0.05, 0.07):
fv = future_value(cash, rate, 10)
print(f"{rate:.0%}: {fv:,.0f} (gain {fv - cash:,.0f})")
# 0%: 92,000 (gain 0)
# 5%: 151,525 (gain 59,525)
# 7%: 184,889 (gain 92,889)Over 10 years, the opportunity cost of this cash is roughly 60,000 at a 5% return and roughly 93,000 at 7%. That is the growth the buyer gives up, and the owner's appreciation and equity buildup have to cover it before buying comes out ahead.
A rough check is useful. In year one, 92,000 at 5% earns about 4,600, or about 383 a month. Add that to the monthly cost of ownership and the real cost of owning is higher than the mortgage statement suggests.
Choosing the return
The assumed return is the most debated number in the model. Treat it as a range to test. Use these guidelines.
Match the return to the realistic alternative. Ask what you would actually do with the cash if you rented.
| If the cash would otherwise... | Reasonable return to assume |
|---|---|
| Pay off debt at 22% | 22%, the interest you stop paying |
| Sit in a savings account | The savings rate, often 3% to 4% |
| Go into a diversified portfolio | A long-run expected return, with a wide uncertainty range |
| Be needed for an emergency fund | Treat it separately, since it is not available for either choice |
Use an after-tax return. Investment gains are usually taxed. A pre-tax 5% with a 20% tax on gains is closer to 4% (rate * (1 - tax)). This is a simplification, because the actual tax depends on account type and timing, but it avoids overstating the renter's advantage.
Stay in nominal terms. If rent growth, appreciation, and the mortgage rate are all nominal (not adjusted for inflation), the investment return must be nominal too. Mixing a real return with nominal growth rates biases the result.
Account for risk. A stock portfolio's expected return is not guaranteed. A home's appreciation is not guaranteed either. Use the same logic for both. Do not give the renter a risky 8% while assuming the house is a safe 3%.
Compare with prepaying the mortgage. Paying down a 6% mortgage earns a certain 6% before tax, because it avoids interest you would otherwise pay. If you assume a lower return on invested cash, a buyer could use spare cash to prepay and beat it. A higher assumed return needs a risk premium to justify the gap.
Adding the monthly difference
The monthly difference compounds like the lump sum. The next function models the renter's portfolio. It accepts a negative difference, which means the renter is the one paying more.
def renter_portfolio(cash, monthly_diff, annual_return, years):
portfolio = cash
for _ in range(years * 12):
portfolio = portfolio * (1 + annual_return / 12) + monthly_diff
return portfolio
after_tax_return = 0.05 * (1 - 0.0) # set the tax rate to match your situation
result = renter_portfolio(92_000, 800, after_tax_return, 10)
print(f"{result:,.0f}") # about 275,750Of that total, about 151,525 comes from the lump sum, and about 124,226 comes from 120 monthly contributions of 800 with growth. The contribution stream matters as much as the lump sum, which is why a comparison that looks only at the down payment understates the renter's position.
The same function works for the buyer when owning is cheaper. Pass the buyer's surplus as monthly_diff and compare portfolios.
Common errors
- Leaving out closing costs. The simulation in the model chapter starts the renter's portfolio at only
price * down_pct. A more complete version starts it atprice * (down_pct + closing_pct). With 3% closing costs on a 400,000 house, the omitted 12,000 grows to about 19,800 at 5% over 10 years. - Counting the down payment as a loss. The down payment returns as equity when you sell. The opportunity cost is the growth it would have earned elsewhere, not the amount itself.
- Counting the mortgage payment twice. The principal part of each payment builds equity. If you count it as a cost and also count the equity at sale, you double count it. Track it once, on the equity side.
- Ignoring the monthly difference when it flips sign. In some cities owning is cheaper than renting each month. Then the buyer is the one with extra money to invest, and the model must credit them for it.
- Forgetting liquidity. An invested portfolio can be sold in days. Home equity cannot. This does not change the arithmetic, but it matters for the decision, and later chapters return to it.
Edge cases
If you have cash that would earn nothing, such as money in a checking account, the opportunity cost is small, and buying looks better. This is real, but be honest: most people could place that cash somewhere safe for a modest return.
If a family member gifts the down payment, the cash still has opportunity cost. The gift could have been invested instead. Only a gift restricted to home purchases changes the analysis, because then the alternative use is not available.
If the down payment is small, such as 5%, the lump sum shrinks but the monthly cost rises because of the larger loan and mortgage insurance. The opportunity cost of cash falls while the interest cost rises, so run the full model rather than judging by the down payment alone.
Exercise
You plan to put 60,000 down and pay 9,000 in closing costs. You expect a 4% after-tax return, with monthly compounding, and plan to stay 5 years. About how much would that 69,000 have grown to if you had invested it instead, and what is the gain?
Show answer
The growth factor is (1 + 0.04/12) ** 60, which is about 1.221. Multiply 69,000 by 1.221 to get about 84,250. The gain, which is the opportunity cost of the lump sum, is about 15,250. Any monthly cost difference would add to the renter's portfolio on top of this.
Exercise
Your model assumes the renter earns 8% on invested cash, while the house appreciates at 2%. Why is this a flawed setup, and what should you do instead?
Show answer
The two rates use different standards. An 8% return is optimistic and risky, and 2% appreciation is pessimistic, so the setup favors renting before any costs are counted. Choose both rates from evidence at a comparable level of risk, state the source, and run the model across a range for each to see where the result flips.