Pay Off Mortgage or Invest Calculator

Got extra cash each month, or a lump sum? Compare putting it toward your mortgage with investing it. The calculator spends the same money both ways and shows which leaves you with more net worth, the return investing needs to win, and how the answer changes if markets do better or worse.

Updated · Formulas shown below

Pay off or invest calculator

Your mortgage

$
%
Remaining term
yr
mo
$

Extra cash

$
$

Investing and taxes

%

After fund fees. Not guaranteed; see the range below.

yr
%

Use 0 for a Roth IRA. Long-term capital gains rates are 0%, 15%, or 20%.

Most households take the standard deduction and get no tax benefit from mortgage interest.

—

    Paying off the mortgage early compared with investing
    Pay off earlyInvest
    Mortgage paid off
    Mortgage still owed
    Investments after tax
    Net worth from these choices
    Mortgage interest paid

    Both paths spend the same cash every month. Once a path's mortgage is gone, its whole payment goes into investments.

    If returns come in differently

    Annual returnAhead after By
    4%
    5%
    6%
    7%
    8%
    9%
    10%
    How far ahead investing is, by year

    Above $0, investing has left you with more net worth so far. Below $0, paying off early has.

    Year-by-year net worth table
    YearPay off earlyInvestInvest ahead by

    The short answer

    Paying extra on a mortgage earns a return equal to its interest rate, guaranteed. Investing earns whatever the market gives, minus taxes and fees. If you expect investments to beat your mortgage rate by a comfortable margin and you can live with the ups and downs, investing usually ends ahead. If your rate is high, your time horizon is short, or a guaranteed result matters more to you, prepaying is the safer choice.

    How the calculator compares the two

    To keep the comparison fair, both paths spend exactly the same cash every month:

    • Pay off early: your regular payment plus the extra goes to the mortgage. A one-time amount goes to principal today. Once the loan is paid off, the full amount you were paying goes into investments instead.
    • Invest: you make the regular payment, and the extra and any one-time amount go into investments. When the loan ends on schedule, the old payment is invested too.

    At the end of the period the calculator compares net worth from these choices: investments after tax on gains, minus any mortgage still owed. Investments grow monthly at the rate that compounds to your expected annual return. Mortgage interest is charged monthly and rounded to the cent, as a servicer does.

    The break-even return is the annual return at which both paths finish level. The calculator finds it by testing returns between −20% and 30% until the two results match.

    Worked example

    You owe $300,000 at 6.5% with 25 years left, so your principal and interest payment is $2,025.62. You have an extra $500 a month. You assume investments earn 7% a year in a taxable account, with gains taxed at 15%, and you take the standard deduction.

    • Pay off early: the mortgage is gone in 15 years 11 months, saving about $125,600 of interest. From then on, $2,525.62 a month is invested. After 25 years: $364,097.
    • Invest: the mortgage runs the full 25 years. The $500 a month, plus the payment for the final months, grows to $355,291 after tax.

    Prepaying comes out $8,805 ahead, even though 7% is above the 6.5% mortgage rate. Two things close the gap: tax on investment gains, and the fact that a 6.5% rate charged monthly works out to about 6.7% a year. Investing needs about 7.25% to break even here. At 8% it wins by $29,358; at 6% it loses by $39,556.

    A one-time $50,000 instead of $500 a month tells a similar story: prepaying wins by about $8,400 at 7%, and the break-even return is about 7.2%.

    What tips the decision

    Your mortgage rate

    The higher your rate, the better prepaying looks. A borrower at 3% needs only a modest return to come out ahead by investing; a borrower at 7.5% needs a strong one.

    Taxes

    • Gains: long-term capital gains in a taxable account are taxed at 0%, 15%, or 20% depending on income. Inside a Roth IRA, qualified gains are tax-free; set the rate to 0%.
    • Mortgage interest: deductible only if you itemize. If you do, the deduction lowers the true cost of your mortgage and favors investing.
    • Employer match: free money from a 401(k) match beats any mortgage prepayment. Capture it first.

    Risk and timing

    The calculator uses a steady return every year. Real markets do not. A bad decade early on can leave the investing path behind even if long-run averages are good. Look at the range table in the calculator: if you would regret the low-return rows, prepaying may suit you better.

    Access to your money

    Money in investments can be sold. Money paid into your mortgage stays in the house until you sell, refinance, or borrow against it. Keep an emergency fund before doing either.

    A middle path

    You can split the extra cash, or prepay now and change course later. If you put a lump sum toward the mortgage and want a lower required payment afterward, a recast can do that for a small fee. See themortgage recast calculator, or compare it with a new loan in therecast vs refinance calculator.

    Frequently asked questions

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

    It depends on whether your investments will earn more, after taxes and fees, than your mortgage rate costs you. Prepaying earns your mortgage rate with certainty. Investing usually earns more over long periods but can lose money in any given stretch. The calculator shows the return investing needs to win for your numbers.

    What return do I need to beat paying off my mortgage?

    Roughly your mortgage rate, plus a margin for taxes on investment gains. In the worked example below, a 6.5% mortgage needs about a 7.25% annual return to break even when gains are taxed at 15%.

    Does the mortgage interest deduction change the answer?

    Only if you itemize. Most households take the standard deduction, so their mortgage interest saves them nothing on taxes. If you do itemize, the deduction lowers your effective mortgage rate and makes investing relatively more attractive.

    Should I invest in my 401(k) before paying extra on my mortgage?

    An employer match is an immediate return that prepaying cannot equal, so most people capture the full match first. Tax-advantaged accounts also shelter gains, which you can model here by setting the tax on gains to 0%.

    What about an emergency fund?

    Money sent to your mortgage is locked in your home until you sell or borrow against it. Most planners suggest an emergency fund of several months of expenses before prepaying or investing beyond retirement accounts.

    Does paying extra lower my monthly payment?

    No. Extra principal payments shorten the loan but keep the payment the same. To lower the payment after a lump sum, ask your servicer about a recast.

    Sources and assumptions

    • Long-term capital gains rates of 0%, 15%, and 20%: IRS Topic No. 409, Capital gains and losses.
    • Mortgage interest deduction requires itemizing: IRS Publication 936, Home Mortgage Interest Deduction.
    • The calculator assumes a fixed mortgage rate, a constant investment return, tax on gains paid once at the end, and no investment fees beyond what you subtract from the return. Results are in future dollars; inflation does not change which path is ahead, because both are measured on the same date.

    This calculator is an educational estimate, not investment, tax, or financial advice. Investment returns are not guaranteed and can be negative. See the full disclaimer.