When to prioritize mortgage prepayment over taxable investing: a math-first guide

When to prioritize mortgage prepayment over taxable investing: a math-first guide

I remember the first time I ran the numbers for a friend deciding whether to throw extra cash at their mortgage or invest in a taxable brokerage account. The instinctive reactions — "pay off the mortgage, you're getting a guaranteed return" vs "the market returns 7–10% long term, so invest" — felt unhelpful without math. So I built a simple framework that strips emotion and politics out of the decision and focuses on after-tax, risk-adjusted, and liquidity-aware returns. Below I walk you through that framework so you can run the same tests for your situation.

Key variables to pin down before you do the math

Before any calculation, get clear on these inputs. In many cases the decision is simply comparing a handful of numbers:

  • Current mortgage interest rate (nominal APR).
  • Mortgage tax benefit — the effective savings if you itemize mortgage interest (or if the mortgage interest is not deductible in your jurisdiction, set this to zero).
  • Expected pre-tax return on taxable investments — reasonable long-term assumptions (e.g., 6–8% for a diversified stock/bond mix) or your expected portfolio return.
  • Effective tax rate on investment returns in a taxable account — consider dividend tax rate, long-term capital gains tax, and the portion of returns that are qualified vs ordinary.
  • Time horizon — how long you plan to keep investing vs prepaying.
  • Risk tolerance and liquidity needs — emergency fund, access to cash, career risk.
  • The math-first comparison: after-tax yield vs after-tax mortgage cost

    Here's the conceptual core: compare the after-tax expected return of investing in a taxable account to the after-tax interest cost of your mortgage. If the expected after-tax investment return exceeds the after-tax mortgage rate, investing looks better on a math basis; if not, prepaying the mortgage is preferable.

    Two simple formulas:

  • After-tax mortgage cost = mortgage rate × (1 − mortgage interest tax deduction rate)
  • After-tax expected investment return = expected pre-tax portfolio return × (1 − effective tax rate on portfolio returns)
  • Example: 4% mortgage, you itemize and effectively save 20% of interest through deductions (so deduction_rate = 0.20). Expected pre-tax return on a taxable portfolio = 7%. Effective tax rate on portfolio returns = 15% (mix of qualified dividends and long-term capital gains).

  • After-tax mortgage cost = 4% × (1 − 0.20) = 3.2%
  • After-tax investment return = 7% × (1 − 0.15) = 5.95%
  • In this scenario, investing in the taxable account has a higher expected after-tax return than prepaying the mortgage.

    Important nuances that change the math

    Real-life decisions need more than a single-line comparison. Here are factors that materially alter the conclusion.

  • Mortgage interest deduction rules: Many borrowers no longer itemize because of standard deduction increases. If you don't itemize, the mortgage deduction is effectively zero — making prepayment relatively less expensive (i.e., the after-tax mortgage rate equals the nominal rate).
  • State and local taxes affect both the mortgage deduction value and the tax on investment returns. If you live in a high-tax state, mortgage interest deduction (if applicable) is more valuable, but so is the tax drag on your investments.
  • Tax-efficient investing strategies: Holding tax-inefficient assets (bonds, REITs) in taxable accounts increases your effective tax rate. Using tax-efficient funds (Vanguard ETFs, tax-managed funds at Fidelity) and harvesting losses can bring the taxable effective rate down, making investing relatively more attractive.
  • Employer match and tax-advantaged accounts: Maxing out 401(k) match or funding IRAs/Roths is almost always a higher priority than both mortgage prepayment and taxable investing. A 50% match is an immediate 50% return on contributions — an unbeatable guaranteed return.
  • Practical thresholds — a quick rule of thumb

    Based on the simple model, here are actionable thresholds I use when advising clients:

  • If your after-tax mortgage cost is above ~4% — consider prepayment more strongly, especially if you dislike market volatility.
  • If your after-tax investment return is above your after-tax mortgage cost by 1 percentage point or more, prefer investing (assuming no pressing liquidity needs).
  • If difference is within ~1% — the decision should lean on personal preference: do you value guaranteed debt freedom more, or potential higher returns and liquidity?
  • Worked example with a small table

    Let's compare three scenarios (numbers rounded for clarity).

    ScenarioMortgage rateMortgage deduction effectAfter-tax mortgage costExpected pre-tax invest returnEffective tax on investmentsAfter-tax invest return
    A3.5%0% (no itemize)3.5%7%15%5.95%
    B4.5%20%3.6%6.5%20%5.2%
    C5.0%0% (no itemize)5.0%7.5%25%5.625%

    Interpretation:

  • Scenario A: investing wins (5.95% vs 3.5%).
  • Scenario B: investing still wins (5.2% vs 3.6%), though margin shrinks because higher tax on investments and lower expected returns.
  • Scenario C: prepaying wins (5.0% mortgage cost vs 5.625% expected invest return might look like investing wins, but after accounting for volatility preferences and fees, many would still choose to prepay). This is a gray area where preference and risk aversion matter.
  • Other practical considerations beyond the pure math

    Even when the math leans one way, other factors often move people in the opposite direction. I always ask clients to check these:

  • Emergency liquidity: If prepaying the mortgage depletes your emergency fund, don’t do it. Cash reserves beat both investing and mortgage prepayment when it comes to avoiding financial ruin.
  • Psychology and utility: For many, the utility of being mortgage-free is worth a lower expected return. That emotional value matters and is rational to include in your decision calculus.
  • Portfolio diversification: Prepaying a mortgage is a forced, low-volatility investment in yourself and your home. It reduces leverage and can improve overall portfolio volatility characteristics.
  • Other debts: High-interest consumer debt (credit cards, personal loans) should almost always be paid off before either prepaying a mortgage or investing.
  • Refinance opportunities: If you can refinance to a materially lower rate, the attractiveness of prepayments changes. Low rates reduce the marginal benefit of prepaying.
  • How I run the numbers quickly

    I keep a small spreadsheet with inputs for: mortgage rate, deduction rate, expected portfolio return, effective tax on gains, and an emergency cash buffer. It computes the two after-tax percentages and shows the spread. For readers, free tools like the Vanguard tax-efficient portfolio calculators or simple templates in Google Sheets work well. If you want, I can share a basic template you can drop your numbers into.

    Finally, remember: this is a decision between two good uses of cash. The goal is to prioritize in the order that maximizes your after-tax wealth while respecting your risk tolerance and life goals. Run the numbers, check the caveats above, and choose the path that fits both your spreadsheet and your peace of mind.


    You should also check the following news:

    Personal Finance

    Can a high-yield savings account replace short-term bond funds for emergency cash

    02/12/2025

    I get asked all the time whether a high-yield savings account can replace short-term bond funds as the place to park emergency cash. The short answer...

    Read more...
    Can a high-yield savings account replace short-term bond funds for emergency cash
    Portfolio Strategies

    What a 70/30 real estate-to-equity allocation looks like for early retirees

    02/12/2025

    I retired early with a significant portion of my net worth in property and a smaller — but still meaningful — allocation to equities. Over the...

    Read more...
    What a 70/30 real estate-to-equity allocation looks like for early retirees