Should You Pay Off Debt or Invest? (The Math Will Surprise You)
You're doing both. Some money goes toward the credit card or the student loan, some goes into the 401(k), and you keep going back and forth in your head about whether you're prioritizing the right thing. Maybe you got a raise. Maybe you finally paid off the car. Maybe you just looked at your retirement balance and felt something tighten in your chest. Either way, there are a few hundred extra dollars a month to deploy and you're not sure where they should go.
Most financial content gives you a tidy answer. Pay it down. Invest the difference. Done.
I'm not going to do that, because the math is only half the problem. The people who get this decision wrong almost always do it the same way: they pick the technically optimal answer, then quit on it eighteen months later when life gets weird. Here's the actual math, and where the math stops being useful.
TL;DR
The interest rate threshold most people use (around 6 to 7 percent) is a reasonable floor, but it ignores taxes, employer matches, and your nervous system.
Always capture your full 401(k) match before paying down anything below roughly 10 percent. A 50 percent match is a 50 percent instant return.
Credit card debt at 21.52 percent crushes every reasonable expected investment return. Pay it off aggressively before investing beyond the match.
A 6.36 percent mortgage or a 6.52 percent federal student loan is close enough to the long-term real return of stocks that the right call depends on your situation, not a universal rule.
The behavioral cost of carrying debt is real. If debt is keeping you up at night, the math is not the only variable that matters.
The Interest Rate Threshold
The standard rule looks reasonable on paper. Take the after-tax interest rate on your debt. Compare it to the expected long-term return on a diversified investment portfolio. If the debt rate is higher, pay it down. If the investment return is higher, invest.
The number people usually plug in for "expected investment return" is around 7 percent. That's not a guess. From 1928 through 2024, the S&P 500's compound annual growth rate with dividends reinvested was roughly 10.2 percent in nominal terms and approximately 7.0 percent after adjusting for inflation, according to NYU Stern professor Aswath Damodaran's historical return dataset. [1][2]
Real returns are the right comparison because debt is priced in nominal dollars. If your mortgage rate is 6.36 percent and inflation runs 3 percent, your real cost of borrowing is closer to 3.26 percent, not 6.36 percent. Using the Fisher equation: ((1 + 0.0636) / (1 + 0.03)) - 1 = 3.26%. That's a meaningfully different number than the headline rate. [3]
So the actual threshold most people should think about is whether their debt's real, after-tax cost is higher or lower than roughly 4 to 5 percent (a conservative real expected return, well below the historical 7 percent average).
That gets you in the right neighborhood. It does not get you the answer.
When the Math Says Invest
Three categories of debt usually fall on the "invest instead" side of the line in 2026.
Mortgages. Freddie Mac reported the average 30-year fixed mortgage rate at 6.36 percent as of May 14, 2026. [4] Strip out 3 percent inflation and the real cost drops to about 3.26 percent. Long-term stock returns have historically run well above that.
Federal student loans. Direct undergraduate Stafford Loans for the 2026-27 academic year carry a 6.52 percent fixed rate, per the May 2026 Treasury auction. [5][6] Real cost after inflation: approximately 3.42 percent. Federal loans also carry options private debt doesn't (income-driven repayment, forgiveness for qualifying public service work), which makes paying them down faster less obviously valuable. [7]
Low-rate auto loans and personal loans. If you locked in a rate under 6 percent, the math is similar.
Before you do anything with these, capture your 401(k) match. Per Vanguard's How America Saves 2025 report, the most common formula is 50 cents on the dollar up to 6 percent of pay. [8] That's a 50 percent guaranteed return on the first dollars you contribute. No reasonable interest rate on consumer debt beats it.
I'll say this plainly: skipping an employer match to pay down a 6 percent mortgage is one of the worst financial decisions I see well-meaning people make. The math is not close. You are leaving thousands of dollars per year on the table to feel better about debt that's costing you a few hundred dollars in real interest.
When the Math Says Pay Debt
Credit cards do not require a calculator.
The Federal Reserve's G.19 report shows the average APR for credit card accounts assessed interest was 21.52 percent in Q1 2026. [9][10] The average American household carries $7,886 in credit card debt, per LendingTree's analysis of credit reports. [11] Total U.S. credit card debt stood at $1.252 trillion as of Q1 2026, according to the New York Fed. [12]
Run the Fisher equation at 21.52 percent and 3 percent inflation: real cost of 18.0 percent. Compare that to a real expected return on stocks of 7 percent. The credit card wins (or loses, depending on which side you're on) by 11 percentage points. There is no diversified investment portfolio that reliably returns 18 percent after inflation. There has never been one. People who chase that kind of return usually end up financing future credit card debt.
The same logic applies to most high-interest installment loans, private student loans above 8 percent, and any "buy now, pay later" balance that has converted to interest-bearing. If the rate starts with a 1 or a 2, pay it off before you invest a single dollar beyond the employer match.
The Psychological Factor the Math Ignores
Here's where most blog posts wrap up with a tidy spreadsheet answer. I won't.
The math assumes a person who can hold a 60-percent-stock portfolio through a 30 percent drawdown, keep contributing through layoffs and bad news, and not raid the account to make themselves feel less anxious about debt. That person is rarer than financial media admits.
Dalbar's annual Quantitative Analysis of Investor Behavior has shown for decades that the average equity fund investor underperforms the funds they're invested in, sometimes by a wide margin. [13] The gap is not because they pick bad funds. It's because they sell when they should hold and buy when they should sit still. Behavior eats math for breakfast.
If carrying a mortgage at 6.36 percent and investing the surplus would technically build more wealth, but it makes you so anxious that you pull out of stocks during the next 20 percent correction, the optimal plan on paper becomes the suboptimal plan in real life. You'd have been better off paying down the debt at a guaranteed 3.26 percent real return than chasing a 7 percent real return you couldn't actually capture. [14]
This is not a soft "follow your feelings" point. It's a hard claim about how human capital and financial capital interact. The plan that works is the plan you'll actually stick with for 30 years.
What to Actually Do Based on Your Situation
Here's how I'd sequence it for most people in their 30s and 40s with mixed debt and an open question about the next dollar.
Step 1: Capture the full employer 401(k) match. Always. Before paying down anything below roughly 10 percent. The match is the highest-return, lowest-risk move available to anyone with a workplace retirement plan. [15]
Step 2: Eliminate any debt above 10 percent. Credit cards, high-rate personal loans, private student loans with rates that start with a 1. Hammer these.
Step 3: Build a starter emergency fund. Two to three months of expenses in a high-yield savings account. This exists to prevent the next surprise from putting you back in credit card debt.
Step 4: Decide on the gray zone. Debt between roughly 5 and 9 percent is where math gets close and psychology starts to matter. Two reasonable approaches: invest beyond the match in a tax-advantaged account using something simple like VTI (the Vanguard Total Stock Market ETF) while paying debt on its normal schedule, or split the surplus 50/50 between extra debt payments and investing. The first is math-optimal. The second is behavior-optimal for most people. [16]
Step 5: Reassess yearly. Rates change. Income changes. Life changes. The right answer in 2026 may not be the right answer in 2029.
If you've read this far and you're still trying to figure out which approach fits you, that's the actual question. Not "what's the optimal rate threshold," but "what plan will I actually execute for the next 20 years without quitting on it?" Answer that one honestly and the rest gets easier.
The Part That Actually Matters
None of the math in this post matters in a vacuum. Every dollar you free up by paying down a credit card, every dollar you put into the 401(k) match, every dollar you invest beyond it, is a vote for the version of your life where you have more choices later. The trip you've been pushing to next year. The career change you keep thinking about. The summer your kid wants you around instead of asking when you're getting back from a work thing. The option to stop doing work you don't love because you don't have to.
Debt-versus-invest is a math question on the surface. Underneath, it's the same question every financial decision is asking: what kind of life are you building, and is this dollar moving you toward it or away from it? Pick the plan you'll actually run for 20 years and the math takes care of itself.
FAQs
Should I pay off my mortgage or invest?
At a 6.36 percent mortgage rate, the math leans toward investing, especially once you account for the mortgage interest deduction if you itemize, and the 7 percent historical real return on diversified stocks. The exception is anyone within five years of retirement who wants the certainty of a paid-off home and the lower monthly fixed costs.
Is it better to pay off student loans or invest?
Federal student loans at 6 to 7 percent are close to the long-term expected real return of stocks. The math is closer than people think, and federal loans come with protections (income-driven plans, potential forgiveness for qualifying employment) that change the calculus. Private student loans above 8 percent should generally be paid down before investing beyond the employer match.
Should I pay off debt or contribute to my 401(k)?
Contribute at least enough to capture the full employer match. After that, pay off any debt above 10 percent before increasing 401(k) contributions further. Below 10 percent, you can reasonably do both.
What's the highest interest rate debt I should pay off before investing?
Anything above roughly 10 percent should be eliminated before you invest beyond the employer match. Anything above 15 percent should be eliminated before you invest at all, including the match in some extreme cases, because you're losing money faster than the match earns it.
Money Guide
I wrote a free guide that puts debt payoff in context with the four other moves that matter most when you're building wealth. It walks through what order to tackle them in. Grab it here:
References
[1] Damodaran, A. "Historical Returns on Stocks, Bonds and Bills: 1928-2024." NYU Stern. https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/histretSP.html
[2] "S&P 500 Average Return: Honest Historical Data (1928-2025)." QuantFlowLab. https://quantflowlab.com/sp-500-average-return/
[3] Fisher, I. The Theory of Interest. Macmillan, 1930. Fisher equation: Real Rate = ((1 + Nominal Rate) / (1 + Inflation Rate)) - 1.
[4] Freddie Mac Primary Mortgage Market Survey, May 14, 2026. https://www.freddiemac.com/pmms
[5] "Federal Student Loan Rates Set To Rise For The 2026-27 School Year." The College Investor. https://thecollegeinvestor.com/80477/federal-student-loan-rates-set-to-rise-for-the-2026-27-school-year/
[6] "Student loan interest rates are set to rise for 2026-27: Expert analysis." CNBC. https://www.cnbc.com/2026/05/12/student-loan-interest-rates.html
[7] "Interest Rates for New Direct Loans." Federal Student Aid. https://studentaid.gov/announcements-events/interest-rates-for-new-direct-loans
[8] Vanguard. "How America Saves 2025." https://institutional.vanguard.com/insights-and-research/report/how-america-saves.html
[9] Federal Reserve. "Consumer Credit - G.19." https://www.federalreserve.gov/releases/g19/current/
[10] "Average Credit Card Interest Rate in US Today." LendingTree. https://www.lendingtree.com/credit-cards/study/average-credit-card-interest-rate-in-america/
[11] "Credit Card Debt Statistics 2026." LendingTree. https://www.lendingtree.com/credit-cards/study/credit-card-debt-statistics/
[12] Federal Reserve Bank of New York. "Quarterly Report on Household Debt and Credit, Q1 2026." https://www.newyorkfed.org/microeconomics/hhdc
[13] DALBAR. "Quantitative Analysis of Investor Behavior (QAIB) 2024." https://www.dalbar.com/QAIB/Index
[14] Kinniry, F., Jaconetti, C., DiJoseph, M., Zilbering, Y., Bennyhoff, D. "Putting a value on your value: Quantifying Vanguard Advisor's Alpha." Vanguard Research. https://corporate.vanguard.com/content/dam/corp/research/pdf/putting_a_value_on_your_value_quantifying_vanguard_advisors_alpha.pdf
[15] Fidelity. "How does a 401(k) match work?" https://www.fidelity.com/learning-center/smart-money/average-401k-match
[16] Vanguard. "VTI: Vanguard Total Stock Market ETF Profile." https://investor.vanguard.com/investment-products/etfs/profile/vti
[17] "S&P 500 Historical Annual Returns (1927-2026)." Macrotrends. https://www.macrotrends.net/2526/sp-500-historical-annual-returns
About The Author
Shaun Melby, CFP® provides fee-only financial planning and investment management services in Nashville, TN through his company Melby Wealth Management. Shaun has over 15 years of experience as a financial advisor in Nashville. Shaun created Melby Money to educate the public about finances.
Full Disclosure
Full Disclosure: Nothing on this website should ever be considered to be advice, research, or an invitation to buy or sell any securities. Please see the Disclaimer page for a full disclaimer.