Mortgage Timing & Amount Optimizer

Fill inputs → it simulates monthly cashflows, tries purchase month + LTV range, and finds the best plan by your chosen objective.
Language:
Theme:

Objective

Real = inflation-adjusted Housing burden = housing cost ÷ income
Choose what "best" means to you. Different objectives lead to different optimal strategies based on your financial priorities.
Maximize Net Worth
Wealth building focus
Best for: Long-term wealth accumulation. Choose this if your main goal is to maximize total assets at the end of the horizon.

How it works: Calculates cash + investments + home value − mortgage balance, adjusted for inflation. Rewards strategies that build equity and grow investments.
Minimize Cash Outflows
Liquidity focus
Best for: Cash flow comfort and liquidity. Choose this if you want to minimize total money leaving your pocket over time.

How it works: Counts all outflows: rent, mortgage payments, ownership costs, down payment, and fees. Down payment counts as outflow even though it builds equity — this is intentional for a liquidity perspective.
Minimize Housing Cost
True cost focus
Best for: Understanding true cost of housing. Choose this to compare rent vs buy without counting equity building as "spent".

How it works: Counts rent + current ownership costs (before buying), interest + new house ownership costs (after buying), and fees. Principal repayment is NOT counted as cost since it builds equity. Subtracts terminal equity at horizon.
Minimize Payment Stress
Safety focus
Best for: Maximum payment safety and stress reduction. Choose this if you want to avoid high monthly payment burden at any point.

How it works: Finds the plan with the lowest worst-case monthly burden (housing cost ÷ income) across the entire horizon. Prioritizes stability over optimization.
Maximize Liquid Wealth
House as passive
Best for: When the house is for living, not an investment you'd ever sell. Maximizes accessible/investable wealth only.

How it works: Calculates cash + investments at horizon, adjusted for inflation. Home value is completely ignored — the house is treated as consumption, not an asset. Mortgage debt is also ignored (tied to the house).
Liquid Wealth Net of Debt
House passive, debt real
Best for: When the house won't be sold but the mortgage is real debt you must account for.

How it works: Calculates cash + investments − mortgage balance at horizon, adjusted for inflation. Home value is ignored, but mortgage debt counts against you as a real liability.

Inputs

Expected annual inflation rate. Used to: (1) convert future values to "today's money" (real terms), and (2) grow ownership costs over time. Higher inflation means future money is worth less. Typical range: 2-5%.
Your total monthly income (after tax). This is assumed constant in nominal terms throughout the simulation. Used to check affordability and calculate housing burden ratios.
Total savings you have today (cash + investments combined). This is your starting capital that can be used for down payment, fees, and ongoing expenses. Split between cash and investments based on "Invested share" below.
What percentage of your current savings is invested (stocks, bonds, etc.) vs held as cash. Invested portion grows at the investment return rate. Cash portion earns 0%. Example: 80% means 80% invested, 20% cash.
Expected annual return on your invested savings. This is the growth rate applied monthly to your investment portfolio. Historical stock market average is ~7-10%. Be conservative for planning.
What percentage of your remaining cash at end of each month gets invested. 100% = all remaining cash goes to investments. 0% = all stays as cash. Applied after paying all expenses (housing + non-housing).

Current market price of the apartment you're considering. This grows over time at the "Apt price growth" rate. The actual purchase price depends on when you buy.
Expected annual appreciation of the apartment's value. Affects both the purchase price (if buying later) and your home equity over time. Historical real estate appreciation varies by location (typically 2-6%).
Your current monthly rent payment. This is the cost you pay while renting (before buying). Grows at the "Rent growth" rate. Buying eliminates this cost but introduces mortgage + ownership costs.
Expected annual increase in rent. Often tracks inflation or slightly above. Higher rent growth makes buying more attractive sooner. Typical range: 2-5% depending on market.
Monthly ownership costs you pay NOW while renting (if any). Usually 0 for renters. Only set this if you currently own something with ongoing costs. Grows with inflation.
Monthly costs of owning the NEW house after purchase: HOA/condo fees, property tax, insurance, maintenance reserve, repairs. These are ON TOP of mortgage payment. Grows with inflation. Often 0.5-1.5% of home value annually.
All your other monthly expenses: food, transport, utilities, entertainment, subscriptions, etc. Everything except housing costs. Assumed constant in nominal terms (simplification).

Annual interest rate on the mortgage loan. Fixed for the entire loan term (no refinancing modeled). Lower rates = lower monthly payments and total interest paid. Check current market rates.
Length of the mortgage in years. Common terms: 15, 20, 25, or 30 years. Longer term = lower monthly payment but more total interest paid. Shorter term = higher payment but less interest overall.
One-time purchase costs as percentage of apartment price: stamp duty, legal fees, agent commission, registration, etc. Varies by country/region. Typically 1-5%. This is a sunk cost (not recoverable).
Fixed one-time purchase costs that don't scale with price: flat legal fees, inspection costs, moving expenses, etc. Added on top of percentage-based fees.
How far into the future to consider buying (in months). The optimizer will test purchase at month 0, 1, 2, ... up to this limit. Larger = more options searched but slower calculation. 120 months = 10 years.
How many years to simulate for each strategy. The objective (net worth, costs, etc.) is evaluated at this horizon. Longer horizon captures more of the mortgage payoff. Typically 10-30 years.
Minimum Loan-to-Value ratio to consider. LTV = loan amount ÷ property price. Lower LTV = larger down payment, smaller loan. 50% LTV means borrowing half the price, paying half upfront.
Maximum Loan-to-Value ratio to consider. Higher LTV = smaller down payment, larger loan. 90% LTV means borrowing 90% of price, only 10% down. Banks often cap LTV at 80-90%. Higher LTV may require mortgage insurance.
Increment for testing different LTV values. With min=50%, max=90%, step=5%, the optimizer tests: 50%, 55%, 60%, 65%, 70%, 75%, 80%, 85%, 90%. Smaller step = more precision but slower.
Maximum allowed housing payment (mortgage + ownership costs) as percentage of income. Strategies exceeding this are rejected as infeasible. Banks often use 30-40%. Higher cap = more aggressive strategies allowed.

Best plan

"Purchase month 0" means "buy now". Month numbers count from today.

Objective vs purchase month (best LTV per month)

For each month, the script picks the best LTV (loan amount) within your LTV range that is feasible & affordable. Search months are capped to the simulation horizon.

Net worth over time (best plan)

Real net worth line (inflation-adjusted). Hover chart for values.

Cashflow snapshot (best plan)

Monthly housing cost and housing burden over time.

Assumptions

  • Mortgage is a fixed-rate annuity loan (constant nominal payment).
  • Investments compound monthly at your investment return.
  • Rent, ownership costs, and home value grow with your chosen annual rates.
  • At purchase, down payment + fees are paid from cash first, then investments (instant liquidation, no tax/penalty).
  • Affordability cap checks (mortgage payment + ownership costs) vs the chosen % of income.