RSU-to-housing opportunity cost calculator
For tech professionals with vested equity, buying a home is primarily an opportunity cost decision. Compare the terminal wealth of liquidating shares for a down payment versus maintaining market compounding and renting.
Home equity net of 6% broker selling costs at Year 10, plus any compounded cash surpluses.
Portfolio after 33.1% terminal capital gains tax at Year 10.
Renting & investing yields $477,112 more terminal net worth than homeownership.
If the equity market compounds above -0.62%/yr, Path B (Renting & Investing) is superior.
Net Worth Horizon: Path A vs. Path B
Vested Equity & Liquidation Taxes
Model the net cash produced after liquidating your vested RSUs to fund a down payment.
What Drives This Result
Top factors ranked by their impact on the final opportunity cost gap when nudged ±2 percentage points.
A 2-point higher annual home appreciation adds $292,577 in equity, directly favoring Path A (Homeownership).
A 2-point increase in mortgage interest increases monthly debt service by raising ownership costs, shifting the gap by $230,736.
A 2-point higher market return changes the horizon gap by $161,384, favoring Path B (Renting & Investing).
How the model works
Every step evaluates verifiable financial equations without hidden adjustments or affiliate product incentives.
1Equity Liquidation & Capital Gains Tax Drag
When RSUs vest, their fair market value is taxed as ordinary compensation, establishing your cost basis. Liquidating for a down payment triggers capital gains tax only on the gain above that basis:
Tax_sale = Shares * max(0, Price_current - Basis) * Rate_capgainsWhere Rate_capgains includes federal LTCG (or ordinary rate if held ≤ 1 yr), state income tax, and the 3.8% NIIT surtax.
2Mortgage Debt Amortization
Monthly debt service follows the closed-form fixed-rate amortization equation:
PMT = P * [r(1+r)^n] / [(1+r)^n - 1]Remaining debt at month m evaluates to B_m = P * [(1+r)^n - (1+r)^m] / [(1+r)^n - 1], tracking the exact equity build-up curve.
3Net Cash Flow Differential
Total monthly ownership outlay includes mortgage P&I, property taxes, insurance, and maintenance. In each month:
Diff_m = (PMT + Tax_prop + Ins + Maint) - Rent_mWhen Diff_m > 0, the homeowner pays more, so the renter invests that exact difference into the market portfolio.
43-State Markov State Machine
Equity returns transition stochastically across three economic regimes: Bull (+14%), Sideways (+4%), and Bear (-18%):
P(S_{t+1} = j | S_t = i) = Matrix[i][j]A seeded PRNG evaluates 5,000 distinct paths, computing empirical 10th, 50th (median), and 90th percentile distributions.
Assumptions and limits
To keep the mathematical comparison disciplined and actionable, the model implements deliberate boundary conditions:
Property taxes, homeowner insurance, and maintenance reserves are calculated as percentages of the appraised home value each year, reflecting cost inflation over time.
To enable an apples-to-apples net worth comparison, Path A deducts a 6% selling commission at the horizon, and Path B deducts capital gains tax owed upon liquidating accumulated portfolio gains.
Path B assumes either continuous holding of employer stock or rolling liquidated proceeds into diversified index funds. Use the concentration haircut toggle to penalize single-company volatility.
The optional mortgage deduction toggle models tax relief only for deductions exceeding the federal standard deduction ($16,100 single, $32,200 married filing jointly). Deductible state and local tax (SALT) reflects the statutory 2026 cap of $40,400, phased down by 30% of MAGI over $505,000 (floored at $10,000). The cap reverts to $10,000 in 2030 under current law.*
Relocating between states alters both your net equity liquidation proceeds and ongoing monthly housing cash flows. You can compare state tax and living cost deltas across tech hubs to inspect how location shifts alter your baseline investable surplus.
Frequently asked questions
Should I sell my RSUs to buy a house or keep them invested?+
The decision depends on the spread between your expected equity returns and your mortgage interest rate, combined with local rental yields. Selling shares reduces how much you borrow, which lowers interest, but you still carry a mortgage unless the proceeds cover the full price. If your alternative rent is significantly lower than total ownership costs, investing that monthly spread often compounds to greater terminal net worth over a 10-year horizon.
How are vested RSUs taxed when sold for a down payment?+
When RSUs vest, their fair market value is already taxed as ordinary income, establishing your cost basis. When you subsequently liquidate those shares for a home down payment, you only pay capital gains tax on the growth above that vest price. If held longer than one year, gains are taxed at federal long-term capital gains rates (15% or 20%), plus state income tax and the 3.8% Net Investment Income Tax (NIIT) for high earners.
How does the 3-state Markov chain simulate market cycles?+
Rather than assuming a static annual return (such as a constant 8%), the Markov state machine simulates real-world market regime shifts across Bull (+14%), Sideways (+4%), and Bear (-18%) phases. Over 5,000 Monte Carlo paths, transition probabilities dictate how the market shifts from year to year, generating realistic percentiles (10th, 50th, and 90th) to show the distribution of potential outcomes for Path B.
What is the impact of the mortgage interest deduction?+
Under 2026 tax law (OBBBA 2025), itemized mortgage interest deductions apply to up to $750,000 of mortgage debt, and state and local tax (SALT) deductions are capped at $40,400 with a 30% phase-down for MAGI exceeding $505,000 (floored at $10,000). The cap reverts to $10,000 in 2030 under current law. Tax savings occur only when deductible interest plus capped SALT exceed the federal standard deduction ($16,100 single, $32,200 married filing jointly).
Why does single-stock concentration risk matter for Path B?+
Keeping your entire down payment in your employer company stock exposes you to idiosyncratic single-stock volatility and dual downside risk: if your company struggles, your investment portfolio drops at the exact time your compensation or job security may be vulnerable. Applying a concentration haircut (or modeling a diversified index portfolio) reflects the risk premium of holding concentrated shares.
Related Resources
Tech-Worker Relocation and State Tax Delta Simulator
Model how moving between high-tax and zero-income-tax states impacts take-home pay and investable surplus.
Compound Interest Simulator
Model exponential capital feedback loops with scheduled monthly additions and custom compounding intervals.
Loss Recovery Calculator
Calculate the percentage gain required to recover from a portfolio loss using the formula L / (1 - L).
CAGR Calculator
Calculate compound annual growth rates across historical multi-year investment horizons.
Fault-Tolerant: Margin of Safety & Asset Allocation
Engineering resilient portfolios with structural buffers to prevent catastrophic drawdowns.
How Loan Amortization Works Mathematically
Closed-form monthly mortgage payment derivation and principal-versus-interest amortization mechanics.