Pay Off the Mortgage Early or Invest the Money?
Every extra dollar sent to the mortgage earns your interest rate, guaranteed. The same dollar in the stock market might earn more or less. Enter your loan and your taxes to see which leaves you better off, the return investing has to beat, and how the choice played out in every stretch of market history since 1871.
Enter what you still owe, your rate and the extra money you could put toward it each month or all at once. The calculator follows two households with the same income and the same spending: one sends the extra money to the mortgage and, once the house is paid off, invests the whole payment it no longer owes; the other pays the regular payment and invests the extra money from the start. It compares where each stands at the point you choose, after taxes at today's rates.
01Your Numbers
02Both Paths, Year by Year
Show the year-by-year table
| Year | Pay off early: loan | Pay off early: investments | Invest: loan | Invest: investments | Investing ahead by |
|---|
Investments are shown before any tax on a sale; the summary above counts that tax if you chose to. Year 1 is the first 12 months from today.
03Your Plan in Every Stretch of Market History
Each point is one start month: your plan run with the S&P 500's actual monthly returns, dividends reinvested, from that month on. Above the line, the investing household ended ahead by that many dollars; below it, the household that paid off early did. Taxes follow your settings. Source: Robert J. Shiller; DaveManuel.com calculations.
Investing came out furthest ahead
| Start month | Investing ahead by |
|---|
Paying off came out furthest ahead
| Start month | Paying off ahead by |
|---|
Start months close together share one market move, so each list keeps only the most extreme month within any five-year stretch.
04How the Answer Changes With the Mortgage Rate
Everything else as you set it above, at mortgage rates from 3% to 9%. The break-even return is what the investments must earn each year, before tax, for investing to finish level with paying off early.
| Mortgage rate | Break-even return | Investing ahead by, at your return | History: investing won |
|---|
History uses every start month since 1871 with enough data for your comparison point. Your rate is highlighted when it is one of the rows.
05Before Sending Extra Money to the Mortgage
- Take any employer 401(k) match first. A match is an immediate return on the money you put in, far above any mortgage rate.
- Pay off higher-rate debt first. Credit card balances that charge interest averaged over 22% a year in the Federal Reserve's Q3 2026 survey. Our credit card payoff calculator shows how fast extra payments clear them.
- Keep an emergency fund outside the house. Money paid into a mortgage can only come back by selling, refinancing or borrowing against the house, and lenders can cut home equity lines when times are hard.
- Check for mortgage insurance. If you pay PMI, extra principal that gets the balance to 80% of the home's original value lets you ask to cancel it, a saving on top of the interest rate. The mortgage calculator shows when that happens.
- Think about a refinance. If rates fall and you refinance, your loan's rate drops, and so does the guaranteed return on paying it down. Money already sent to the loan stays in the house either way.
- Ask about a recast. Some lenders will lower the monthly payment after a large lump sum, for a fee, instead of only shortening the loan. The calculator assumes the payment stays the same and the loan ends sooner.
06How the Calculator Works
Two households. Both start with the same loan and spend the same amount each month: the regular payment plus the extra amount. The first sends the extra money (and any lump sum) to principal; once the loan is paid off, it invests the whole regular payment plus the extra amount every month. The second makes only the regular payment and invests the extra money (and any lump sum) from the start; once its loan ends on schedule, it invests the regular payment too. At the comparison point, each household's position is its investments, after any tax you chose to count, minus what it still owes on the house. Both own the same house, so its value drops out of the comparison.
Your own return. The summary, section 02 and the break-even figures use the yearly return you enter, earned evenly month by month. Mortgage interest is charged monthly, so a 7.21% loan costs about 7.45% a year compounded; that is why the break-even return sits a little above the loan's rate even with no taxes. The break-even return is found by trying returns until the two households finish level.
History. Section 03 runs your plan with the actual monthly returns of the S&P 500 and the earlier indexes it was built from, with dividends reinvested, from Robert J. Shiller's data, for every start month from January 1871 that has enough months after it. The data runs through October 2026, and Shiller's latest months include estimates. The prices are monthly averages, which smooths the sharpest daily moves.
Taxes. In a taxable account, dividends are taxed every year at the qualified dividend rate, using the yield you enter, and the tax is paid out of the account. When the investments are counted as sold, the whole gain is taxed in that one year, stacked on top of your taxable income: it climbs through the federal 0%, 15% and 20% long-term rate lines, the 3.8% net investment income tax applies to the smaller of the gain and the amount by which income plus the gain passes its threshold (income here is your taxable income plus the standard deduction, an approximation of modified adjusted gross income), and your state taxes it through its own brackets. Dividends are taxed the same way once a year: each year's dividends, at the yield you enter, are stacked on top of your taxable income through the same federal rate lines, the net investment income tax rule and your state's brackets, and the tax is paid out of the account. All of this uses the 2027 federal brackets for your filing status; state rules that treat capital gains differently are left out; a few states tax capital gains differently (Washington's separate capital gains tax, exclusions in some states), and those rules are left out. A Roth account pays no tax on growth, and the calculator does not apply the yearly contribution limits, which the larger payments after an early payoff can exceed. Your tax rates are held at today's levels for the whole period.
Mortgage interest deduction. If you itemize, each year's interest is added to your other itemized deductions, and only the part of the total above the standard deduction saves tax, at your federal bracket rate. The calculator assumes a loan taken out after December 15, 2017, so interest on up to $750,000 of debt counts: when a household's average balance for the year is above $750,000, only that share of the year's interest is deductible, worked out separately for each household each year as the balance falls. Older loans (up to $1 million) and home equity debt used for other purposes follow different rules. The household's tax saving is invested at the end of each year. State deductions for mortgage interest are left out.
What is left out. Fund fees and trading costs, inflation (both households are measured in the same dollars), PMI, property taxes and insurance (the same for both), and any change to your income or tax bracket. Results are a projection or a replay of history, and the future can look different.
07Frequently Asked Questions
Is it better to pay off my mortgage early or invest?
It comes down to two numbers and one feeling. The first number is your mortgage rate, which is exactly what every extra dollar of principal earns, with no risk. The second is what the money would earn invested, after tax, which over long stretches has usually been more for stocks but is never guaranteed. The feeling is how you would handle a bad decade in the market while still owing on the house. The calculator shows the first two for your numbers and how the choice played out in every stretch of market history since 1871.
What return does paying extra on a mortgage earn?
Your mortgage rate, guaranteed. An extra $1,000 of principal on a 7% loan saves 7% a year in interest on that $1,000 for as long as the loan would have run. If you itemize and deduct mortgage interest, part of that saving is offset by a smaller deduction, so the effective rate is a little lower. The calculator works that out from the itemizing questions.
Does the mortgage interest deduction change the answer?
Only if you itemize. Since the standard deduction roughly doubled in 2018, most households take it instead, and for them mortgage interest saves no tax at all. Interest is deductible on up to $750,000 of mortgage debt for loans taken out after December 15, 2017, a limit the One Big Beautiful Bill Act of 2025 made permanent. If you itemize, the deduction only helps by the amount your total itemized deductions exceed the standard deduction, which the calculator accounts for year by year.
Why has investing usually come out ahead in the past?
The S&P 500 with dividends reinvested has returned more than most mortgage rates over most long stretches. The gap narrows as the mortgage rate rises: at today's rates, a guaranteed 7% is a high bar for a long stretch of stocks to clear after tax, and section 04 shows how the share of winning stretches falls as the rate climbs.
Should I invest in my 401(k) before paying extra on the mortgage?
Usually the employer match comes first, because it is an instant return that no mortgage rate comes close to. Beyond the match, money in a Roth account grows without tax, which the calculator lets you choose, and money in a traditional 401(k) or IRA goes in before tax, which this calculator does not model. Credit card balances and other high-rate debt come before both.
Should I pay off my mortgage before I retire?
Many people do, because a paid-off house lowers the income they need each month and removes a fixed bill in a bad market. The cost is that money sent to the mortgage is hard to get back: a lender can freeze a home equity line when times are hard, which is when you might need the cash. Set the comparison point in the calculator to the year you plan to retire to see where each path would leave you that year.
What about a 3% mortgage from 2020 or 2021?
At 3%, the history is lopsided. With the cover example ($300,000 over 30 years, $500 a month extra, no taxes), investing beat paying the loan down early in every one of the 30-year stretches since 1871, before taxes. Today a high-yield savings account or Treasury bills pay more than a 3% loan costs, so prepaying a 3% loan gives up a return you could get with no stock market risk at all.
Is the calculator storing what I type?
No. The calculation runs in your browser, and what you type is not sent to DaveManuel.com. The page address updates with your settings as you change them, so you can bookmark or share it, but the settings go after a # sign, a part of the address that browsers do not send to the website.
08Sources
- Freddie Mac, Primary Mortgage Market Survey, via FRED series MORTGAGE30US
- Robert J. Shiller, Online Data: U.S. stock markets 1871 to present, monthly S&P Composite total return
- Internal Revenue Service: Rev. Proc. 2026-35 (IR-2026-133, November 5, 2026) (2027 brackets, capital gains rate lines and standard deduction); Publication 936, Home Mortgage Interest Deduction; Net investment income tax
- State income tax brackets: the tables behind the DaveManuel.com Paycheck Calculator, from each state's revenue department
- Federal Reserve, G.19 Consumer Credit (credit card interest rates, Q3 2026)
More from DaveManuel.com: the Financial Tools, the Mortgage Calculator, historical mortgage rates, the Rent vs Buy Calculator and the Lump Sum vs Dollar-Cost Averaging Calculator.
Cite This Page
This page is free to cite and link. Please include the date you accessed it.
| Format | Citation | Copy |
|---|---|---|
| Plain | Dave Manuel, “Pay Off Mortgage or Invest Calculator: Which Comes Out Ahead?,” DaveManuel.com, https://www.davemanuel.com/pay-off-mortgage-or-invest-calculator.php (accessed December 6, 2026). | Copy |
| APA | Manuel, D. (2026). Pay Off Mortgage or Invest Calculator: Which Comes Out Ahead?. DaveManuel.com. Retrieved December 6, 2026, from https://www.davemanuel.com/pay-off-mortgage-or-invest-calculator.php | Copy |
| Chicago | Manuel, Dave. “Pay Off Mortgage or Invest Calculator: Which Comes Out Ahead?.” DaveManuel.com. Accessed December 6, 2026. https://www.davemanuel.com/pay-off-mortgage-or-invest-calculator.php. | Copy |
| Wikipedia | {{cite web |url=https://www.davemanuel.com/pay-off-mortgage-or-invest-calculator.php |title=Pay Off Mortgage or Invest Calculator: Which Comes Out Ahead? |last=Manuel |first=Dave |website=DaveManuel.com |access-date=2026-12-06}} | Copy |
| Link (HTML) | <a href="https://www.davemanuel.com/pay-off-mortgage-or-invest-calculator.php">Pay Off Mortgage or Invest Calculator: Which Comes Out Ahead? (DaveManuel.com)</a> | Copy |
