AppTube
Rent vs Buy Calculator

Rent vs Buy Calculator

Make informed housing decisions with 30-year financial projections, 10,000 Monte Carlo simulations, real SPY market data, and multi-jurisdiction tax modeling.

Data Analysis
Free

About

The Rent vs Buy Calculator is a cross-platform financial analysis tool that models the 30-year net-worth outcome of renting vs. buying a home, with optional investment of freed capital into SPY (S&P 500 ETF) using actual historical daily prices.

Platforms

  • Web — Multiple iterations: Next.js 15 + Recharts, Vite + Chart.js, Next.js + Turbopack. Deployed on Vercel.
  • iOS & Android — Flutter native mobile app (v1.2.4). Full Monte Carlo support with fl_chart visualizations. Published to App Store and Google Play.

Financial Modeling

  • 30-year projections — Month-by-month amortization schedules, property tax, insurance, HOA, maintenance, rent growth, and cumulative spending analysis.
  • Real SPY historical data — Serverless API route fetches split-adjusted daily prices from Stooq, models actual market returns for the invested-capital scenario.
  • Multi-jurisdiction tax engine — Automated bracket calculations for NJ realty transfer tax (6 tiers, 0.4%–1%), NYC mansion tax (8 tiers, 1%–3.9%), NYC/NY transfer taxes, and mortgage recording taxes. Location heuristics auto-select the right rules.
  • Tax-optimized calculations — Mortgage interest deductions with standard-deduction threshold logic, Section 121 capital gains exclusion ($250k/$500k primary residence), and state/local tax impact.
  • IRR and CAGR — Internal Rate of Return (Newton's method) and Compound Annual Growth Rate analysis for the buy scenario.

Monte Carlo Simulation Engine

Runs 10,000 simulations per calculation. Uses the Box-Muller transform to generate normally-distributed random variables across 5 key parameters simultaneously: home appreciation rate (σ=2%), mortgage rate (σ=1%), rent growth (σ=1%), investment returns (σ=3%), maintenance costs (σ=0.5%). Outputs win-probability percentages, 25th/50th/75th percentile distributions, and outcome histograms.

On mobile (Flutter/Dart), the Monte Carlo loop runs asynchronously via microtask scheduling to avoid UI freezing.

Engineering Highlights

  • Shared financial logic across platforms — Core calculation algorithms ported from TypeScript (web) to Dart (mobile) with identical results. Both implement interest-only mortgage support with amortization transitions, FIFO lot tracking, and cumulative CUMIPMT/CUMPRINC accounting.
  • Cross-platform Monte Carlo — Same statistical model runs in both the browser (TypeScript) and Flutter (Dart), with async/microtask patterns to keep the UI responsive during 10k-iteration loops.
  • Multiple web iterations — The project was rebuilt 4+ times with different stacks (Next.js 15, Vite, Turbopack) as new frameworks released, demonstrating stack migration experience.

Deployment

Web on Vercel with automatic preview deployments per branch. Flutter apps on App Store and Google Play.

Reviews (0)

No reviews yet.