Home Buy vs Rent — Cost Analysis

Configurable buy-vs-rent calculator over a horizon you set (default 10 years). Compares three strategies: all-cash purchase, financed purchase, and renting while keeping capital invested. All math runs client-side, no data leaves the page. See methodology.md for assumptions and tax-law notes.
$1.0M
$0.1M$10M
$4,000
$1K$20K
4.0%
0%10%
6.35%
3%9%
20%
0%100%
5.0%
0%10%
9.0%
0%40%
$1.0M
$0.1M$50M
10
3 yrs20 yrs
Default off = seller concession. Toggle on to add ~$120K to year-0 buy outflow.

A Buy

Year-10 wealth (opportunity-cost adjusted) i
Year-10 net worth (before operating-cost opportunity cost) i
Operating-outflow opportunity cost i
Year-0 outflow (down + closing + cap-gains tax) i
Gross 10-yr housing cost i
Net 10-yr cost (incl. final-yr sale credit) i
Yr-10 portfolio i
Yr-10 home equity i

B Rent

Year-10 wealth (opportunity-cost adjusted) i
Year-10 net worth (before operating-cost opportunity cost) i
Operating-outflow opportunity cost i
Year-0 outflow i $0
Gross 10-yr housing cost i
Net 10-yr cost (no sale) i
Yr-10 portfolio i
Yr-10 home equity i $0

Cumulative housing cost (year 0 → year 10)

Total cash flowed out over 10 years per scenario. Gross: deployment + cap-gains tax + cumulative operating costs (mortgage P&I, property tax, insurance, maintenance, rent), net of federal & state tax savings. Net of sale credit: gross minus the year-10 sale proceeds (Buy only), after sale costs and cap-gains tax above the §121 exclusion.

Opportunity-cost-adjusted wealth trajectory

Year-by-year wealth after subtracting the future value of annual housing outflows that could otherwise have stayed invested at the stock-return slider rate. Year-0 deployment is not subtracted again — it already lowers the starting portfolio. At year 10, Buy realizes the home sale net of sale costs and cap-gains tax above the §121 exclusion.

Year-by-year cash flow

Per-year flows for the active scenario. Out = cash leaving your pocket (positive numbers are outflows; year-10 sale credit is shown as negative on the "out" column). Savings = tax savings (federal mortgage interest deduction, CA mortgage interest deduction, CA property-tax deduction). NW is the base portfolio+equity ledger before operating-cost opportunity cost; Adj wealth subtracts the future value of each year's net outflow.

Sensitivity: year-10 opportunity-cost-adjusted wealth across 3 × 3 grid

Two small-multiples, one per scenario (Buy + Rent), each cell shaded warm-shades single-hue (darker = higher adjusted wealth, per-scenario scale). Axes are independent of the sliders: stock return 6 / 9 / 12 % × house appreciation 3 / 5 / 7 %. All other inputs reflect the current slider state. The black outline marks the nearest grid cell to the current slider's (stock_return, house_appreciation) location. Below: a binary winner-region matrix coloring each cell by which scenario has the highest opportunity-cost-adjusted wealth.
A — Buy
B — Rent
Winner region (which scenario wins each cell)