- Mortgage gone
- Dec 2045
- Interest paid
- $304,619
- Tax on gains
- $0
- Net position
- $557,658
- Mortgage gone
- Sep 2045
- Interest paid
- $416,998
- Tax on gains
- $30,314
- Net position
- $577,807
- Mortgage gone
- Jul 2056
- Interest paid
- $510,172
- Tax on gains
- $0
- Net position
- $620,189
The race
Two ways to kill the same debt. The solid lines are what you still owe; the dashed line is what the invest arm's portfolio is worth after tax. Where the dashed line meets the orange solid line, the portfolio can buy the mortgage outright.
Net position over time
Portfolio after tax, minus whatever is still owed. The house is worth the same under every strategy, so it cancels out and never needs a guess about property prices. Below zero means the debt still outweighs the investments.
How it would have gone
The same plan, replayed against 841 overlapping 30-year windows of real market history — every starting month from Jul 1926 to Jun 2026. Your mortgage terms stay fixed; only the market varies. This is what the flat return above cannot tell you: a sequence averaging 8% is not the same bet as a steady 8%.
Read this before trusting the percentages. Overlapping windows are not independent samples — a century of data holds only about 3 genuinely separate 30-year periods, so “82.9%” is a description of the past, not a probability for your future. The worst run began Sep 1957, straight into the crash that followed, and left investing $185,713 behind. The backtest also assumes you keep buying through every crash and pull the trigger the month it fires; the historical win rate belongs to someone who never flinched.
Month by month
The full schedule behind the charts — the table view, for reading exact figures rather than eyeballing a line.
Should you pay off your mortgage early, or invest?
Every spare pound or dollar you put against a mortgage buys you a certain return: the interest you no longer owe, at exactly your mortgage rate, and untaxed, because you are not taxed on interest you never pay. Every one you invest buys you an uncertain return that is taxed when you sell it.
That is the whole trade. It is usually summarised as invest if you can beat your mortgage rate, and that rule of thumb is slightly wrong in a way that matters — it compares a taxed number against an untaxed one, and a risky number against a certain one.
The question has two answers
“Which is better” hides two different questions, and they can disagree. Which clears the debt sooner is about reaching a fixed target: the invest strategy has to grow a portfolio large enough to settle the whole balance, after tax, in one payment. Which leaves you richer is about compounding for as long as possible, and rewards carrying cheap debt rather than retiring it.
A strategy can lose the race and still win the money. That is why this calculator reports both, and solves for both breakeven rates separately.
Why the breakeven is above your mortgage rate
Two things push it up. Gains are taxed on the way out, so a portfolio has to earn more than the mortgage rate to deliver the mortgage rate. And the invest strategy keeps paying interest on the full balance while the portfolio grows, so it starts behind and has to catch up.
The size of the gap depends on your tax rate. At a 25% rate against a 3.5% mortgage, the return needed to win the race is around 4.2%, and the return needed simply to end up with more money is around 4.4% — both meaningfully above the 3.5% the rule of thumb would suggest.
The risk-free comparison most calculators skip
Before asking whether shares beat your mortgage, ask whether government bonds do. Prepaying is a guaranteed, untaxed return at your mortgage rate, so a taxable bond has to yield rate ÷ (1 − tax) just to match it. If real Treasury yields clear that bar, the mortgage is already beaten with no market risk, and the equity question never needs asking.
What a century of market history says
Averages hide the thing that actually decides this: sequence. A run of returns averaging 8% is not the same bet as a steady 8%, because the order in which the good and bad years arrive changes when — or whether — the portfolio can settle the debt.
So this tool replays your plan across every overlapping window of real US market history back to 1926, crashes included, and reports how often investing actually won rather than how often it should have. It also says plainly that overlapping windows are not independent samples: a century holds only a handful of genuinely separate thirty-year runs, so a win rate describes the past rather than predicting your future.
What this calculator does not decide for you
Two things no model can price. Money paid into a mortgage is locked in the house — you cannot sell three bricks in an emergency, so the strategy that wins on paper may be the one holding less cash when you need it. And every historical win rate assumes an investor who kept buying through the crash and sold on schedule. Most people do not. If a paid-off house lets you sleep, that is a real return this tool cannot measure.
Common questions
- Should I pay off my mortgage early or invest the money?
- It depends on your mortgage rate, your expected return, and your tax rate — and on which question you are actually asking. Prepaying earns a guaranteed return equal to your mortgage rate, untaxed. Investing earns an uncertain return that is taxed when you sell. If your after-tax expected return clears your mortgage rate you come out ahead on average, but not in every outcome, and not necessarily sooner.
- Is a low mortgage rate a reason not to pay it off early?
- Largely, yes. Prepaying a 3% mortgage earns you a certain 3%. If safe Treasuries yield more than that after tax, the mortgage is beaten without taking any market risk at all, and equities are a separate question on top. The lower the rate, the weaker the case for prepaying — which is why people who locked low rates are usually advised to keep them.
- Does investing pay off the mortgage sooner than prepaying?
- Often, but not always, and it needs a higher return than people expect. Prepaying attacks the balance from month one. Investing has to overcome compounding on the full loan and then pay tax on the gains before it can settle the debt in one payment. Those two effects mean the return needed to win the race is above the mortgage rate, not equal to it.
- What tax do I pay if I sell investments to clear my mortgage?
- Capital gains tax, on the gain only — not on the whole balance. That distinction matters: if a position is worth $300,000 against $120,000 of contributions, only the $180,000 gain is taxable. You also only need to sell enough to net the balance after tax, leaving the rest invested and compounding.
- Can I deduct mortgage interest, and does that change the answer?
- In some countries and situations, yes, and it does change the answer — a deduction lowers your effective mortgage rate, which makes prepaying less attractive and lowers the return investing needs to win. This calculator does not model deductions, so if you itemise and deduct mortgage interest, treat its breakeven rates as slightly too high.
- Is it risky to invest instead of paying off the mortgage?
- Yes, and the risk is not only about average returns. You are swapping a certain outcome for an uncertain one, and the order in which good and bad years arrive matters as much as the average. There is also a liquidity trade in the other direction: money paid into a mortgage is locked in the house, while an investment account can be reached in an emergency.
- What return do I need for investing to beat paying off the mortgage?
- More than your mortgage rate, because gains are taxed and mortgage interest here is not deductible. The calculator solves for two separate thresholds: the return needed to clear the debt sooner, and the higher-stakes one, the return needed to end up with more money. They are usually a few tenths of a percent apart.
- Does paying extra on a mortgage actually save much?
- It saves the interest that would have accrued on the principal you retired, which compounds over the remaining term and can be substantial. On a $562,000 balance at 3.5%, an extra $950 a month saves roughly $88,000 of interest and clears the loan more than seven years early. Whether that beats investing the same $950 is exactly what this tool works out.