Random Thoughts

House Affordability Calculator: Know Your True Buying Power

A California-focused calculator that uses Monte Carlo simulation to determine your maximum home purchase price across three risk profiles

House Affordability Calculator: Know Your True Buying Power

TL;DR: Most home affordability calculators assume perfect predictability and ignore income volatility, reserve depletion, and compounding costs. This tool uses Monte Carlo simulation to show three risk-adjusted price points and helps you understand how renting versus buying costs evolve over 10, 30 years, though it doesn't model the opportunity cost of investing your down payment in the market instead (yet).

Why I built this

I was recently considering buying a house in California. The decision carries heavy emotional weight, especially given the prices here. I'd used several online calculators that all gave wildly different numbers, and none of them accounted for the reality that life doesn't follow a straight line. Income can fluctuate. Unexpected expenses happen. Markets don't move in predictable ways.

I wanted to approach this decision pragmatically, without emotions clouding the economics. Most affordability calculators answer the wrong question. They tell you "how much house can my income support" based on a simple ratio. But the real question is: "what's the maximum I can afford without putting my financial stability at serious risk over the next decade?"

That's what this tool answers. I hope it can help others in similar situations make clearer decisions when emotions might otherwise take over.

The problem with standard calculators

Traditional mortgage calculators have a fundamental flaw: they assume perfect predictability. They take your current income, apply a debt-to-income ratio (usually 28-36%), and spit out a number. But they ignore:

  • Income volatility: What if you have a bad year? What if your company does layoffs?
  • Reserve depletion: How long until you'd be in trouble if things went sideways?
  • Compounding costs: Property taxes, insurance, and maintenance don't stay flat
  • The difference between surviving and thriving: Just because you can make payments doesn't mean you should
  • Opportunity cost: What if you invested your down payment in the market instead?

This calculator addresses all of these by running 1,000 different scenarios and telling you the probability of various outcomes.

Understanding rent vs buy over time

One of the most valuable aspects of this calculator is seeing how your costs evolve over a 10-year horizon. When you enter your current rent, the tool shows you the relative economics of buying versus continuing to rent.

Here's what changes over time:

Renting:

  • Your rent increases with inflation (typically 2-3% annually)
  • You maintain full liquidity of your down payment and closing costs, which you can invest in the market at approximately 7% annual returns (see our Escape Velocity Simulator for detailed investment modeling)
  • No maintenance, property tax, or insurance costs
  • Maximum flexibility to relocate

Buying:

  • Your mortgage payment stays fixed (if you have a fixed-rate loan)
  • Property taxes increase slowly (Prop 13 limits annual increases to 2%)
  • Insurance and maintenance costs rise with inflation
  • Your down payment is locked in the property (opportunity cost)
  • You build equity, but it's illiquid

The cash flow chart in the calculator shows how your liquid assets evolve under each scenario. In early years, buying often looks more expensive due to closing costs and the down payment. Over time, as rent increases but your mortgage stays fixed, the economics can shift. The simulation helps you see when (and if) buying becomes financially advantageous in your specific situation.

This isn't just about whether you can afford a house. It's about understanding the relative cost of buying versus renting and how that relationship changes over a decade.

Three risk profiles, three prices

The calculator outputs three maximum purchase prices:

Conservative (Risk Score ≤25)

This is the "sleep well at night" number. You'll maintain six months of emergency reserves even in pessimistic scenarios. There's very low probability (<5%) of ever running out of cash. This is the right target if you have a variable income, work in a volatile industry, or simply value financial peace of mind over home size.

Neutral (Risk Score ≤45)

A balanced approach for most buyers. You'll maintain four months of reserves and have moderate probability of needing to adjust spending if things don't go as planned. This is a reasonable target if you have stable employment and some tolerance for financial variability.

Aggressive (Risk Score ≤65)

The maximum you can reasonably afford while still having a path to success. You'll need your income to grow roughly as expected, and you may need to cut discretionary spending in lean years. This is for buyers who are confident in their income trajectory and have high risk tolerance.

How the simulation works

Cost Model (California-specific)

The calculator includes all major housing costs:

  • Mortgage (P&I): Standard 30-year fixed amortization
  • Property Tax: 1.1% of purchase price annually (California Prop 13 baseline)
  • Homeowners Insurance: Default 0.35% annually (configurable due to recent volatility)
  • Maintenance: 1% of home value annually
  • PMI: 0.5% of loan amount annually if down payment is less than 20%
  • Closing Costs: 3% of purchase price upfront

