Documentation
Understand how Torvani models the rent vs. buy decision, or integrate our analysis engine into your own application via the REST API.
Quickstart
Enter your housing scenario and get a rent vs. buy analysis in under 5 minutes.
Read moreUser Cost of Housing
How we calculate the true annual cost of ownership vs. renting using the Poterba framework.
Read moreMonte Carlo Simulation
10,000 scenarios varying appreciation, rent growth, maintenance, and investment returns.
Read moreNPV Breakeven Analysis
Discounted cash flow comparison to find the exact month buying becomes cheaper than renting.
Read moreTax Impact Modeling
Mortgage interest deduction, SALT cap, standard vs. itemized comparison, and capital gains exclusion.
Read moreSensitivity Analysis
Tornado charts showing which input variable has the largest impact on the rent vs. buy answer.
Read moreAPI Endpoints
/v1/calculate/v1/simulate/v1/locations/:zip/v1/market-data/:metro/v1/signup/v1/login/v1/account/v1/checkoutAuthentication
All API requests require an API key passed via the X-API-Key header.
curl https://torvani-api.smarttechinvest.com/v1/locations/90210 \ -H "X-API-Key: tor_your_api_key_here"
User Cost of Housing Model
Based on the Poterba (1984) framework, we compute the annual user cost of ownership as:
This is compared against the annual rent cost (monthly rent x 12 + renter's insurance) escalated at the local BLS CPI Shelter rate. The model captures the full economic cost of both options, not just the monthly payment.
Monte Carlo Simulation
Rather than a single point estimate, Torvani runs 10,000 simulated scenarios for each analysis. Each scenario draws from distributions calibrated to historical data:
- Home appreciation -- metro-specific distribution from FHFA HPI historical data
- Rent escalation -- distribution from BLS CPI Shelter component
- Maintenance costs -- fat-tailed distribution accounting for major repairs
- Investment returns -- historical S&P 500 return distribution for opportunity cost
The result is a complete cost distribution with expected cost, median, 5th percentile (best case), and 95th percentile (worst case) -- so you can make decisions based on your risk tolerance.
NPV Breakeven Analysis
We compute a discounted cash flow comparison of cumulative renting vs. buying costs over 1-30 year horizons. The breakeven point is the exact month where cumulative buying costs (including opportunity cost of the down payment) become lower than cumulative renting costs.
Using the Monte Carlo output, we report breakeven at multiple confidence thresholds: 50% (more likely than not), 75% (likely), and 90% (highly likely). This tells you not just when buying might be cheaper, but how confident you can be in that conclusion.
Tax Impact Modeling
Our tax model includes mortgage interest deduction, the $10,000 SALT cap, standard vs. itemized deduction comparison based on your filing status and income, and the $250K/$500K capital gains exclusion at sale. Many calculators assume you will itemize -- we compute whether itemizing actually saves you money vs. the standard deduction.
Sensitivity Analysis
Tornado charts show which input variable has the largest impact on your rent vs. buy answer. Typically the biggest drivers are time horizon, home appreciation rate, and mortgage rate -- but it varies by market and scenario.
Each variable is tested at +/- one standard deviation from its expected value while holding all others constant. This shows you where uncertainty matters most and where small changes can flip the recommendation.