Pay Off Debt or Invest First? (Calculator + 2026 Math)
If you have $5,000 in extra cash, $4,800 on a credit card at 22% APR, and a 401(k) match sitting on the table, what should you do first? The answer is not "whichever feels better" — it is a math problem with one right answer for your specific numbers. This guide gives you the math, a free calculator, and a decision tree that handles the most common cases.
The core idea in one sentence
That is the whole framework. Everything below is just applying it carefully.
Free calculator: debt payoff vs investing
Enter your debt's APR and your expected investment return. The calculator tells you which choice has the higher expected dollar value over your chosen time horizon.
The calculator runs entirely in your browser. No data is sent anywhere.
The decision tree (what most people should actually do)
The calculator answers the math question. The decision tree below answers the real-life question, which includes things like employer matches and emergency reserves that the simple math misses.
- Always grab the full 401(k) match first. If your employer matches 50% of contributions up to 6% of salary, that match is an instant 50% return on every matched dollar. No debt rate beats that. Contribute at least up to the match before you do anything else.
- Build a $1,000-$2,000 mini emergency fund. Without one, the next car repair goes back on the credit card and you are running in place. Park this in a high-yield savings account.
- Attack debt above 7% APR aggressively. Credit cards (typically 18%-29%), payday loans, and high-rate personal loans all clear this bar. Throw every spare dollar at these. The math is overwhelming — see Case A below.
- Build a 3-6 month full emergency fund. While paying down lower-rate debt or investing, this should grow in parallel.
- For 4-7% APR debt, split. Federal student loans (4-7%), car loans, and similar. A 50/50 or 70/30 split between extra debt payment and investing makes sense. See Case B.
- For sub-4% APR debt, invest. A 3.5% mortgage or a 3% federal student loan is below the historical market return. Pay the minimum and invest the rest. See Case C.
Three real-world cases, with the math worked out
Case A: $5,000 credit card debt at 22% APR, $5,000 in spare cash
Pay the debt. Every dollar wiped out at 22% APR avoids 22% in interest charges next year — a guaranteed, tax-free 22% return. The S&P 500's best historical decade returned roughly 13-15% annually. The math is not close.
· Pay debt: avoid $1,100 in interest charges. Net gain = $1,100.
· Invest at 8%: earn ~$400. Pay $1,100 in card interest. Net loss = $700.
Difference: $1,800 in your favor by paying the debt.
Case B: $30,000 federal student loan at 5.5%, $500/month extra cash
Split the difference. The 5.5% rate is in the gray zone — close to but below the long-run market average. A 50/50 or 60/40 split (extra debt payment vs Roth IRA) gives you mathematical progress on both fronts and meaningful behavioral wins (debt drops, retirement balance grows).
Federal student loan interest may also be partly tax-deductible — the IRS student loan interest deduction allows up to $2,500 of paid interest to be deducted each year for qualifying borrowers, which lowers the effective rate further. Always check current eligibility rules at IRS.gov.
Case C: $250,000 mortgage at 3.5%, $1,000/month extra cash
Invest. A 3.5% mortgage is well below the historical S&P 500 average of ~10%. Even after taxes and conservatively assuming 7% real returns, investing wins by a wide margin. Pay your normal mortgage payment and direct the extra $1,000 to retirement and brokerage accounts.
Five things the simple math misses
- Tax treatment. Mortgage interest may be deductible (only if you itemize); student loan interest may be partly deductible. Investment gains in a Roth grow tax-free. Effective rates differ from sticker rates.
- Employer match. A 50% employer match on retirement contributions is a 50% guaranteed return for the matched portion. It beats virtually any debt. Take the match before paying extra debt.
- Behavioral factors. Some people will not invest aggressively while debt looms; some will invest enthusiastically but never throw extra at debt. The mathematically optimal plan you will not follow is worse than the slightly suboptimal plan you will. Pick a strategy that matches your psychology.
- Liquidity. A dollar in your Roth IRA is harder to access than a dollar in checking. A dollar in home equity (from extra mortgage payments) is locked up entirely until you sell or refinance. Liquidity matters when emergencies happen.
- Variable vs fixed rates. A variable-rate credit card at 22% today could be 26% next year if the Federal Reserve raises rates. Fixed federal student loans will not. Variable-rate debt is more dangerous and deserves faster payoff.
A note on the Consumer Financial Protection Bureau
The Consumer Financial Protection Bureau (CFPB) publishes free, unbiased guides on credit card debt, student loans, and predatory lending. If you are facing collections or unsure of your rights as a borrower, start there before paying for any "debt-relief" service. Most legitimate debt counseling is free or very low-cost through nonprofit credit counseling agencies.
Quick checklist before you decide
- Do you have a $1,000+ mini emergency fund? If no, build that first.
- Are you contributing enough to get the full employer 401(k) match? If no, start there.
- Is any debt above 7% APR? If yes, that is the priority after the match.
- Are all debts under 5% APR? If yes, lean toward investing.
- Did you run the calculator above with your real numbers? The right answer changes with your specific APR.
Frequently Asked Questions
Should I pay off debt or invest first?
The mathematical answer depends on your debt's APR versus your expected investment return. If your debt's APR exceeds the expected market return (roughly 7–10% for a diversified stock portfolio), paying off the debt first produces a higher guaranteed return. If your debt rate is below that threshold, investing while making minimum debt payments typically produces better long-term outcomes. Always capture any employer 401(k) match first — it represents an immediate 50–100% return on matched contributions.
What is the APR threshold for paying off debt versus investing?
Most financial educators use 7% APR as the dividing line, based on conservative long-run S&P 500 historical returns (approximately 7% after inflation). Debt above 7% APR — such as credit cards at 18–29% APR — should typically be paid off before investing beyond the employer match. Debt below 5% APR (such as many federal student loans or low-rate mortgages) generally favors investing alongside regular minimum payments.
Should I always grab my employer's 401(k) match before paying debt?
Generally yes. An employer match of 50% of your contributions up to 6% of salary represents an immediate 50% guaranteed return on each matched dollar — no debt interest rate matches that. Most financial educators recommend contributing at least enough to capture the full employer match before directing extra dollars to debt payoff, regardless of your debt's interest rate.
Is credit card debt always the highest priority to pay off?
For most people, yes. Credit card APRs in 2026 typically range from 18–29%, well above both the employer-match threshold and the historical market return. The Consumer Financial Protection Bureau (CFPB) recommends prioritizing high-interest revolving debt before lower-rate installment debt. After the employer match and a small emergency fund, high-rate credit card debt is generally the next priority.
Can I pay off debt and invest at the same time?
Yes — a split approach is common for debt in the 4–7% APR range. For example, directing 50–60% of extra monthly cash to debt payoff and 40–50% to a Roth IRA provides mathematical progress on both fronts. The right split depends on your specific debt rates, time horizon, and employer match situation.
Does paying off my mortgage early make financial sense?
For most borrowers with fixed-rate mortgages below 4% APR, the historical evidence favors investing extra cash rather than prepaying the mortgage. At a 3.5% mortgage rate, even conservative market return assumptions of 7% annually favor investing. However, liquidity, risk tolerance, and behavioral factors all matter — a paid-off home provides psychological certainty that market returns do not. This is general educational information; consult a licensed financial advisor for guidance specific to your situation.
Get the GWN Money Desk Weekly
Plain-language money guidance, once a week. No spam, unsubscribe anytime.