Pay Off My Mortgage or Invest?

The same spare money, two destinations, simulated month by month with identical cash leaving your pocket. Taxed honestly on both sides — because the mortgage interest deduction is worth nothing unless you itemize.

100% private. The math runs inside your browser. Nothing you type is sent to us or to any server.

Your loan and your spare money

$
%
years
$
%
%

Where you end up, either way

Principal and interest only. Property taxes, homeowners insurance, PMI and HOA dues are not included.

What your loan really costs after tax

This is the number the whole decision turns on, and it is the one most comparisons get wrong by assuming everybody deducts their mortgage interest.

The asymmetry people forget: the interest you avoid is guaranteed. The investment return is an average that includes years when the market falls by a third, and the order in which those years arrive matters. When the two numbers come out close, they are not really close.

The effective cost of your loan after taxes

Prepaying a mortgage is an investment whose return is exactly the loan's interest rate. Send a dollar to principal and you have permanently removed every future interest charge that dollar would have generated. There is no market risk, no volatility and no sequence-of-returns problem. The only question worth arguing about is what that rate really is after tax.

Mortgage interest is deductible in the United States, but only for people who itemize. Since the standard deduction was roughly doubled, the large majority of households take it instead, and for them the deduction is worth precisely nothing — the full interest rate is the real cost of the loan. If you do itemize, the effective cost is the rate multiplied by one minus your marginal rate, so 6.75% at a 24% marginal rate is really about 5.13%. That is a meaningful difference, and it is why the tick box above exists rather than being assumed one way or the other.

The same discipline has to be applied on the investment side. An expected 7% in a taxable account is not 7% in your pocket: capital gains tax takes a bite when you sell, which at 15% leaves roughly 5.95%. Comparing a pre-tax market return against a post-tax loan cost is the single most common way these comparisons are rigged, usually in favour of investing.

Where the math stops helping

Run the numbers and you will often find the two paths land close together. At that point the arithmetic has done its job and the decision becomes about things it cannot measure.

Certainty has real value

A guaranteed 5% beats an expected 6% for most people once you account for the possibility of a decade of poor returns. That is not timidity; it is correctly pricing risk that a single average number hides.

Liquidity has real value too

Money in the mortgage is locked up. You cannot spend equity in an emergency without selling the house or borrowing against it, and a line of credit can be cut exactly when you need it. An investment account can be sold any trading day.

Order matters more than either

Expensive consumer debt first, then a cash emergency fund, then the full employer retirement match. Only after those three does this comparison become the right question to be asking at all.

If you decide prepaying is the right call, the next question is how. The main payoff calculator handles monthly extras, annual lump sums and one-off payments together, and the recast calculator covers the case where you would rather convert a lump sum into a lower monthly payment than an earlier payoff date.

Frequently asked questions

Should I pay off my mortgage early or invest the money?

Compare the two after tax. Paying down the mortgage earns a guaranteed return equal to your interest rate, reduced by any tax deduction you genuinely receive. Investing earns an expected return that you must reduce by the tax on gains. If the after-tax loan rate is higher than the after-tax return you can reasonably expect, prepaying wins outright. If it is lower, investing wins on expectation only, and expectation is not a promise.

Does the mortgage interest deduction change the answer?

Only if you itemize. Since the standard deduction was roughly doubled, around nine out of ten U.S. households take it, and for those households mortgage interest produces no tax benefit at all. If you do itemize, the real cost of the loan is the rate multiplied by one minus your marginal tax rate, which can shift a close comparison toward investing. The tick box above applies that correction honestly, to both sides.

Why is the mortgage return called guaranteed?

Because paying a dollar of principal removes a known, contractual future interest charge. There is no market, no sequence of returns and no chance it comes out negative. A 6.75% mortgage prepayment is a 6.75% risk-free return, and nothing available to a retail investor pays a guaranteed 6.75%. That is why a close comparison on paper should usually be resolved in favour of the mortgage.

What does this calculation leave out?

Liquidity, mainly. Money paid into a mortgage cannot be withdrawn without selling or borrowing against the house, while an investment account can be sold on any trading day. It also assumes a steady rate of return rather than real market volatility, ignores inflation, ignores employer retirement matching, and assumes a taxable investment account rather than a 401(k) or Roth. Read the methodology page for the full list.

Should I max out my 401(k) before prepaying the mortgage?

At least up to the full employer match, yes, without hesitation. An employer match is an immediate 50 to 100 percent return on the money you contribute, which no mortgage rate comes close to. Expensive consumer debt and a cash emergency fund also come before any mortgage prepayment.

Is there a rate at which prepaying obviously wins?

There is no universal threshold, but the logic is simple: the higher your rate, the stronger prepaying looks, because you are buying a larger guaranteed return. At 7% or more, prepaying is genuinely competitive with expected equity returns while carrying none of the risk. At 3%, it almost never makes mathematical sense, though some people still do it for peace of mind, which is a legitimate reason rather than an error.

More calculators

15 vs. 30 year mortgage

Compare both terms side by side, including the third option most people miss: take the 30 and pay it like a 15.

Mortgage recast calculator

What a lump sum plus a recast does to your required payment, and how that compares with refinancing or simply paying extra.

How this is calculated

Both paths are simulated month by month with identical cash leaving your pocket; whatever is not sent to the lender is invested, capital gains tax is applied once at the end, and the interest deduction is credited to both paths only if you tick the itemizing box. Every formula on this site is published in plain English on the methodology page, including a worked example you can verify by hand.

Editor: Orlando Alejandro Chacin, independent researcher and builder of financial tools — see about the editor.

Last updated:

These results are estimates, not financial advice. They depend entirely on the figures you enter and exclude taxes, insurance, PMI, HOA dues and any lender fee. Confirm your actual terms with your servicer and speak to a licensed professional before acting. Read the full disclaimer.