Rent vs Buy Calculator
Compare the total cost of renting and buying a home over the years you expect to stay, including equity, closing costs and the return your down payment could earn.
Home Purchase Details
Yearly Costs of Owning
Rental Details
Assumptions
Updated Formula covered by automated tests
Comparing a rent check with a mortgage payment is the most common way people frame the rent-or-buy question, and it leaves out most of the money. This calculator adds up everything each choice costs over the number of years you expect to stay: on the buying side the down payment, closing costs, mortgage, property tax, insurance and upkeep, minus the equity you walk away with when you sell; on the renting side the rent, rising each year.
It also charges buying for the return your down payment and closing costs could have earned if you had kept renting and invested that cash instead. That opportunity cost is easy to forget and is often the factor that decides short horizons in favor of renting.
The answer is very sensitive to how long you stay, how fast prices and rents grow, and your local tax rate, so treat the result as a way to test your assumptions rather than as a verdict.
The formula
- D
- Down payment: home price × down payment percentage
- C_buy, C_sell
- Closing costs when buying (percent of price) and when selling (percent of sale price, mostly agent commission)
- i
- Annual return the up-front cash could earn if invested instead
- t
- Years until you would sell
- V_t
- Estimated home value at sale, growing at a per year
- B_t
- Mortgage balance still owed after t years of scheduled payments
- g
- Annual rent increase
Counting the full mortgage payment as a cost and then subtracting your equity at sale is equivalent to counting only interest, taxes and upkeep: the principal you pay down comes back to you through the smaller loan balance when you sell. Doing it this way keeps the arithmetic transparent and makes appreciation and selling costs show up where they belong.
Property tax, insurance and maintenance are charged as a percentage of the home’s value at the start of each year, so they grow with prices. The mortgage balance is tracked month by month using the standard amortization schedule.
Worked example
Kim pays $1,800 a month in rent and is looking at a $350,000 home with 20% down, a 30-year mortgage at 6.5%, 3% closing costs, 2.7% a year for tax, insurance and upkeep combined, and plans to sell after 7 years. She assumes 3% yearly growth in prices and rent, 6% selling costs and a 4% return on savings.
- 1 Up front: $70,000 down plus $10,500 closing costs = $80,500. The $280,000 loan costs $1,769.79 a month, so 84 payments total $148,662.
- 2 Tax, insurance and upkeep over 7 years: 2.7% of the rising home value = $72,410. Forgone return on the $80,500: 80,500 × (1.04⁷ − 1) = $25,433.
- 3 Sale: $350,000 × 1.03⁷ = $430,456, less 6% selling costs ($25,827) and the $253,165 loan balance, returns $151,463.
- 4 Net cost of buying: 80,500 + 148,662 + 72,410 + 25,433 − 151,463 = $175,542.
- 5 Renting: $1,800 × 12 × (1.03⁷ − 1) ÷ 0.03 = $165,509.
Result: Under these assumptions renting is about $10,033 cheaper over 7 years. With every other input unchanged, staying 9 years instead of 7, or assuming 4% yearly price growth instead of 3%, tips the result toward buying, which is why it pays to try several scenarios.
Before you rely on the result
- Home prices and rents do not grow smoothly; a fall in prices near your sale date can change the outcome completely.
- Renters insurance, the renter investing any monthly savings, PMI on loans with less than 20% down, HOA dues, and tax effects are not modeled.
- A HUD-approved housing counselor can review your budget and local costs before you commit to a purchase.
Frequently asked questions
How many years do I need to stay for buying to win?
There is no universal number. Buying carries large one-time costs on the way in and out (here 3% plus 6%), which only longer stays can spread thin. Increase the years in the calculator one at a time and note where the net costs cross; that crossover is your break-even horizon for your own numbers.
What maintenance percentage should I use?
A common planning rule is 1% of the home’s value per year, more for older houses and less for new construction or condos where the association covers the exterior. HOA dues can be added to the maintenance rate as a percentage of the price.
Why include a return on the down payment?
If you rent, that cash stays in your hands and can earn interest or investment returns. Leaving it out treats the down payment as if it would otherwise sit idle, which tilts the comparison toward buying. Use a conservative rate, such as what a high-yield savings account or Treasury bills pay, if you would not invest it in stocks.
Does this include the mortgage interest tax deduction?
No. Since the standard deduction roughly doubled in 2018, most homeowners no longer itemize, so the deduction often provides little or no benefit. If you do itemize, the true cost of buying is somewhat lower than shown.
Sources
- CFPB: Buying a house (consumerfinance.gov)
- HUD: Find a housing counselor (hud.gov)