Rent or buy calculator
The net cost of renting against buying a home over a number of years, from assumptions you set, with the first year in which buying comes out ahead.
- Version 1
- Free, no sign-up
Example: A 400,000 home with 20% down against renting at 2,000 a month, over 10 years
| Cost of renting Net cost of renting over the years. |
217,274.80 rounded |
|---|---|
| Cost of buying Net cost of buying over the years. |
192,396.12 rounded |
| Difference cost_of_renting − cost_of_buying: positive when buying is cheaper. |
24,878.68 rounded |
| Cheaper buy or rent. |
buy |
| Break even year The first year in which buying costs no more than renting. Absent when that does not happen within the years compared. |
8 |
| Home value at end The home's value after the years. |
537,566.55 rounded |
| Loan balance at end What is still owed then. |
271,283.24 exact |
Years table
| Year | Cost of renting | Cost of buying | Home value | Loan balance |
|---|---|---|---|---|
| 1 | 19,400.00 | 53,414.68 | 412,000.00 | 316,423.24 |
| 2 | 39,290.00 | 70,491.44 | 424,360.00 | 312,606.96 |
| 3 | 59,680.10 | 87,211.25 | 437,090.80 | 308,535.08 |
| 4 | 80,580.47 | 103,553.97 | 450,203.52 | 304,190.51 |
| 5 | 102,001.36 | 119,498.20 | 463,709.63 | 299,554.97 |
| 6 | 123,953.04 | 135,021.23 | 477,620.92 | 294,608.97 |
| 7 | 146,445.85 | 150,098.95 | 491,949.55 | 289,331.75 |
| 8 | 169,490.16 | 164,705.76 | 506,708.03 | 283,701.10 |
| 9 | 193,096.35 | 178,814.44 | 521,909.27 | 277,693.35 |
| 10 | 217,274.80 | 192,396.12 | 537,566.55 | 271,283.24 |
Rounding: Half even, 2 decimal places. Calculator finance/rent-vs-buy@1.
How it is calculated
buying = down payment + buying costs + mortgage payments + ownership costs − (home value × (1 − selling costs) − loan balance); renting = rent paid − (down payment + buying costs) × ((1 + return)^years − 1)Adds up what each choice costs over the years you plan to stay. Buying costs the down payment, the buying costs, the mortgage payments and the yearly costs of owning, less what is left after selling the home and repaying the loan. Renting costs the rent, less what the down payment and buying costs would have earned if invested instead. Every growth rate is an input, because the answer depends on them and nobody knows them in advance; change them to see how sure the result is.
- This is a simple, open model. It leaves out income tax effects, and it does not invest the monthly difference between rent and ownership costs.
- Ownership costs each year are a percentage of the home's value at the start of that year; rent rises once a year.
- It is arithmetic on your assumptions, not advice.
- Amounts are plain numbers in any single currency; no currency conversion is done.
References
Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.
Use it from your code
curl https://api.curatedapi.com/v1/calc/finance/rent-vs-buy \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"home_price": "400000",
"down_payment": "80000",
"annual_rate_percent": "6.5",
"term_years": 30,
"years": 10,
"monthly_rent": "2000",
"rent_increase_percent": "3",
"home_appreciation_percent": "3",
"annual_ownership_cost_percent": "2",
"buying_costs_percent": "3",
"selling_costs_percent": "6",
"investment_return_percent": "5"
}'
The same call in Python
import os
import requests
payload = {
"home_price": "400000",
"down_payment": "80000",
"annual_rate_percent": "6.5",
"term_years": 30,
"years": 10,
"monthly_rent": "2000",
"rent_increase_percent": "3",
"home_appreciation_percent": "3",
"annual_ownership_cost_percent": "2",
"buying_costs_percent": "3",
"selling_costs_percent": "6",
"investment_return_percent": "5",
}
response = requests.post(
"https://api.curatedapi.com/v1/calc/finance/rent-vs-buy",
headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
json=payload,
timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
"home_price": "400000",
"down_payment": "80000",
"annual_rate_percent": "6.5",
"term_years": 30,
"years": 10,
"monthly_rent": "2000",
"rent_increase_percent": "3",
"home_appreciation_percent": "3",
"annual_ownership_cost_percent": "2",
"buying_costs_percent": "3",
"selling_costs_percent": "6",
"investment_return_percent": "5",
};
const response = await fetch("https://api.curatedapi.com/v1/calc/finance/rent-vs-buy", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log((await response.json()).result);
MCP tool calc_finance_rent_vs_buy at https://mcp.curatedapi.com.
Inputs, outputs and errors in the API reference.
Put it on your website
<div data-curatedapi-widget="finance/rent-vs-buy" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>
Use a public key registered for your site. Calculations are billed like API calls. How widgets work.
Related calculators
- Black-76 calculator for options on futures
- Black-Scholes option price and Greeks calculator
- Bond duration and convexity calculator
- Compound interest calculator
- EU and UK APRC calculator
- Extra mortgage payment calculator
- FHA mortgage insurance (MIP) calculator
- Implied volatility calculator
- Internal rate of return (IRR) calculator
- Loan EMI calculator
- Mortgage affordability calculator
- Mortgage calculator
- Net present value (NPV) calculator
- Refinance break-even calculator
- Return on investment (ROI) calculator
- Savings goal calculator
- Simple interest calculator
- US APR calculator (Truth in Lending, Regulation Z)
- USDA loan guarantee fee calculator
- VA funding fee calculator
- Yield to call calculator
Add this calculator to your website
Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.
Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.