Should you pay off debt or invest first? Here's the math-based rule of thumb, the 401(k) match exception, and what to do with each debt type.
Here’s the whole answer in one sentence: get any employer 401(k) match no matter what, then pay off anything charging more interest than you can realistically expect to earn investing (that means credit cards first, always), and once the double-digit-rate debt is gone, split your money between investing and paying down the cheaper stuff based on your own risk tolerance. That’s the framework. Everything below is just filling in the numbers so you can apply it to your own situation.

People turn “should I pay off debt or invest first” into a values question — debt feels scary, investing feels responsible, so which one wins? But at its core this is just a comparison of two interest rates: the rate your debt is charging you, and the rate your money could reasonably earn if you invested it instead. Every dollar you send toward extra debt payments earns you a guaranteed return equal to that debt’s interest rate, because that’s how much interest you stop paying. Every dollar you invest earns you a return that’s never guaranteed, but that has historically averaged somewhere in the 7% to 10% range for the stock market over long stretches of time — closer to 10% nominal if you’re looking at raw historical S&P 500 returns, closer to 7% once you adjust for inflation, which is the more honest number to plan around. When a debt’s interest rate is higher than that, paying it off is the better bet mathematically, full stop. When it’s lower, the math gets murkier and other factors start to matter more.
Before you do anything else — before extra debt payments, before opening a brokerage account, before any of it — contribute enough to your 401(k) to get your full employer match, if you have one. This is the one exception to “high-interest debt always comes first,” and it’s not close. A typical match is 50% to 100% of your contribution up to some percentage of your salary, which means an instant 50%-100% return on that money the moment it lands in your account. No credit card charges 50% interest. There is no debt payoff that beats a guaranteed, instant double or 1.5x on your money. So even if you’re staring down a stack of credit card balances, carve out enough from your paycheck to capture the match first, then throw everything else at the debt. This usually only requires a small percentage of your income, so it doesn’t meaningfully slow down your debt payoff — but skipping it to pay debt faster means leaving free money on the table permanently, since most plans don’t let you go back and claim a missed match.
Once the match is handled, high-interest debt — credit cards, payday loans, most personal loans, and buy-now-pay-later balances — needs to be gone before you put another dollar into investing beyond the match. The average credit card APR is sitting around 21% to 22% right now, and that’s the average; if your credit isn’t great, you could be paying more. Compare that to the 7%-10% you might earn investing, and the math isn’t close. Carrying a credit card balance while also investing is like borrowing money at 22% to earn 8% — you’re guaranteed to lose on the spread. There’s no diversified portfolio, no hot stock, no clever allocation that reliably clears a 20%+ hurdle rate year after year. This is also exactly the debt that compounds against you the same way investing compounds for you — if you want to see how brutal that math looks in the other direction, it’s worth understanding how compound interest works and why it rewards early investors and punishes people who carry balances. A $6,000 credit card balance at 22% left untouched doesn’t just sit there — it grows, and it grows faster than almost anything you could reasonably invest in grows. Attack this debt aggressively, put investing beyond the match on pause, and treat “no more credit card interest” as an urgent goal, not a someday goal.
One quick detour: none of this works if you’re throwing every spare dollar at debt and then have to reach for a credit card the moment your car needs a new alternator. That’s why the actual order of operations starts even earlier than this article — with a small starter emergency fund before you go hard on either debt or investing. If you haven’t sorted that out yet, go read Emergency Fund First, Investing Second for the full sequence. This article assumes you’ve already got that baseline covered and are deciding what to do with money beyond it.
Once the high-interest debt is dead, things loosen up. Federal student loans for the 2025-26 borrowing year run about 6.5% for undergrad direct loans, higher for grad and PLUS loans (roughly 8% and 9% respectively), and mortgage rates are currently averaging around 6.8% for a 30-year fixed. Car loans vary more but often land somewhere in the 6%-9% range depending on your credit. These rates sit close enough to a realistic long-run investing return that the math stops giving you a clear winner. Paying extra on a 6.5% student loan earns you a guaranteed 6.5%; investing that same money might earn more, might earn less, and will definitely be bumpier along the way. That’s a real trade-off between a guaranteed smaller return and a probable-but-uncertain larger one — and reasonable people land in different places on it.
This is why most financial plans have you split, not choose, once you’re past the high-interest stuff. A common approach is to keep making minimum payments on the mortgage or student loans, invest a meaningful chunk of your income (ideally working toward 15% or more), and use whatever’s left to chip away at the remaining debt faster than required. There’s no single right split — someone who hates owing money and sleeps better with zero debt should lean harder into payoff even if the spreadsheet says invest; someone comfortable holding a low, fixed-rate loan for years while their investments compound should lean the other way. Neither choice is a mistake once you’re talking about debt in the 5%-9% range rather than the 20%+ range.
Two features can tip the math even further in favor of investing alongside a low-rate debt. First, some student loans (subsidized federal loans, in particular circumstances) don’t accrue interest at all during certain periods, making them essentially free money in the short term. Second, mortgage interest and some student loan interest can be tax-deductible depending on your situation, which effectively lowers the real cost of carrying that debt below its stated rate. Neither of these is a reason to ignore the debt entirely or avoid ever paying it down — but they’re both reasons a 6% mortgage is a fundamentally different animal than a 22% credit card, and treating them the same is a common mistake.
All of the above is the math-first argument, and the math is real. But personal finance is personal, and there’s a well-documented behavioral case for paying off debt in order of smallest balance to largest — the “debt snowball” — regardless of interest rate, because the quick wins keep people motivated and more likely to actually finish. If you know yourself well enough to know you need those early wins to stay in the game, prioritizing a small low-interest debt over investing isn’t irrational, it’s just optimizing for a different variable: your own follow-through instead of pure expected return. That’s a deep enough topic to deserve its own article, so we won’t relitigate debt snowball versus debt avalanche here — just know that if the math-optimal path isn’t the path you’ll actually stick to, it’s not actually optimal.
In practice, the decision tree looks like this: contribute enough to get your full 401(k) match no matter what else is going on. Then, if you’re carrying any debt above roughly 10%-12% interest — credit cards, payday loans, most personal loans — pause additional investing and attack that debt with everything you’ve got. Once it’s gone, you’re in flexible territory: keep contributing to retirement accounts, and split any extra money between investing more and paying down remaining lower-rate debt (student loans, mortgage, car loan) based on your own comfort with owing money. There’s no single “correct” percentage split here, and shifting a few percentage points in either direction won’t make or break your financial future.
Should you pay off debt or invest first? Get the match, kill anything charging 20%+ interest before you invest another dollar beyond that match, and treat lower-rate debt like a mortgage or federal student loans as something you can pay down alongside investing rather than something that has to be cleared first. The interest rate on the debt is the whole ballgame — compare it to what you could realistically earn investing, and let that comparison, not fear or guilt about owing money, drive the decision. Once you’re out of the high-interest danger zone, you have real flexibility, and there’s no wrong answer as long as you’re actually doing something with your money instead of letting it sit still.