Rent vs Buy Calculator (with Investment Opportunity Cost)

Find out whether buying or renting leaves you with more money after the years you plan to stay — and the year buying starts to win.

Enter your numbers

$
%
$
%
%
% of price
% of sale

Agent commissions, transfer taxes and fees when you sell.

%/yr
%/yr
% of value/yr
$/yr
%/yr

What the down payment and any monthly savings would earn if invested instead.

Results

How this calculator works

The calculator runs both paths month by month. The buyer pays the down payment and closing costs, then the mortgage, property tax, maintenance and insurance. The renter pays rent, but invests the same up-front cash — and, in any month when owning costs more than renting, invests the difference. When renting costs more, the buyer invests the difference instead, so both paths spend the same money.

At the end of your stay the home is sold (minus selling costs) and the loan repaid. Whichever path leaves more money is the better choice. The break-even year is the first year the buyer comes out ahead.

Buyer net worth = Value × (1 − Selling%) − Loan balance + Buyer’s invested savings Renter net worth = (Down payment + Closing) grown at the investment return + monthly (Owner cost − Rent) invested when positive

Assumptions and tips

  • Rent rises once a year; home value grows smoothly.
  • No PMI is added for down payments under 20% — add it to maintenance if it applies.
  • Investment returns are not guaranteed; try a lower return to stress-test the answer.

Worked example

Using the default values in the calculator above:

InputValue
Years you plan to stay7
Monthly rent$2,200
Rent increase per year3 %
Home price$400,000
Down payment20 %
Mortgage rate6.5 %
Loan term30 years
Buying closing costs3 % of price
Selling costs6 % of sale
Home value growth3 %/yr
Property tax1.1 %/yr
Maintenance1 % of value/yr
Homeowners insurance1,800 $/yr
Investment return (if renting)6 %/yr

ResultValue
Better choice over 7 yearsRenting
Ahead by$22,370
Net worth if you buy$173,101
Net worth if you rent and invest$195,470
Buying breaks even after12 years
Home value at the end$491,950
Loan balance at the end$289,332
Total rent paid$202,289
Total owner costs (incl. down payment & closing)$339,745
Monthly principal & interest$2,022.62

Step by step:

  1. Up-front cash to buy = $400,000 × (20% down + 3% closing) = $92,000 — the renter invests this at 6%/yr
  2. Owner’s monthly cost = mortgage + 1.1% tax + 1% maintenance + $1,800/yr insurance; renter pays $2,200, rising 3%/yr
  3. Each month, whoever pays less invests the difference
  4. After 7 years: sell the home (minus 6% selling costs), repay the loan, and compare both net worths

Common mistakes to avoid

  • Comparing rent with the mortgage payment only — owners also pay tax, insurance, maintenance, closing and selling costs.
  • Ignoring what the down payment could earn if invested.
  • Buying for a short stay: closing and selling costs of 8–10% of the price usually take years to recover.

Frequently asked questions

Is it better to rent or buy?

It depends mostly on how long you stay. Buying has large one-time costs (closing and selling), so it usually needs several years before it beats renting. Use your own rent, price and stay length above.

What is opportunity cost in rent vs buy?

Money tied up in a down payment cannot be invested elsewhere. This calculator assumes a renter invests that money and counts its growth.

Sources

Last reviewed: 2026-10-27 · How we build and check calculators