Skip to content
MoneyDeck

Pay Off Mortgage or Invest Calculator

Should extra cash go to your mortgage or the market? Compare both

Updated · US rules · Free, no signup

$
%
yrs
$
%

Average yearly return after fees.

%

Long-term capital gains rate; use 0 for a Roth or other tax-free account.

Investing advantage

−$768.94

After-tax portfolio from investing minus prepaying at the end of the original term. Negative favours prepaying.

Better strategy

Prepay the mortgage

Invest path — portfolio (after tax)

$366,780.47

Prepay path — portfolio (after tax)

$367,549.41

Mortgage paid off in (prepay path)

15 yr 11 mo

Mortgage interest saved by prepaying

$125,588.47

Break-even investment return

7.02%

Regular mortgage payment

$2,025.62

  • Prepaying clears the mortgage 9 yr 1 mo early and saves $125,588 in interest — a guaranteed 6.5% return.
  • Investing wins only if you earn more than about 7.02% a year after fees, given 15% tax on gains.

Net worth (investments − mortgage) by year

Net worth by year

YearInvest path net worthPrepay path net worthDifference
1−$288,850−$288,865$15.00
2−$276,921−$276,984$63.00
3−$264,158−$264,307$149.00
4−$250,501−$250,781$280.00
5−$235,890−$236,350$460.00
6−$220,257−$220,951$694.00
7−$203,529−$204,522$993.00
8−$185,632−$186,992$1,360
9−$166,482−$168,289$1,807
10−$145,992−$148,333$2,341
11−$124,068−$127,040$2,972
12−$100,609−$104,321$3,712
13−$75,508−$80,081$4,573
14−$48,651−$54,217$5,566
15−$19,912−$26,621$6,709

About the Pay Off Mortgage or Invest Calculator

This calculator answers a classic question: should you put extra money toward your mortgage or invest it? It follows the same monthly budget down two paths. In the first, the extra goes to principal until the mortgage is gone, and then the whole former payment plus the extra is invested. In the second, you keep the regular mortgage and invest the extra from day one. Both paths spend exactly the same amount each month, so the net worth at the end of the original term is a fair comparison.

It is for homeowners with spare cash flow who want a numbers-based answer, and for anyone weighing a guaranteed return (the mortgage rate you avoid) against an uncertain market return. The break-even return shows the investment return you would need to beat prepaying; if you are not confident of earning more than that after tax, paying down the mortgage is the safer choice.

Returns are assumed constant and compounded monthly, and a flat capital gains tax rate is applied to investment gains at the end. Tax-advantaged accounts (401(k), IRA) would change the result, as would the mortgage interest deduction if you itemize.

With the default inputs, the investing advantage is −$768.94. Change any value above to recalculate instantly.

How to use the pay off mortgage or invest calculator

  1. 1Enter your current mortgage balance, rate and years remaining.
  2. 2Enter how much extra cash you can put aside each month.
  3. 3Enter a realistic long-run investment return after fees.
  4. 4Set the tax rate on investment gains (0 for tax-free accounts).
  5. 5Compare the after-tax results and the break-even return before deciding.

Formula and method

Portfolio: V(m) = V(m−1) × (1 + i/12) + contribution(m) · After tax = V − t × (V − contributions)

The regular mortgage payment is fixed by the balance, rate and years remaining. Invest path: you pay that payment every month and invest the extra, compounding monthly at the expected return i. Prepay path: the extra goes to principal each month, which shortens the loan; from the month it is paid off, the whole former payment plus the extra is invested instead. Both paths spend the same cash every month.

At the end of the original term both mortgages are paid off, so comparing the two portfolios compares total wealth. Capital gains tax at rate t is applied to gains (portfolio minus contributions). The break-even return is found numerically as the investment return that makes both after-tax portfolios equal.

V
Investment portfolio value
i
Expected annual investment return (decimal)
t
Tax rate on investment gains
m
Month number, up to the original mortgage end date

Worked examples

$300k at 6.5%, $500/month extra, 7% expected return

Investing $500 a month for 25 years at 7% grows to about $405,000, or about $366,800 after 15% tax on gains. Prepaying instead clears the loan in 15 years 11 months and saves about $125,600 of interest; investing the full $2,525.62 a month after that builds about $367,500 after tax. It is almost a tie — the break-even return is about 7.02%, so investing needs to beat that to come out ahead.

Lower 5% expected return

At a 5% return the guaranteed 6.5% “return” from prepaying wins: the prepay path ends with about $337,200 after tax versus about $275,600 from investing — roughly $61,600 better.

3% mortgage, $1,000 extra, tax-free account

With a cheap 3% mortgage and a 7% tax-free return, investing $1,000 a month for 20 years builds about $520,900 versus about $405,400 if you prepay first — around $115,600 more. With no tax on gains the break-even return is simply the 3% mortgage rate.

Frequently asked questions

Is it better to pay off my mortgage or invest?+

Compare your mortgage rate with the after-tax return you can realistically expect. Prepaying earns a guaranteed return equal to your mortgage rate; investing has historically earned more over long periods but can lose money. Many people split extra cash between the two.

What should I do before paying extra on my mortgage?+

Build an emergency fund, capture any employer 401(k) match and pay off high-interest debt such as credit cards first. These usually beat both prepaying a mortgage and investing in a taxable account.

Does the mortgage interest deduction change the answer?+

Only if you itemize. If you do, your effective mortgage rate is lower, which makes investing relatively more attractive. With the higher standard deduction, most households no longer get a tax benefit from mortgage interest.

Why is paying off a mortgage considered risk-free?+

Every extra dollar of principal avoids interest at your mortgage rate for the rest of the loan, no matter what markets do. The trade-off is liquidity: money in home equity is hard to access without selling or borrowing.

What return should I assume for investing?+

Use a conservative long-run figure after fees and inflation assumptions you are comfortable with. A diversified stock portfolio has historically returned several percent a year above inflation, but decades can differ widely, so test a range of returns.

Results are estimates for educational purposes and are not financial advice. Rates, fees and terms vary — confirm with your lender or a licensed advisor before making decisions.

Related tools