Rent vs Buy Calculator 2026: Break-even, Opportunity Cost, Tax
Compare renting vs buying with full math: mortgage (Price/SAC), opportunity cost from year 1, mortgage interest deduction, $40k SALT cap (OBBBA 2026), $250k/$500k cap-gains exclusion. Year-by-year break-even and sensitivity analysis.
Based on 11 official sources↓Recommendation
Renting wins throughout the 10-year horizon. The opportunity cost of the down payment + recurring expense difference, invested at expected return, builds more wealth than home equity.
Buying
Renting + Investing
Qualitative factors
- Mobility: High mobility favors renting — transaction costs only amortize over long horizons.
- Stability: Buying locks in housing cost. Renting exposes you to annual increases (typically 3-5% in the US).
- Liquidity: Selling a home takes 30-90 days plus closing. Investments are liquid in T+2.
- Pride of ownership: Customization (paint, pets, renovations) without landlord approval — the intangible value isn't priced in spreadsheets.
Market warnings
- US 2026 landscape: 30-yr fixed at 6.8-7.2%, high-yield savings 4-4.5%. The opportunity cost of the down payment matters — investing it in S&P 500 index at 7% real return compounds aggressively over 30 years.
Warnings
- Strong renting advantage. Consider whether the expected investment return is realistic. Past returns don't repeat indefinitely.
Rent vs buy is not a finance question — it is a finance question wrapped around a life question. The headline number from any rent-vs-buy calculator (this one or NYT or NerdWallet) is sensitive to assumptions you have to guess: future appreciation, future rent increases, future investment returns, how long you stay, whether you itemize. Get any of those wrong and the recommendation flips. Robert Shiller's data shows US real-home appreciation averaged 0.2%/year over 100 years — yet most online calculators default to 3-5%, which is the post-WWII period that may or may not repeat.
This calculator does the math both ways: a buying scenario (mortgage on Price or SAC, property tax + maintenance + insurance + PMI scaling with appreciation, mortgage interest deduction when itemizing beats the standard deduction, capital-gains exclusion at sale) and a renting scenario (rent + insurance + the opportunity cost of investing what would have been the down payment plus every monthly difference). Year by year. Break-even when buying surpasses renting + investing. Sensitivity sweep when you want to see how robust the recommendation is to a 2-percentage-point appreciation drop.
Worked examples below were generated by running this calculator. Numbers in the prose match what you see in the widget — no hand-waving. The implementation reuses lib/loans/ from Spec #8 (Newton-Raphson IRR + Price/SAC schedules) so the mortgage math is the same as the standalone Loan and Auto Loan calculators. Bilingual: same engine, locale-specific defaults for tax treatment (US §121 cap-gains exclusion + $40k SALT cap OBBBA 2026; BR Lei 9.250/95 R$ 440k isenção for primary residence).
The math behind rent vs buy
Buying net position at year N = equity − cumulative_costs. Equity is the home value (after appreciation) minus remaining mortgage balance. Cumulative costs is everything you have spent so far: down payment, closing/ITBI, registry, all mortgage payments, all property tax, all insurance, all maintenance, all HOA/condo, all PMI. The "net position" is what your wealth would be if you sold today and netted the proceeds against everything spent.
Renting net position at year N = invested_balance_after_tax − cumulative_rent. When you rent, you do NOT pay the down payment + closing. That cash goes into a portfolio that grows at expected_investment_return. Each year, when buying costs more than renting (which is usually true for the first ~5-10 years), the surplus difference also gets invested. At the horizon we apply 15% capital-gains tax on the investment gain to make the comparison apples-to-apples.
Break-even is the first year where buying's net position ≥ renting's. Sometimes that is year 1 (strong appreciation + cheap money). Sometimes it never happens within the horizon (high rates + high investment alternatives + flat appreciation). Sometimes it happens at year 7 then briefly flips back when the mortgage interest portion is high — the calc shows year-by-year so you can see the wobble.
Mortgage interest deduction (US) only matters when itemized > standard. 2026 standard deduction: $16,100 single / $32,200 MFJ / $24,150 HoH. SALT cap $40,000 (OBBBA raised it from $10k). For a $400k mortgage at 7%, year-1 interest is ~$22k. If you have $20k in property tax (capped at $40k SALT), total itemized = ~$42k — beats $32,200 MFJ by $9,800, saving $9,800 × 22% marginal = ~$2,156. But for smaller mortgages or single filers without state income tax, the standard deduction wins and the "benefit" is zero. The calc detects this automatically.
Capital-gains exclusion (US §121). If primary residence + lived 2 of last 5 years: $250k single / $500k MFJ excluded from gain. For a $400k home that appreciates to $1M over 30 years (gain $600k), single filer pays 15% × ($600k − $250k) = $52,500. MFJ pays 15% × ($600k − $500k) = $15,000. The calc applies this automatically when is_primary_residence is checked.
Capital-gains BR (Lei 9.250/95 + Lei 11.196/05). Imóvel único usado como moradia até R$ 440.000: isenção total. Reinvestimento em outro imóvel residencial em 180 dias: isenção total (não modelado neste calc — usuário deve marcar primary residence quando aplicável). Acima de R$ 440k: 15% sobre o ganho (Lei 13.259/2016 simplificada).
Buying net = (home_value × (1+a)^N − remaining_mortgage_N) − Σ_{0..N} costs_y Renting net = invested_balance_after_tax − Σ_{1..N} rent_y Break-even = first N where Buying net ≥ Renting net opp_cost_invested = (down_payment + closing) × (1+r)^N + Σ surplus_y × (1+r)^(N-y)
- a
- home appreciation per year
- r
- expected investment return (after-tax effective)
- N
- horizon in years
- surplus_y
- annual buying-cost surplus over rent (when positive)
Practical examples
US — $400k home, 20% down, 7% APR, $2,200 rent, 4% appreciation, 7% return
Setup: $400,000 home in Texas-style market. 20% down = $80k. 30-year fixed at 7% APR = $2,128/month P&I + $367 property tax (1.1%) + $133 insurance (0.4%) + $333 maintenance (1%) = $2,962/month buying cost year 1. Rent $2,200/month + $20 renter insurance. Investment return 7% (S&P historical real). Stay 10 years.
**Year 1 buying net:** equity ~$99k (after 4% appreciation, ~$3k principal paid, $80k initial equity) − cumulative_costs ~$127k (down + closing + first-year payments) = **−$28,297**. **Year 1 renting net:** invested $87,600 (initial outlay − $2,200 deposit − $2,200 first month) at 7% + small annual surplus of buying cost over rent = **+$76,551**. **Year 10:** buying net **−$150k**; renting net **−$44k**. **Break-even: never within 10 years**. Total advantage at year 10: **−$106,108** (renting wins). The recommendation is **rent_strong**.
Takeaway: At 7% mortgage rate + 4% appreciation + 7% investment return, the down-payment opportunity cost dominates for a 10-year horizon. The math says rent + invest. But push appreciation to 6% (Texas/Phoenix have done this for 2020-2024) and run sensitivity — break-even drops into the 7-year range. The lesson is: don't trust the headline. Always run sensitivity.
BR — R$ 500k Brasília 30y SAC, 11% AA, R$ 100k entrada, aluguel R$ 2.800
Setup: R$ 500.000 imóvel típico Brasília classe média. SAC com 11% AA, R$ 400k financiado por 30 anos. Primeira parcela ~R$ 4.770 (juros R$ 3.660 + amort R$ 1.111). IPTU 0,6% × R$ 500k = R$ 250/mês. Condomínio R$ 600/mês. Manutenção 1% × R$ 500k/12 = R$ 417/mês. Total comprando ano 1: R$ 6.040/mês. Aluguel R$ 2.800/mês. Investimento esperado 13% AA (renda fixa pós-Selic 14,75% + ações).
**Custos iniciais comprando:** entrada R$ 100k + ITBI 3% (R$ 15k) + registro 1,5% (R$ 7,5k) = **R$ 122,5k**. **Ano 10:** valor imóvel ~R$ 854k (5,5% AA), saldo devedor ~R$ 270k (SAC), equity ~R$ 584k. Cumulative costs ~R$ 870k (entrada + ITBI/registro + 10 anos de parcelas + IPTU + condomínio + manutenção). **Buying net ano 10: ~−R$ 285k.** **Renting net ano 10:** investido R$ 122,5k inicial a 13% AA capitaliza para ~R$ 415k. Aluguel acumulado 10y com reajuste 4%: ~R$ 405k. Net: ~+R$ 10k. **Break-even: nunca em 10 anos**. Recomendação: rent_strong nesse cenário (Selic alta + alavancagem inviável).
Takeaway: 2026 BR é cenário atípico — Selic 14,75% torna renda fixa pós-fixada (CDB DI ~14% líquido) competitivo com a maior parte das valorizações imobiliárias. Quando o investimento alternativo rende mais que o juro do financiamento + apreciação composta, o math pende para alugar. Sob outras premissas (aluguel mais alto, valorização 8%/ano em mercados aquecidos, horizonte 30 anos não 10) o resultado pode flipar — daí a importância de rodar sensibilidade.
US — $1M San Francisco mortgage with 8% selling costs
Setup: $1M home in San Francisco. 20% down = $200k. 30-year fixed at 7% = $5,322/mo P&I + $917 property tax (1.1%) + $333 insurance + $833 maintenance = $7,406/mo. Equivalent rent $4,500/mo. Selling costs 8% (high-cost expensive market). 10-year horizon.
**Year 10 home value:** $1.48M (4% AA × 10y). Remaining mortgage $686k. Equity $794k. Cumulative buying costs: $1.17M (down + closing $30k + 10y payments). **Buying net year 10: ~−$375k.** **Renting net year 10:** invested $230k initial outlay at 7% capitalizes to ~$893k; cumulative rent $619k → after-tax invested ~$840k. **Net renting: +$221k. Difference: −$596k** (renting wins by $596k).
Takeaway: San Francisco at 7% mortgage + 4% appreciation + 8% selling costs is a pessimistic buying scenario. SF historical appreciation has been higher (5-7% in some decades), but 2024-2026 is cooling. If you may move within 10 years, this is a textbook case for renting. The calc surfaces this very clearly because of the high selling costs (8% × $1.48M = $118k swallows much of the appreciation gain).
BR — R$ 2,2M no novo SFH ceiling com alavancagem
Setup: R$ 2,2M imóvel São Paulo, classe média alta. 20% entrada (R$ 440k). SAC 11% AA, R$ 1,76M financiado. ITBI 3% + registro 1,5% = R$ 99k. Aluguel equivalente R$ 9.000/mês. Selic 14,75% — entrada de R$ 540k investida em renda fixa pós-fixada rende ~R$ 75k/ano líquido.
**Cenário "alavancagem":** financia R$ 1,76M e mantém R$ 540k investido a 14% AA. Valor imóvel ano 10: ~R$ 3,94M (6% AA). Saldo devedor SAC: ~R$ 1,17M. Equity: ~R$ 2,77M. Investimentos paralelos: R$ 540k × (1,14)^10 ~ R$ 2M (após capital gains 15%: ~R$ 1,8M). Total comprando + investindo: R$ 4,57M − cumulative costs R$ 2,1M = R$ 2,47M. Cenário "alugar" sem alavancagem: investe R$ 540k × 14% = ~R$ 1,8M após-tax, aluguel acumulado 10y ~R$ 1,3M. Net renting: ~+R$ 500k. **Vence: comprar com alavancagem se investidor disciplinado.**
Takeaway: O cenário R$ 2,2M no novo teto SFH 2026 (subiu de R$ 1,5M em 2024) abre uma janela de alavancagem real para classe média alta no Brasil. O segredo é: financia o máximo (R$ 1,76M no SFH ainda com taxa 11% AA), mantém capital sobrante investido em renda fixa Selic (~14% líquido), e deixa a inflação trabalhar contra o saldo devedor. Funciona quando: (a) renda alta o suficiente para suportar parcela SAC inicial ~R$ 21k/mês, (b) disciplina financeira para NÃO consumir o capital investido, (c) horizonte 10+ anos, (d) appreciation razoável (5-6% AA).
Sensitivity — same home, vary appreciation 0% to 8%
Setup: Same R$ 1,5M imóvel, mesma entrada, mesma taxa 11%, mesma renda fixa 14%. Sweep appreciation de 0% a 8% AA. Mostra como break-even varia.
**Appreciation 0%:** break-even nunca; vantagem ano 30 = −R$ 1,2M (rent vence claramente). **Appreciation 2,7%:** break-even ano ~22; vantagem ano 30 = ~−R$ 200k. **Appreciation 5,3% (default BR):** break-even ano ~14; vantagem ano 30 = +R$ 350k. **Appreciation 8%:** break-even ano ~7; vantagem ano 30 = +R$ 1,3M. **Conclusão:** a recomendação é altamente sensível à premissa de valorização. 1 ponto percentual de appreciation a mais ou a menos move o break-even em 3-5 anos.
Takeaway: Sensitivity é o mais importante recurso desta calc. Concorrência (NYT, NerdWallet) entrega um número final como se fosse uma certeza. Esta calc força você a confrontar a fragilidade da decisão. Se sua recomendação só vence com appreciation 6%+ AA mas a média histórica de 100 anos é 0,2% real (Shiller), provavelmente você está sendo otimista. Use a janela de sensitivity para encontrar o ponto onde o break-even fica > seu horizonte planejado — ali está o risco real.
Practical tips — getting the assumptions right
- Use real-world appreciation data, not optimism. Shiller National Home Price Index averaged 0.2%/year REAL over 100 years (US). Local markets vary wildly — TX/FL/AZ post-2020 averaged 5-8%, Detroit/Cleveland averaged near zero. For BR, FIPE/ZAP IGV-M historical varies by region (Brasília Águas Claras ~5,5%, mas regiões saturadas ficam em 2-3%). Use the actual data for your zip code, not the national average.
- Adjust expected investment return to be realistic. US S&P 500 historical real return ~7% — but past 10 years was inflated (15%+ nominal). BR renda fixa Selic-linked is currently 13-14% but Selic has averaged ~10% historically. Don't anchor on the last 3 years.
- Run sensitivity on at least 3 variables. Appreciation, mortgage rate, and investment return are the big three. If your recommendation flips when ANY of them moves 2 percentage points, the recommendation is fragile — make a different decision based on lifestyle/qualitative factors instead.
- Account for transaction costs honestly. US selling costs 6% (NAR settlement may shift this in 2026), BR corretagem + ITBI of buyer + cap-gains tax can be 8-10% combined. If you may move within 5 years, transaction costs alone can erase 2-3 years of appreciation gain.
- Mortgage interest deduction often disappears below $750k mortgage + low SALT. 2026 OBBBA SALT cap is $40k, standard deduction $32,200 MFJ. For a $300k mortgage, year-1 interest ~$21k + property tax (capped at $40k) often does NOT exceed the standard deduction. Many homeowners "deduct" mortgage interest by checking the itemize box and end up worse off (lose other itemizations). The calc detects when itemize beats standard automatically.
- BR Lei 9.250/95 R$ 440k isenção applies once. If you sell your single (primary) home for ≤ R$ 440k AND have not sold another home in the last 5 years AND it was a residence, capital gain is fully exempt. Above R$ 440k or other conditions: 15% on gain (Lei 13.259/2016). Lei 11.196/05 reinvestimento 180 days zera IR — useful for "trade up" buyers.
- Quality factors matter when math is borderline. When buying advantage is < 10% of total cost, the recommendation is "borderline" — qualitative factors (mobility, stability, pets, customization) become tie-breakers. Don't force a financial framework on a non-financial decision.
- The 5x5 rule: If you may move within 5 years AND a 5% market downturn would force a sell, do NOT buy. Transaction costs alone can erase 5-10% of gain. Renting + investing is the safer bet for high-mobility scenarios.
Limitations and edge cases
ARM mortgages (US) and IPCA-indexed (BR) not modeled. Calc assumes fixed-rate. Adjustable-rate mortgages have a low intro rate then reset — completely different cash flow.
Refinancing not modeled. Most US homeowners refinance once or twice over 30 years. The calc projects original mortgage to maturity. Real-world refinances can shift the calc materially.
Real estate cycles not modeled. Calc uses constant appreciation. Real markets have cycles (2008 drop, 2021-2023 boom). For 30-year horizon, average should be reasonable; for 5-year, cycle timing is huge.
Health/family events not modeled. Forced sale due to job loss, divorce, illness can void the math. Buying assumes you stay; renting assumes flexibility — life events stress this.
Rent control / stabilization (NYC, SF, BR with Lei 8.245 reajuste limits) partial. Calc uses input rent_increase rate; doesn't model legal caps that may apply to your specific lease.
Forced savings (behavioral) not credited to buying. Some people who could not save the difference monthly DO build equity through the mortgage. Calc treats both scenarios as having full discipline. Real-world: many buyers never would have invested the diff.
No seasonality. Buying in winter US (slower market) typically gets discount; summer is premium. Selling reverse. Calc averages across the year.
Single-property only. Doesn't compare buying multiple smaller properties vs one large. Doesn't model house-hacking (rent rooms).
Frequently asked questions
Why does buying lose so often in this calculator?▾
Because the opportunity cost of the down payment + closing/ITBI is huge over 30 years at 7-13% expected investment return. NYT, NerdWallet, and similar calculators all show this — when you compare buying NET (equity − costs) against renting NET (invested portfolio − rent), the down payment opportunity cost is a heavy weight. Buying wins when appreciation > investment return + interest spread — which is rarer than people assume.
NYT shows different numbers — why?▾
NYT defers opportunity cost on recurring expenses to year 2 (a decision they made for UI clarity). This calc applies it from year 1 — more accurate technically but slightly more rent-favorable. Neither is wrong; we cite the methodology so you understand the difference.
How accurate is the year-by-year break-even?▾
Within ~5% on the dollar amounts assuming your inputs are right. The math is straightforward — it is the inputs that are the source of variance. Run sensitivity to understand which input matters most for your scenario.
Should I include or exclude my future kids in this analysis?▾
Strictly financially, no — the calc compares housing dollars. But qualitatively, having kids changes mobility (school district, friends), maintenance load (yards, more rooms), and stability needs. Use the calc for the financial baseline, then adjust based on family-stage.
What if I plan to refinance my mortgage in 5 years?▾
The calc does not model refi explicitly. As a workaround, run the calc twice: years 1-5 with current rate, years 6-N with refi rate, and combine. Or assume the refi will happen and use the blended rate as your input — pessimistic but easier.
Does this work for investment properties (not primary residence)?▾
Partially. Buying side computes correctly. Renting side assumes YOU rent the equivalent — not relevant for landlords. For investment-property analysis, use the calc with is_primary_residence=false (no §121 exclusion US, no R$ 440k isenção BR), but the "renting" arm becomes a thought experiment.
Why does the BR scenario default to 13% investment return?▾
Selic 14,75% (Mar/2026) makes renda fixa pós-fixada (Tesouro Selic, CDB DI) yield ~13-14% líquido. This is unusual historically (BR Selic averaged 10% over 20 years). Adjust if you expect Selic to drop. The "atypical 2026 BR" warning surfaces this.
How does the US itemize-deduction logic work?▾
Each year: compute mortgage interest deductible (capped at first $750k of loan principal) + property tax (capped at $40k SALT). If total itemized > standard deduction for your filing status, the EXCESS over standard × marginal_tax_rate is the net benefit. Below standard, benefit is zero. Many homeowners with low rates / low SALT do NOT benefit from itemizing.
What about the BR ganho de capital reinvestimento 180 dias?▾
Lei 11.196/05 — if you sell and buy another residential property within 180 days, the gain is fully exempt. Calc does not model this explicitly because it requires user behavior assumption. As a workaround, mark is_primary_residence=true if the home_price < R$ 440k (Lei 9.250/95 isenção applies), or accept the 15% calculation as upper bound.
Should I always run sensitivity mode?▾
Yes. The simple recommendation is fragile to assumptions. Sensitivity reveals: (a) which assumption dominates, (b) the break-even is robust or wobbly, (c) extreme scenarios. Use sensitivity for ANY decision involving R$ 100k+ / $100k+ at stake.
Why is the buying recommendation "rent_strong" for a $400k home with 4% appreciation?▾
Because 7% mortgage rate + 7% investment return + 4% appreciation makes the down-payment opportunity cost dominate over a 10-year horizon. Push appreciation to 6% (Sun Belt 2020-2024 averages) and the recommendation flips. The default "4%" matches Shiller historical national US — push higher only if local data supports it.
How does SAC compare to Price for break-even timing?▾
SAC pays principal faster early, less interest total. For BR R$ 500k @ 11% over 30 years, SAC saves ~R$ 165k in interest vs Price. This shifts buying net positive a few months earlier. The calc handles both — pick the system your bank actually uses.
Sources & references
Cross-check every number in this calculator against the primary sources below.
- ReferenceNYT Rent vs Buy Calculator (methodology benchmark)
- AcademicRobert Shiller — National Home Price Index
- OfficialIRS Publication 523 — Selling Your Home (§121 exclusion)
- OfficialIRS Publication 936 — Mortgage Interest Deduction
- OfficialTCJA / OBBBA SALT cap rules
- OfficialFederal Reserve — Mortgage Rate Data
- OfficialFreddie Mac — Primary Mortgage Market Survey
- OfficialBanco Central — Resolução CMN 4.881/2020 (financiamento imobiliário)
- OfficialLei 9.250/95 art. 23 — Isenção ganho capital R$ 440k
- OfficialLei 11.196/05 — Reinvestimento 180 dias
- OfficialLei 13.259/2016 — Alíquotas progressivas ganho capital
- OfficialCaixa Econômica — SFH 2026 (R$ 2,25M ceiling)
- ReferenceFIPE-ZAP — Índice de preços imobiliários BR
- ReferenceNAR — National Association of Realtors (selling cost data)
- OfficialReceita Federal — Ganho de Capital
Related calculators
Compound Interest
Calculate compound interest with monthly contributions. See how your money grows over time.
Mortgage
Calculate monthly mortgage payment, total interest, and amortization schedule. Compare Price vs. SAC systems.
Tip
Calculate tip amount, total bill, and per-person split — with smart rounding and regional tipping guidance.
Loan Calculator
Monthly payment, total interest and amortization schedule for personal, auto, or consumer loans.

