# Rent vs buy calculator

> Compare renting and buying a home: net worth from owning versus renting and investing the difference, year by year, and when buying pulls ahead.

Interactive version: https://www.calcopenly.com/finance/rent-vs-buy-calculator
Subject: Finance calculators

The comparison follows two households with the same money. The buyer pays the down payment and buying costs, then the mortgage, property tax, maintenance and insurance; the renter invests the down payment and buying costs instead and pays rent. Each month, whichever side spends less invests the difference at the same return. At the end, the buyer's net worth is the home's value after selling costs, minus the loan balance, plus those investments.

With the defaults, a 400,000 home bought with 20% down at 6.5%, against rent of 2,000 rising 3% a year, 3% home price growth and a 6% investment return, buying is ahead by 14,221.16 after 30 years but only pulls ahead in year 29. Over 5 years the same inputs favor renting by 40,932.19, because the 3% buying costs and 6% selling costs have not been recovered.

Income and capital gains taxes are left out, including any mortgage-interest deduction. Small changes in rent, home price growth or investment return move the answer a long way, so test several.

## Inputs

- **Home price**
- **Down payment**
- **Mortgage rate (per year)**
- **Mortgage term**
- **Compare over**
- **Monthly rent**
- **Rent increase (per year)**
- **Home price growth (per year)**
- **Investment return (per year)**: Earned on the renter's down payment and on whichever side's monthly savings
- **Property tax (% of home value per year)**
- **Maintenance (% of home value per year)**
- **Home insurance per year**: Grows with the home's value
- **Buying costs (% of price)**
- **Selling costs (% of sale price)**

## Results

- Buying minus renting — main result
- Verdict
- Net worth if you buy
- Net worth if you rent
- Buying pulls ahead in year
- Mortgage payment per month
- Cost of owning per month, year 1
- Mortgage interest paid

## Formula

$$
NW_{buy} = V_t(1 - s) - B_t + I_{buy},\qquad NW_{rent} = I_{rent},\qquad V_t = V_0(1+a)^t
$$

## Worked examples

### 400k home, 20% down, 30 years

- Home price: 400,000
- Down payment: 20%
- Mortgage rate (per year): 6.5%
- Mortgage term: 30 years
- Compare over: 30 years
- Monthly rent: 2000
- Rent increase (per year): 3%
- Home price growth (per year): 3%
- Investment return (per year): 6%
- Property tax (% of home value per year): 1.1%
- Maintenance (% of home value per year): 1%
- Home insurance per year: 1500
- Buying costs (% of price): 3%
- Selling costs (% of sale price): 6%
- **Buying minus renting: 14,221.16**
- **Net worth if you buy: 974,573.41**
- **Net worth if you rent: 960,352.25**
- **Buying pulls ahead in year: 29**
- **Mortgage payment per month: 2,022.62**
- **Cost of owning per month, year 1: 2,847.62**
- **Mortgage interest paid: 408,142.36**
- Checked against: Python decimal (prec 50) monthly simulation written separately: loan payment, costs, and both portfolios growing at 1.06^(1/12) − 1 per month

### Cash purchase with every rate zero, one year

- Home price: 120,000
- Down payment: 100%
- Mortgage rate (per year): 0%
- Mortgage term: 30 years
- Compare over: 1 year
- Monthly rent: 1000
- Rent increase (per year): 0%
- Home price growth (per year): 0%
- Investment return (per year): 0%
- Property tax (% of home value per year): 0%
- Maintenance (% of home value per year): 0%
- Home insurance per year: 0
- Buying costs (% of price): 0%
- Selling costs (% of sale price): 0%
- **Buying minus renting: 12,000.00**
- **Net worth if you buy: 132,000.00**
- **Net worth if you rent: 120,000.00**
- **Buying pulls ahead in year: 1**
- Checked against: Hand calculation: the renter holds the 120,000 in cash; the owner keeps the home and banks 12 × 1,000 of rent not paid

### Same home over 5 years

