Should I Pay Off Debt or Invest First? The Math Explained

Advertisement

Above 8% APR, pay debt. Below 5%, invest. In between, split. But there are crucial exceptions 鈥?the employer match, tax-advantaged accounts, and your own psychology.

The Question Every Adult Faces

You have $500 of monthly slack. You also have $15,000 of credit card debt at 18% and a 401(k) that earned 11% last year. Do you pay down the debt or invest the money?

The internet has unlimited opinions. The math, fortunately, gives a clear answer for most situations. This article walks through the framework planners actually use.

The 7% Rule (And Why It's Wrong)

A common rule of thumb says: "If your debt rate is above 7%, pay it off first. Below 7%, invest." It's roughly right and dangerously wrong at the same time.

Right because: the S&P 500's long-run real (inflation-adjusted) return is about 7%, so any debt costing more than that is a worse deal than investing.

Wrong because: it ignores tax effects, risk premiums, employer matches, behavioral psychology, and the simple fact that paying off debt gives you a guaranteed return while investing gives you an expected return. A guaranteed 6% beats an expected 7%.

The Real Framework

Most planners use a five-step priority order:

Priority 1: Capture every dollar of employer 401(k) match

If your employer matches 50% of your contributions up to 6% of salary, that's an instant 50% return on every dollar 鈥?better than any debt rate. Always max the match first. The only exception: if you'd lose your home or default on a basic obligation. In that case, fix that first.

Priority 2: Build a $1,000鈥?2,000 starter emergency fund

Without it, the next car repair or vet bill goes back onto a credit card. Three months of debt progress, gone in one weekend. This step takes most households 1鈥? months and is non-negotiable.

Priority 3: Pay off high-APR debt (above 8%)

Credit cards, store cards, payday loans, private student loans above 8%, high-rate personal loans. These are all paying you a guaranteed 18鈥?5% return when you eliminate them. Nothing in your investment portfolio can compete with that on a risk-adjusted basis.

Priority 4: Build a full 3鈥? month emergency fund

Now you can survive a job loss without re-incurring debt. Most households put this in a high-yield savings account earning 4鈥?%.

Priority 5: Invest and pay off low-rate debt simultaneously

Below 8% (federal student loans, mortgages, sub-7% personal loans, auto loans below 7%), you can reasonably split contributions between investing and extra debt payoff. The math tilts toward investing 鈥?but the psychological benefit of being completely debt-free is real and worth something.

A Worked Example

Jamie has $500/month. He has $15,000 of credit card debt at 18% APR and a 401(k) with a 100% employer match up to 4% of salary ($200/month).

Year 1 plan:

  • $200/month to 401(k) (captures the match 鈥?that's $4,800 of free money)
  • $300/month extra to the credit card on top of the minimum

The credit card hits zero in about 36 months. After that:

  • $200/month to 401(k) (continues)
  • $500/month to investing (Roth IRA + taxable brokerage)

Run the math out 10 years and Jamie is debt-free with about $95,000 invested (assuming 8% return). If he had skipped the employer match and put everything toward debt, he'd be debt-free in 30 months but have only $52,000 invested after 10 years 鈥?a $43,000 loss in net worth.

Why the Math Tilts to Debt Above 7鈥?%

Three reasons:

  1. Risk-free vs risky. Paying off an 18% credit card is a guaranteed 18% return. Investing is an expected 7鈥?0% return with variance. Investors should require a risk premium, so a guaranteed 18% destroys an expected 9%.
  2. Tax effects. Investment returns get taxed (capital gains 15鈥?0% in the U.S.). Debt interest savings are not taxable. A 7% guaranteed return after-tax beats a 9% expected return that becomes ~7% after taxes.
  3. Compounding direction. Debt compounds against you. Investments compound for you. Eliminating compounding-against-you debt is more powerful than the equivalent compounding-for-you investment because of the way the math interacts with monthly payments.

Why the Math Tilts to Investing Below 5鈥?%

Federal student loans at 4鈥?%, mortgages at 6鈥?%, auto loans at 5鈥?% 鈥?these are below the historical investment return. Mathematically, you make more money by keeping the debt and investing the difference.

Three caveats:

  • The math assumes you actually invest the extra money. If you'll spend it instead, the comparison is moot.
  • Investment returns aren't guaranteed. A bad decade (2000鈥?010 returned about 0% real) erases the theoretical advantage.
  • The psychological value of zero debt is real. Some people sleep better with no mortgage even if it's mathematically suboptimal.

The Middle Zone: 6鈥?%

This is the genuinely uncertain zone. Private student loans at 7%, personal loans at 7%, second mortgages at 8%. The math is close to break-even. Most planners recommend splitting 50/50 between extra debt payment and investing, and reviewing each year.

Use our Savings vs Debt Calculator to plug in your exact rates and see the 5-year and 10-year net worth projection.

Behavioral Considerations

The math doesn't capture everything. Some real factors:

  • Some people invest and immediately spend. If watching a brokerage balance grow leads you to "feel rich" and spend more, debt payoff is safer.
  • Some people stick with debt forever. If a comfortable monthly minimum payment leads you to keep the debt for life, the psychological math suggests aggressive payoff regardless of rate.
  • Debt-free is a real feeling. Many people report that being completely debt-free unlocks career and life decisions they didn't realize they'd been constrained on. That's worth something even if it's hard to measure.

Tax-Advantaged Accounts: A Special Case

Roth IRAs, traditional IRAs, 401(k)s, HSAs, and similar tax-shelter accounts have annual contribution limits. Once the year is over, you can't go back. This creates "use it or lose it" pressure to fund these accounts every year, even when paying off debt seems more attractive.

A common compromise: contribute at least to your IRA limit each year ($7,000 in 2026, $8,000 if 50+), even while aggressively paying off debt. The lost tax shelter is permanent; the debt interest is recoverable.

The Bottom Line

If your debt is above 8% APR, pay it off before investing (except for the employer match). If your debt is below 6%, invest while paying minimums. In the 6鈥?% middle zone, split 50/50 and re-evaluate yearly. Always capture the employer match first. Always build a starter emergency fund first.

Run your exact situation in our Savings vs Debt Calculator to see which path builds more net worth at 5 and 10 years out.

Advertisement

Frequently Asked Questions

Should I invest while paying off debt?
Capture your employer 401(k) match first (it's free money), build a $1,000鈥?2,000 emergency fund, then pay off any debt above 8% APR before aggressive investing.
What if my debt is below 5%?
Federal student loans and mortgages below 5% are usually fine to pay slowly while investing the difference. The expected investment return exceeds the debt cost.
Is paying off my mortgage early a good idea?
Mathematically usually no 鈥?mortgage rates are typically lower than expected investment returns. Psychologically yes for many people. Run both scenarios in our calculator.
What about a Roth IRA vs debt payoff?
Roth IRA contribution limits don't roll forward. If you skip a year, you lose that tax shelter permanently. Most planners recommend contributing at least the IRA minimum each year even while paying debt.
Does it matter if my debt is tax-deductible?
Yes. Mortgage interest and student loan interest are deductible in the U.S. (within limits). This effectively lowers your after-tax debt rate, tilting the math further toward investing.
Advertisement
Ready to run your own numbers?
Try our free Debt Payoff Calculator, Minimum Payment Calculator, DTI Calculator, or Savings vs Debt Calculator 鈥?all free, no signup.