HOA is explicitly excluded (this tool is for homes without HOA).

Monte Carlo Simulation

For each candidate price, the calculator runs 1,000 simulations of your financial future:

  1. Start with your liquid assets minus down payment and closing costs
  2. Each month, calculate cash flow: take-home pay minus housing costs minus other spending
  3. Each year, apply stochastic income growth (mean 3%, std 4%) and inflation to spending
  4. Track whether you ever run out of cash or dip below your reserve threshold
  5. Aggregate results across all simulations

Risk Scoring

The risk score (0-100) combines:

  • Cash shortfall probability: Chance of running out of money (heavily weighted)
  • Reserve breach probability: Chance of dipping below emergency fund
  • Payment burden: Housing costs as percentage of gross income

The calculator uses binary search to find the maximum price that keeps the risk score below each threshold.

How to use the calculator

  1. Enter your financial profile: Credit score (affects your rate), liquid assets, gross income, current rent, and annual non-housing spending

  2. Review loan parameters: The default 6.5% rate and 20% down payment are starting points. Adjust based on current market rates and your preferences

  3. Click "Calculate Affordability": The simulation runs in about one to two seconds

  4. Review all three price points: Don't just look at the aggressive number. Understand the tradeoffs

  5. Examine the cash flow chart: Toggle between profiles to see how your liquid assets evolve over the next 10 years

  6. Read the risk drivers: Each profile shows what's most likely to cause problems

California-specific assumptions

This tool is built for California primary residences:

  • Prop 13: Property tax is based on purchase price, not assessed value. The 1.1% rate includes the base 1% plus typical local assessments
  • No HOA: The model doesn't include HOA fees. If your target property has HOA, add those fees to your annual spending
  • Insurance volatility: California homeowners insurance has become expensive and hard to obtain. The 0.35% default may be low—adjust in advanced settings if you're in a fire-prone area

Pro tips

  • Start with Conservative: Use this as your primary target. You can always buy less house, but you can't easily undo an overextended purchase

  • Watch the 10-year chart: If your p20 line (pessimistic case) goes negative, that means in 20% of scenarios you'd run out of money. Compare the buying scenario to your current rent to see when the economics shift

  • Consider opportunity cost: Before buying, calculate what your down payment would be worth if invested. A $200,000 down payment invested at 7% annual returns would be worth roughly $400,000 after 10 years. That's real money you're giving up for homeownership

  • Adjust the rate: Interest rates change. Try running scenarios at current rates +1% to stress test your purchase

  • Be honest about spending: The biggest mistake people make is underestimating non-housing expenses. Include everything: food, transportation, entertainment, travel, gifts, subscriptions

  • Compare rent vs buy trajectories: Use the cash flow chart to see how your liquid assets evolve under buying versus continuing to rent. The crossover point (when buying becomes cheaper than renting) may be further out than you expect


Launch the calculator

🏠 Open calculator in full screen →

Important disclaimer

This calculator is for educational and planning purposes only. It is not financial, tax, or legal advice. The projections are based on assumptions that may not reflect your actual situation or future market conditions.

Key limitations:

  • Tax estimates are simplified: The model uses a rough 70% take-home approximation. Your actual tax situation may be different
  • No selling costs: This model doesn't account for the cost of selling if you move within 10 years (typically 6-8% of sale price)
  • Insurance availability: California's insurance market is challenging. Getting coverage at any price may be difficult in some areas
  • Market conditions: Property values, interest rates, and inflation are unpredictable
  • Opportunity cost of down payment: The calculator doesn't model what your down payment would be worth if invested in the stock market instead. If you're considering a $200,000 down payment, that money could potentially grow to $300,000+ over 10 years in the market (assuming 7% annual returns). This is a significant cost of buying that should factor into your decision, even though it's not explicitly modeled here

Always consult with qualified financial advisors, mortgage professionals, and real estate agents before making purchasing decisions.

Technical notes

The calculator runs entirely in your browser using JavaScript Web Workers. No personal data is transmitted to any server. All calculations happen locally on your device.

The source code implements:

  • Standard mortgage amortization formulas
  • Box-Muller transform for normally distributed random variables
  • Binary search for optimal price finding
  • Chart.js for visualizations

Questions or feedback?

If you have questions about the calculator or suggestions for improvements, please reach out.