It is the most repeated question in household finance, and most answers jump straight to a rate comparison: "your mortgage costs 6.5%, the market returns 10%, invest." That comparison skips the two steps that outrank it and botches the two adjustments that decide it. Here is the full ordering, with the math shown at each step.

Step 0: Two things outrank both options

The employer match comes first, always. A 401(k) contribution that earns a 50% or 100% employer match has an instant, guaranteed return no mortgage prepayment can approach. Contribute at least enough to capture the full match before one extra dollar goes to the mortgage — this is not a close call and it is not the interesting part of the question. High-rate debt comes second. A credit card at 24% outranks a mortgage at 6.5% and an unmatched 401(k) contribution alike; the general order is the one in Pay Off Debt or Save First?. The real question only begins with the dollars left after the match is captured and the expensive debt is gone.

The real comparison, stated fairly

For those dollars, the choice is between two unlike objects. Mortgage prepayment earns a return exactly equal to your note rate — guaranteed, but illiquid: the money becomes home equity, reachable only by selling or borrowing against the house. Investing in the 401(k) earns an expected market return — higher on average, genuinely risky, and liquid-ish (accessible at retirement, with loans or hardship provisions before). Put numbers on it: an extra $300 a month against a $200,000 balance at 6.5% with 20 years left retires the loan nearly six years early and saves roughly $50,000 in interest. The same $300 a month invested at a hypothetical 8% average return over those 20 years grows to roughly $177,000 — a larger figure, on paper. The paper figure assumes you earn the average, hold through every crash, and need nothing from the account in year 9. The mortgage figure assumes nothing. Comparing a certain return with an average return as if they were the same kind of number is the core error in most versions of this debate.

Adjustment 1: The mortgage-interest deduction usually isn't

"But the interest is tax-deductible" survives as a reflex from an era when most homeowners itemized. Today the standard deduction is $16,600 for single filers and $33,200 for married couples filing jointly (2027), and most households take it — which means their mortgage interest saves them exactly $0 in tax, and prepaying earns the full note rate, undiluted. If you do itemize, and your marginal rate is 22%, prepayment's after-tax return is your note rate times (1 − 0.22) — 6.5% becomes about 5.1%. Check which household you are before using either figure; the answer flips the comparison for a meaningful slice of readers. Meanwhile the 401(k) side has its own tax geometry — pre-tax contributions save at your marginal rate now and are taxed on withdrawal — which is the analysis in Roth vs. Traditional, by Retirement Bracket.

Adjustment 2: Your age changes what the house is

A paid-off house at 45 and a paid-off house at 62 are different financial objects. At 62, eliminating the mortgage cuts your required retirement income by the size of the payment — which lowers the portfolio withdrawals you must make in bad markets, the sequence risk that dominates early-retirement outcomes. Near retirement, prepayment is partly an insurance purchase, and it prices well. At 35, the same dollars face a 30-year investment horizon over which the market's expected premium has time to assert itself, and the illiquidity costs more because life is less predictable. Neither is the "right" answer universally; the date on your retirement plan is an input, which is why the Near Retirement situation guide treats mortgage payoff as one of its sequencing decisions, and why households behind on retirement savings should read Behind on Retirement? The Catch-Up Order before prepaying anything.

The middle doors

Two options sit between the poles. A mortgage recast — a lump-sum principal payment followed by re-amortizing the remaining balance over the original term, usually for a small fee — lowers the required monthly payment without a refinance; it trades some interest savings for cash-flow flexibility, which is sometimes exactly what a household needs. And prepaying specifically to eliminate PMI is the one case where prepayment jumps the queue ahead of unmatched investing: dropping private mortgage insurance is an additional guaranteed return stacked on top of the note rate, and it is frequently the largest single return available anywhere in the budget.

The verdict template

Capture the full match. Kill high-rate debt. Then: if your mortgage rate is high (a working threshold: above roughly 6%), you itemize not at all, and retirement is within sight — prepaying is a strong, defensible default. If your rate is low, your horizon is long, and your retirement accounts are behind — invest, and let the mortgage ride. Most households land between, and the between answer is respectable: split the surplus, raise the 401(k) deferral with each raise (the mechanics are in 2027 Contribution Limits), and send a fixed extra principal payment with the mortgage. The wrong answers are only the two extremes done by reflex — prepaying while leaving match money unclaimed, or investing while a 24% card balance compounds. Everything between those is a judgment call you are now equipped to make with your own numbers. Where the surplus came from a windfall, the sequencing in A Windfall Arrives puts this decision in its full order.

Official documentation and references

Keep going

Educational disclaimer: This article is general education, not personalized financial, tax, legal, or benefits advice. Primary sources, plan documents, and — for insurance and estate topics — your state's law and licensed professionals govern your situation. All numbers in examples are illustrative.