Pay Down the Mortgage or Invest the Difference? The 30-Year Math With Real Tax Brackets
Vanguard's 1976-2024 dataset, BLS mortgage rate history, and IRS tax brackets give a precise answer. The 'guaranteed return' framing is wrong — here is the actual math.
The “should I pay off my mortgage early or invest?” question is supposed to be simple. The framing usually goes: “Your mortgage is a guaranteed 7% return — invest only if you can beat that.” That framing is wrong. Vanguard’s 1976-2024 return data, BLS inflation history, and IRS tax bracket effects together tell a more nuanced story — and the answer depends on your specific tax bracket, mortgage rate, and whether you itemize deductions.
This article runs the actual numbers using Vanguard’s S&P 500 historical return database, FRED’s mortgage rate series, and IRS 2024 tax brackets. The “guaranteed return” framing systematically over-recommends mortgage payoff. The corrected math points to invest in many cases.
The four numbers that determine the answer
You need four numbers to make this decision properly:
- Your mortgage interest rate (not APR — the rate component only)
- Your marginal tax rate (federal + state)
- Whether you itemize deductions (binary: yes or no)
- Your expected long-term portfolio return (after-tax)
The decision rule:
If
mortgage rate × (1 - tax rate × itemize_factor) > expected after-tax portfolio return, pay down mortgage. Else invest.
Where itemize_factor = 1 if itemizing, 0 if standard deduction.
This rule produces different answers depending on the inputs. Let’s walk through the cases.
Case 1: 7% mortgage, standard deduction, 22% bracket
Most homeowners since 2022 are in this case — rates spiked above 7% and most don’t itemize.
- Mortgage effective rate: 7% × (1 - 0) = 7%
- Expected S&P 500 real return (after 0.5% expense ratio + capital gains tax at 15%): ~6.0%
- Verdict: Pay down mortgage. 7% guaranteed beats 6% expected.
This is the “easy case” that produces the conventional wisdom advice. With high mortgage rates and no tax shield, paying down is mathematically correct.

Case 2: 4% mortgage (locked in 2020-2021), standard deduction
Many homeowners refinanced or bought between 2020-2021 at ~3% rates. Then prices and rates spiked. They’re now sitting on a generationally cheap mortgage.
- Mortgage effective rate: 4% × (1 - 0) = 4%
- Expected after-tax portfolio return: ~6.0%
- Verdict: Invest. The 6% expected return crushes the 4% guaranteed savings.
For these homeowners, paying off the mortgage early is leaving money on the table. Vanguard’s 2024 update of their long-term return data shows the S&P 500 has produced 7.0% real returns over the 1976-2024 window — well above any 3-4% mortgage. Don’t accelerate principal payments on a 3-4% mortgage. Keep the cheap debt; invest the would-be principal payment.
Case 3: 7% mortgage, itemizing, 32% bracket
High-income homeowner who itemizes (maybe due to high state tax + mortgage interest):
- Mortgage effective rate: 7% × (1 - 0.32) = 4.76%
- Expected after-tax portfolio return: ~5.5% (capital gains taxed at 20% for high earners)
- Verdict: Invest. 5.5% > 4.76% by enough to favor investing, especially given tax-advantaged account usage.
The mortgage interest deduction matters significantly here — it cuts the effective rate by nearly a third. Combined with high earner status, the math swings to investing.
Case 4: 4% mortgage, itemizing, 22% bracket
The dream scenario — locked-in low rate plus itemized deduction:
- Mortgage effective rate: 4% × (1 - 0.22) = 3.12%
- Expected after-tax portfolio return: ~6.0%
- Verdict: Invest. Effective mortgage rate is barely above inflation. This is essentially free money.
For homeowners with low rates AND itemized deductions, the mortgage is a tool, not a burden. The cheapest 30-year debt in your portfolio belongs to your home; pay the minimum, invest everything else.
The hidden variable: real returns vs nominal
Mortgage rates are nominal. Stock returns are reported in nominal terms but evaluated in real (inflation-adjusted) terms. A 4% nominal mortgage in a 3% inflation environment is a 1% real rate — practically free money over 30 years.
Vanguard’s 1976-2024 data shows the S&P 500 produced:
- Nominal annualized return: 11.0%
- Real annualized return (after inflation): 7.0%
So a 4% nominal mortgage vs 11% nominal stock return = 7-point gap. Even after taxes, the gap is 4-5 points. You’re paying 4% in increasingly cheaper inflation-adjusted dollars while earning 11% in nominal returns. That’s a powerful long-term equation.
The 30-year math: $200K extra principal vs $200K invested
Concrete example: $400,000 mortgage at 4%, 30-year fixed. You have an extra $200K available — should you pay down principal early or invest?
Path A: Pay down $200K extra principal
- Mortgage paid off in ~12 years (vs 30)
- Total interest saved: $108,000
- Cash freed up after year 12: $1,909/month (mortgage payment)
- If you invest the freed-up cash for years 13-30 at 7% real: ~$580,000 at year 30
- Total wealth at year 30: $580,000
Path B: Invest $200K, pay mortgage minimum
- $200K invested at 7% real for 30 years: $1,520,000
- Mortgage paid off naturally at year 30, $0 remaining
- Total wealth at year 30: $1,520,000
Path B produces $940,000 more in 30 years. Even in volatile-return scenarios (Vanguard’s worst 30-year periods produce 4-5% annualized), Path B still beats Path A by 30-50%.
The math is clear for a 4% mortgage. It’s much closer at 7% — which is why the framing changed in 2022-2024 as rates spiked.

