The average federal student loan borrower carries $39,633 in debt as of December 2025, according to educationdata.org — while simultaneously being told to invest early and capture compound growth. Both are correct. The question of whether to pay off student loans or invest pulls your extra dollars in opposite directions every month, and most advice stops at "it depends." Here's the math that actually decides it.
The One Move That Isn't a Debate: Get the 401k Match First
Before the student loans vs. investing math even starts, there's a step everyone agrees on — Dave Ramsey, Ramit Sethi, Vanguard, and every fee-only advisor.
Contribute enough to your 401k to capture your full employer match. Always. No exceptions.
If your employer matches 50 cents per dollar up to 6% of your salary and you earn $55,000, that's up to $1,650 per year in free money that disappears the moment you don't contribute. That match is a guaranteed 50% return on day one — before any market movement. As we detail in our 401k employer match guide, no investment vehicle offers a guaranteed 50–100% return. Chasing student loan payoff while leaving the match on the table is the one scenario where the math is completely unambiguous.
Once you're capturing the full match, the real question begins.
Pay Off Student Loans or Invest? It Comes Down to One Number
After securing your match, the decision reduces to one comparison: your student loan interest rate versus your expected investment return.
The S&P 500 has averaged approximately 10% annually over the past 50 years, per Vanguard historical return data. Inflation-adjusted, that's closer to 7% real return. Federal student loan rates for 2025–26 run from 6.53% for undergraduate loans to 9.08% for PLUS loans, according to the U.S. Department of Education.
Here's how the math stacks up:
| Loan Interest Rate | What the Math Favors |
|---|---|
| Above 8% | Pay off aggressively — guaranteed savings beat uncertain market return |
| 6–8% | Toss-up — split extra dollars between both |
| Below 6% | Lean toward investing — expected returns likely exceed loan cost |
| 0–4% | Invest — you're borrowing cheaply enough that markets should outperform |
The 7% threshold is where the decision becomes a genuine coin flip. A 7% guaranteed return from eliminating a 7% loan competes directly with a 7% inflation-adjusted market return — except one is locked in and the other isn't.
When Investing Beats Payoff — And By How Much
Here's the actual math on an extra $10,000 per year, choosing between putting it toward a $39,000 loan at 6.53% or investing it:
Investing scenario: $10,000/year in an S&P 500 index fund at 10% annualized over 10 years → $159,374 — use our Compound Interest Calculator to model different return assumptions.
Payoff-first scenario: $10,000/year extra toward the $39,000 loan at 6.53% eliminates it in ~3.5 years. Then invest $10,000/year for the remaining 6.5 years → $97,258.
The investing-first path wins by roughly $62,000 over 10 years — because time in the market compounds, and the 6.53% loan cost doesn't close the gap.
But there's a catch.
The Risk the Spreadsheet Can't Capture
The 10% average is exactly that — an average. Over any 10-year window, the S&P 500 has returned as much as 19% annualized and as little as −1%. The 6.53% you save by paying off your loan is guaranteed. The $62,000 advantage above assumes the market cooperates.
Ramit Sethi writes in I Will Teach You to Be Rich: "The goal isn't to optimize every dollar — it's to build a rich life, which includes not lying awake at night worrying about debt."
There's also a behavioral cost the math misses. Borrowers carrying high student debt are more likely to avoid career risks, delay major decisions, and hold overly conservative investment portfolios — all of which cost real money over time. Paying off the loan faster has a return that doesn't appear on any spreadsheet.
Our Debt Payoff Calculator lets you model exactly how fast your student loan disappears under different extra-payment scenarios, so you can compare the payoff timeline against what that same money would grow to in the market.
A Decision Framework That Actually Works
- Capture your full 401k match — this is non-negotiable. See the match math.
- Pay off any private loans or PLUS loans above 8% — the guaranteed savings beat expected market returns on a risk-adjusted basis.
- For federal undergraduate loans at 6–8%, split extra dollars: half to additional loan payments, half to a Roth IRA or taxable account.
- For loans below 6%, invest the surplus. You're borrowing cheaply enough that the expected market return wins over time.
- If the debt stress is real, pay it off faster regardless of the math — eliminating debt has a guaranteed return equal to your interest rate, plus peace of mind that doesn't show up on a spreadsheet.
If you're approaching default rather than debating investing, read how to avoid student loan default first — the investing question is secondary when garnishment is on the table.
Frequently Asked Questions
Should I pay off student loans before investing? Not before capturing your full 401k employer match — that's a guaranteed 50–100% return no loan payoff can beat. After that, compare your loan rate to expected investment returns. Federal loans above 8% are generally worth prioritizing over investing; loans below 6% generally aren't.
Is it better to invest or pay off student loans at 6.5%? At 6.5%, you're in the toss-up zone. The expected market return of ~10% nominally beats the guaranteed 6.5% savings, but not by enough to ignore the risk. A reasonable approach: split extra dollars 50/50 between additional loan payments and investing until the loan is gone.
Should I put extra money toward student loans or contribute to my 401k? Always contribute enough to capture your full employer match first. After that, if your student loan rate is above 8%, redirect the surplus to the loan. If it's below 6%, max your Roth IRA or 401k. Between 6–8%, splitting is reasonable.
Model your exact loan payoff timeline — and see what that same money compounds to if invested instead — with our Debt Payoff Calculator.
Sources: educationdata.org, Student Loan Debt Statistics 2026; U.S. Department of Education, 2025–26 federal student loan interest rates; Vanguard, Long-Term Stock Returns 2025; Ramit Sethi, I Will Teach You to Be Rich (2nd ed.).
StackedCalc articles are for educational and informational purposes only. Nothing on this page is financial, investment, tax, or legal advice. StackedCalc is not a licensed financial advisor, broker, or fiduciary. Always consult a qualified financial professional before making any financial decisions.
Try it yourself
Run the numbers with our free Debt Payoff Calculator