Skip to main content

Rent or Buy?

Should you buy a home, or rent and invest the money you would have put into it? Rent or Buy? simulates both choices over the years you plan to stay. It tells you which one leaves you wealthier, by how much, and how sure you can be.

Try it at rent-or-buy-sim.com. It opens in any web browser and needs no account.

Rent or Buy? with the verdict at the top and the net value of buying and renting drawn year by year below it

What it shows you

  • The verdict. The headline says which choice comes out ahead at the end of your stay and by how much. Below it are the breakeven year and the share of simulated futures in which that choice wins. When the two choices end close together, the app says the answer is too close to call instead of picking a side.
  • The decision chart. It draws the net value of buying and of renting for every year of your stay. Net value is what you would walk away with, minus everything you put in.
  • How sure is this? A fan chart shows the spread of outcomes across the simulated futures, where growth and inflation vary from year to year.
  • What could change the answer? A tornado chart tests one number at a time, lower and higher than yours. A sentence above it names the single changes that would flip the verdict. Each bar end prints the value that was tested. A side that stops at a slider limit is marked (min) or (max).
  • Region presets. The United States, France (Lyon), Germany (Köln), the Netherlands and the United Kingdom (England and Northern Ireland) each set local tax rules, buying costs, typical prices and the currency.
  • First-time-buyer relief. In regions that offer it, this is on by default. Where the law caps the price that qualifies, it switches itself off above that cap.
  • Market outlook. Pick conservative, historical or optimistic assumptions for home prices, investment returns and rent increases.
  • Advanced settings in plain language. Groups at the end of the inputs panel cover buying and selling costs, the yearly costs of owning, tax relief on the mortgage, tax when you sell the home, and tax on investments. Each group shows a one-line summary. A dot marks any value you changed from the region default, and you can reset a group to those defaults.
  • Shareable links. The address bar always holds your exact scenario, and the Share button copies or shares it.
  • Help when you need it. A guided tour is offered on your first visit, and the Guide explains the ideas behind the numbers. You can replay the tour from the Guide.

You can also see how much cash each choice costs you over time, read every figure in a year-by-year table, and download that table as CSV.

The spread of simulated futures, and the tornado chart that shows which single change could flip the verdict

Get started

Install from PyPI

You need Python 3.12 or newer.

pip install rent-vs-buy-simulator
rent-vs-buy

Open http://localhost:8501. To use another port, set PORT, for example PORT=9000 rent-vs-buy.

Run from a clone

You need uv.

git clone https://github.com/palsagar/rent-vs-buy-simulator.git
cd rent-vs-buy-simulator
uv run uvicorn simulator.server:app --reload --port 8501

Open http://localhost:8501.

Develop

uv venv --seed && uv pip install -e .        # set up
uv run pytest                                # Python tests
npm install && npx playwright install chromium
npx playwright test                          # browser tests
uv run ruff check src/ tests/                # lint
uv run ruff format src/ tests/               # format
uv run ty check src/                         # type check

The frontend has no build step. The browser loads the ES modules in src/simulator/static/ as they are.

Learn more

Metadata

Release files for rent-vs-buy-simulator 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rent-vs-buy-simulator 2.1.0
File Size Uploaded
rent_vs_buy_simulator-2.1.0.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for rent-vs-buy-simulator 2.1.0
File Interpreter ABI Platform
rent_vs_buy_simulator-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.2 MB

Release files / rent_vs_buy_simulator-2.1.0.tar.gz

Download URL rent_vs_buy_simulator-2.1.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
f67cba14c07c3e1b6ff74f73b0a4d21553ab4c43f1a568021544ae2ed52ee28d
BLAKE2b-256 checksum
How to use checksums
a3fde49f1957ed8c443612cd5f0c87a30b0ccb19c968a48f0c9a3e653b09e56a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rent_vs_buy_simulator-2.1.0-py3-none-any.whl

Download URL rent_vs_buy_simulator-2.1.0-py3-none-any.whl
Size 993.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06ac048fa59c2abce9231ffc611e8a4b44211a4a940e15dd3dc002e732c4764a
BLAKE2b-256 checksum
How to use checksums
ffd8607c003e9c0c09641b56fd872eb6bb19546c1950408509c81406a3192747
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page