When the conventional wisdom is right
Three scenarios where paying down the mortgage actually beats investing:
Scenario 1: Mortgage rate above 7% AND not itemizing
If your effective mortgage rate matches or exceeds expected after-tax stock returns, paying down is mathematically equivalent to or better than investing. The 2022-2024 rate environment created this for many borrowers.
Scenario 2: Within 5 years of retirement
Reducing required retirement income by eliminating mortgage payment can lower your “minimum viable retirement” income by $1,500-3,000/month. This makes Social Security + investment income go further. Closer to retirement, the asymmetric benefit of zero-debt retirement often beats marginal investing returns.
Scenario 3: You’d panic-sell during drawdowns
Vanguard’s behavioral research shows the average DIY investor underperforms the index by 1-2% annually due to selling at lows. If you’re someone who would sell during a 30% drawdown, your effective stock return is 5-6% (not 7%) — at which point the mortgage payoff math wins.
When the math AND psychology agree on investing
The clearest case for investing:
- 30-year fixed mortgage at 3-5% (locked in 2020-2022 or earlier)
- Standard deduction (no itemizing)
- Tax-advantaged retirement space NOT maxed (401(k), IRA, HSA)
- 15+ years until retirement
In this case, every extra dollar should go to tax-advantaged accounts before mortgage principal. Tax-advantaged space is irreversible — you can’t make 2025 401(k) contribution in 2030. Mortgage principal can be paid any time.

Decision flowchart
A simplified version of the analysis:
- Are you maxing 401(k) employer match? No → fix that first. Yes → continue.
- Are you maxing tax-advantaged accounts (IRA, HSA, max 401(k))? No → max those before mortgage. Yes → continue.
- What is your mortgage rate?
- Under 4%: Always invest. Don’t pay extra principal.
- 4-5%: Almost always invest. Edge case if you don’t itemize and panic-sell stocks.
- 5-6%: Run the math both ways. Either is reasonable.
- 6-7%: Likely pay down. Only invest if you itemize and are in 32%+ bracket.
- 7%+: Pay down. The math heavily favors guaranteed savings.
- Are you within 5 years of retirement? Add weight to mortgage payoff for non-financial reasons (sleep, fixed-cost reduction).
- Do you have 6+ months emergency fund? No → build that first regardless.
The bottom line
The “always pay off your mortgage” advice is wrong for the 30% of homeowners with sub-5% rates. It’s wrong for high-income earners who itemize. It’s wrong for anyone with maxed-out tax-advantaged accounts and 15+ years to retirement.
It’s right for high-rate mortgages without tax shield, for late-career homeowners, and for anyone who can’t tolerate stock market volatility.
Run your four numbers. The decision matters by hundreds of thousands over 30 years. The framing of “guaranteed return” is the easy answer; the actual answer requires looking at after-tax effective rates and real (inflation-adjusted) returns side by side.
The cheapest debt you’ll ever have is your home. The most expensive lesson is treating it like high-interest debt.