- Home price: 400,000
- Down payment: 20%
- Mortgage rate (per year): 6.5%
- Mortgage term: 30 years
- Compare over: 5 years
- Monthly rent: 2000
- Rent increase (per year): 3%
- Home price growth (per year): 3%
- Investment return (per year): 6%
- Property tax (% of home value per year): 1.1%
- Maintenance (% of home value per year): 1%
- Home insurance per year: 1500
- Buying costs (% of price): 3%
- Selling costs (% of sale price): 6%
- **Buying minus renting: -40,932.19**
- **Verdict: Renting comes out ahead**
- Checked against: Python decimal monthly simulation: owner 136,331.92 vs renter 177,264.11 after buying and selling costs

### 15-year mortgage compared over 20 years

- Home price: 300,000
- Down payment: 10%
- Mortgage rate (per year): 6%
- Mortgage term: 15 years
- Compare over: 20 years
- Monthly rent: 1800
- Rent increase (per year): 3.5%
- Home price growth (per year): 4%
- Investment return (per year): 7%
- Property tax (% of home value per year): 1%
- Maintenance (% of home value per year): 1%
- Home insurance per year: 1200
- Buying costs (% of price): 2%
- Selling costs (% of sale price): 5%
- **Buying minus renting: 272,307.00**
- **Buying pulls ahead in year: 3**
- **Mortgage payment per month: 2,278.41**
- Checked against: Python decimal monthly simulation; the loan is paid off after year 15 and the owner invests the full rent saving afterwards

## Questions

### Is it better to rent or buy a house?

It depends mostly on how long you stay and how rent compares with the price. With the default 400,000 home and 2,000 rent, renting and investing the difference comes out ahead at 5, 10, 20 and 25 years, and buying wins only at 30 years, by 14,221.16. If the same home would rent for 2,200, buying pulls ahead in year 12 and leads by 286,738.41 after 30 years.

### How long do you need to own a home for buying to beat renting?

Long enough for price growth and loan repayment to recover the buying and selling costs, which total 9% of the price in the defaults. With 3% annual price growth, buying the default home pulls ahead of renting only in year 29; at 4% growth it pulls ahead in year 10, and at 2% it never does within 30 years.

### What is the price-to-rent ratio?

It is the home price divided by a year's rent for a comparable home. The default 400,000 home renting at 2,000 a month has a ratio of 400,000 ÷ 24,000 = 16.7. A lower ratio favors buying: at 2,500 a month (ratio 13.3) buying pulls ahead in year 6, while at 1,800 (ratio 18.5) renting stays ahead for all 30 years.

### What does it cost to own a home each month?

More than the mortgage payment. In the default case, owning costs 2,847.62 a month in year 1: a 2,022.62 mortgage payment plus 1.1% property tax, maintenance at 1% of the home's value and 1,500 a year of insurance. Tax, maintenance and insurance then grow with the home's value, while the mortgage payment stays fixed.

### How does the investment return change the rent vs buy result?

A higher return favors renting, because the renter's down payment and monthly savings grow faster. With the other defaults fixed, buying leads by 399,915.86 after 30 years at a 4% return and by 14,221.16 at 6%, while renting leads by 267,399.66 at 7% and by 631,038.81 at 8%.

### How accurate is the rent vs buy calculator?

Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 4 worked examples whose answers come from independent sources; for example, “400k home, 20% down, 30 years” is checked against Python decimal (prec 50) monthly simulation written separately: loan payment, costs, and both portfolios growing at 1.06^(1/12) − 1 per month.

### Where does the method come from?

Consumer Financial Protection Bureau — Buying a house: owning vs renting; Microsoft Excel PMT function (mortgage payment).

## Sources

- [Consumer Financial Protection Bureau — Buying a house: owning vs renting](https://www.consumerfinance.gov/owning-a-home/)
- [Microsoft Excel PMT function (mortgage payment)](https://support.microsoft.com/office/pmt-function-0214da64-9a63-4996-bc20-214433fa6441)

_Note: financial information, not professional advice._
