Rent vs. Buy Calculator
compare_rent_vs_buyCalculation, not advice. Verify with a professional before acting. Deterministic rent-vs-buy decision model. Given a home price, monthly rent, and mortgage rate, computes the breakeven month (when BUY net worth first equals or exceeds RENT net worth), per-horizon net-worth comparison (years 5, 10, 30 + user horizon), and the full year-by-year cost/wealth series for both paths.
Includes carrying costs (property tax, insurance, maintenance, PMI, HOA) on the BUY path and opportunity-cost investing on the RENT path.
Optional federal tax benefit model (Tier-3: apply_tax_benefit=true) with the statute's year-by-year SALT cap schedule (advancing with the horizon, not frozen at tax_year), mortgage interest deduction, PMI deductibility, and marginal-excess formula.
All assumptions cite primary sources (FHFA, BLS, Harvard JCHS, IRS Pub 936, OBBBA Pub. L. 119-21) and can be overridden.
Pick this for the buy-vs-rent tenure decision; pick compare_mortgage_terms when you are already buying and comparing two mortgage structures, compare_payoff_strategies to order credit-card payoff, and compare_payoff_vs_invest to weigh extra debt payments against investing.
HEAVY tool: use output='summary' (default) for scalar headline or output='inline' for chart series.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | No | Valid values: 'summary' (default), 'inline'. 'summary' returns headline scalars and per-horizon snapshots with the heavy series stripped. 'inline' returns the full payload including yearly_series[] and monthly_series[] for chart rendering. | |
| pmi_pct | No | Annual PMI rate as a percentage of the loan. Decimal from 0 to 5. Optional; defaults to 0.5% when omitted. The removal threshold is set by pmi_removal_ltv_pct. | |
| tax_year | No | Tax year for year 1 of the horizon: 2025 or 2026. Integer. Required when apply_tax_benefit is true; otherwise not used. Horizon year y uses tax year (tax_year + y - 1) on both the tax benefit and the sale-side capital-gains tax; the SALT cap follows the statute's own schedule for that year, and every other indexed amount holds at its last-loaded table value beyond it. | |
| charitable | No | Charitable contributions. Decimal from 0 to 1,000,000,000; TY2026 and later apply a 0.5%-of-AGI floor per OBBBA §70425. Only used when apply_tax_benefit is true. Optional; defaults to 0 when omitted. | |
| home_price | Yes | Home purchase price. Decimal, greater than 0 and at most 1,000,000,000. REQUIRED, no default. | |
| pmi_annual | No | Annual PMI premium in dollars while PMI is active. Decimal from 0 to 1,000,000,000. Only used when apply_tax_benefit is true. Optional; when omitted it is derived from pmi_pct and the original loan amount. | |
| real_terms | No | Whether to deflate the output series to a real-terms view. Optional; defaults to false when omitted. | |
| blind_count | No | Number of blind filers, each adding the additional standard deduction. Integer from 0 to 2. Only used when apply_tax_benefit is true. Optional; defaults to 0 when omitted. | |
| chart_title | No | Override for the chart title. Must not contain em-dashes or en-dashes. Max 120 characters. Optional. | |
| hoa_monthly | No | Monthly HOA dues on the BUY path. Decimal from 0 to 1,000,000,000. Optional; defaults to 0 when omitted. | |
| monthly_rent | Yes | Monthly rent on the RENT path. Decimal from 0 to 1,000,000,000; 0 is valid (a free-housing baseline). REQUIRED, no default. | |
| filing_status | No | Tax filing status: 'Single', 'MFJ', 'MFS' or 'HoH'. Required when apply_tax_benefit is true; otherwise not used. | |
| horizon_years | No | Projection horizon in years. Integer from 1 to 40. Optional; when omitted, the response returns snapshots at years 5, 10 and 30. | |
| inflation_pct | No | Inflation as a percentage, for the real_terms toggle. Decimal, at least 0 and less than 100. Optional; when omitted, a nominal run uses 2.5%, and a real_terms run uses the horizon-based default: 2.0% for a horizon of 7 years or less, 2.6% for 8 to 19 years, 2.5% for 20 years or more. | |
| sell_side_pct | No | Sell-side transaction cost as a percentage of the sale price. Decimal from 0 to 25. Optional; defaults to the cited 7.5% (Redfin post-NAR) when omitted; override for your market. | |
| maintenance_pct | No | Annual maintenance as a percentage of home value. Decimal from 0 to 20. Optional; defaults to the cited 1.5% (Harvard JCHS) when omitted; override for your market. | |
| rent_growth_pct | No | Annual rent escalation as a percentage. Decimal from -50 to 50. Optional; defaults to the cited 3.4% (BLS CPI ROPR) when omitted; override for your market. | |
| state_local_tax | No | State and local tax paid (state income or sales tax), for the SALT cap. Decimal from 0 to 1,000,000,000. Only used when apply_tax_benefit is true. Optional; defaults to 0 when omitted. | |
| down_payment_pct | No | Down payment as a percentage of the home price. Decimal from 0 to 100; 0 is valid (zero-down programs). Optional; defaults to 20% when omitted. | |
| loan_term_months | No | Mortgage term in months. Integer from 1 to 480. Optional; defaults to 360 (a 30-year fixed) when omitted. | |
| other_itemizable | No | Other itemizable deductions, such as medical expenses above 7.5% of AGI or casualty losses. Decimal from 0 to 1,000,000,000. Only used when apply_tax_benefit is true. Optional; defaults to 0 when omitted. | |
| property_tax_pct | No | Annual property tax as a percentage of home value. Decimal from 0 to 10. Optional; defaults to 0.88% when omitted; override for your market. | |
| age_65_plus_count | No | Number of filers aged 65 or older, each adding the additional standard deduction. Integer from 0 to 2. Only used when apply_tax_benefit is true. Optional; defaults to 0 when omitted. | |
| apply_tax_benefit | No | Whether to apply the federal tax benefit model (SALT cap following the statute's year-by-year schedule, mortgage interest deduction, PMI deductibility). When true, filing_status, tax_year and annual_gross_income are required. Optional; defaults to false when omitted. The §121 home-sale gain exclusion applies only at sale points 24 months or more after purchase (IRC §121(a) 2-of-5-year test); year 1 of yearly_series, months 1-23 in monthly_series, and any horizon under 24 months use no exclusion. Separately, IRC §1222(3) makes a holding period of 12 months or less short-term, taxed at ordinary rates instead of the long-term rates otherwise applied, on the home-sale gain and the renter's portfolio gain alike (24 months vs. 12 months are two different thresholds); this tool applies that split exactly to the home-sale gain, and to the renter's portfolio at annual grain: prior years' contributions are compounded together as one long-term lot rather than aged individually, so months inside a year understate short-term gain. | |
| mortgage_rate_pct | Yes | Mortgage annual rate as a percentage, e.g. 6.75 for 6.75%. Decimal, greater than 0 and at most 100. Never cached; provide the current rate. REQUIRED, no default. | |
| home_insurance_pct | No | Annual home insurance as a percentage of home value. Decimal from 0 to 15. Optional; defaults to 0.65% when omitted; override for your market. | |
| annual_gross_income | No | Annual gross income, the MAGI proxy for the bracket and the SALT cap. Decimal from 0 to 1,000,000,000. Required when apply_tax_benefit is true; otherwise not used. | |
| pmi_removal_ltv_pct | No | Loan-balance trigger for PMI removal, as a percentage loan-to-value. Decimal from 50 to 100. Optional; omitted, it is the 78% HPA automatic-termination threshold; provided (e.g. 80), it is whichever of 78% or your value is reached first. The rejection guard applies only when down_payment_pct is below 20 and the resolved pmi_pct is above 0, the range where PMI applies: there, a value at or above the loan's own initial LTV is rejected, because the requested removal point would already be met at the first payment, so no PMI would be modeled for any month of the loan. When the resolved pmi_pct is 0, or down_payment_pct is 20 or more, no such check runs, whatever the LTV. Either way PMI also stops at the statutory amortization midpoint of the original term (12 U.S.C. §4901(7), §4902(c)), which this value cannot postpone. | |
| purchase_year_points | No | Discount points paid at origination, as a percentage of the loan. Decimal from 0 to 4. Counted as cash paid at closing on every call; when apply_tax_benefit is true they are also deducted in year 1. Optional; defaults to 0 when omitted. | |
| home_appreciation_pct | No | Annual home price appreciation as a percentage. Decimal from -50 to 50. Optional; defaults to the cited 4.25% (FHFA HPI) when omitted; override for your market. | |
| investment_return_pct | No | RENT path annual return as a percentage, an EFFECTIVE ANNUAL rate; the monthly compounding step is (1+pct/100)^(1/12)-1. Decimal from -50 to 30. Optional; defaults to 10.0% when omitted. | |
| loan_origination_date | No | Mortgage origination date, YYYY-MM-DD. Selects the mortgage interest deduction cap: on or before 2017-12-15 the $1M cap, after it the $750k cap (Single and MFJ; MFS caps are half). Only used when apply_tax_benefit is true. Optional; omitting it uses the post-2017 cap. | |
| basis_capitalizable_pct_override | No | Percentage of the buy-side closing cost that is capitalizable into the §121 adjusted basis (IRS Pub 523 split: abstract fees, title search, recording fees, survey fees, transfer taxes, owner's title insurance). Decimal from 0 to 100; 0 means a HomePrice-only basis, 100 means the full closing cost is in basis. Optional; defaults to 50% (Senaro deterministic midpoint) when omitted. Supply your actual HUD-1 split when available. |