Debt Payoff vs Invest Decision Calculator
Should you put your extra cash toward paying off debt or invest it in the stock market? This calculator compares both 10-year outcomes side-by-side, factoring in your tax bracket and expected investment return.
The "Pay Off Debt or Invest" Decision Math
This is one of the most common personal finance questions in 2026. The answer depends on a simple comparison: your debt's after-tax interest rate vs your investment's after-tax expected return. According to the SEC's investor education materials, the S&P 500 has returned roughly 10% annually before inflation and 7% after inflation over the past 90 years. Compare that to your debt rate:
- Credit card debt (20–28% APR): Always pay off first. No legal investment beats a guaranteed 22% return.
- Personal loans (10–15% APR): Usually pay off first. Investment returns rarely beat this consistently.
- Auto loans (6–9% APR): Gray zone. Roughly tied with stock market expected return.
- Student loans (4–7% APR): Often invest, especially if tax-deductible. Federal student loan interest is deductible up to $2,500 per IRS Form 1098-E.
- Mortgage (6–7% APR): Usually invest, especially in tax-advantaged accounts (401k, IRA). Plus mortgage interest may be deductible per IRS Pub 936.
The Math Behind the Decision
If your debt rate (after tax adjustments) is higher than your expected investment return (after tax adjustments), pay off the debt. If lower, invest. The math is:
Pay off if: debt_rate × (1 − debt_tax_deductibility) > investment_return × (1 − investment_tax)
This calculator simulates the actual cash flows month by month. In Strategy A, you throw all your extra cash at the debt until it is gone, then invest. In Strategy B, you make only the minimum debt payment and invest the difference. The strategy with higher net worth at the end wins.
Beyond Math: The Behavioral Case for Paying Off Debt
The CFPB and behavioral finance research note that paying off debt has psychological benefits the math does not capture: reduced anxiety, lower temptation to over-spend, freedom to take career risks, and immunity to job loss. Dave Ramsey's "debt snowball" prioritizes psychology (smallest debt first regardless of rate) — the math favors the "debt avalanche" (highest rate first). For most people, the snowball wins because it keeps them motivated long enough to finish.
The Emergency Fund Comes First
Before either strategy, ensure you have $1,000–$3,000 in emergency savings. Without this buffer, an unexpected expense (car repair, medical bill) will force you to add new debt to a credit card — potentially erasing months of progress. The CFPB recommends 3–6 months of expenses as a full emergency fund, built up after high-interest debt is gone.
Tax-Advantaged Accounts Tilt the Math
If your employer offers a 401k match, take it before paying off any debt below ~10% interest. A 100% match (1:1) is an instant 100% return — no debt rate beats that. The SEC and Department of Labor both prioritize capturing employer matches before other financial goals.
Sources: SEC investor education (investor.gov), Consumer Financial Protection Bureau (consumerfinance.gov), Federal Reserve Survey of Consumer Finances (federalreserve.gov), Department of Labor 401k guidance (dol.gov), IRS Publication 936 and Form 1098-E (irs.gov). Last updated: May 2026.
Frequently Asked Questions
Should I pay off credit card debt before investing?
Yes, almost always. Credit card APRs typically range from 20–28% — no legal investment reliably beats that return. The Federal Reserve consumer credit data confirms credit card rates have averaged 21–24% in 2025–2026. Pay credit cards to zero before any non-401k-match investing. The math is one-sided: a guaranteed 22% return from paying off the card vs. an expected 7% pre-tax return from the stock market.
What about my mortgage — should I pay it off early or invest?
For most people, invest. Mortgage rates today (6.5–7.5%) are close to the historical stock market average (7% real). When you invest in tax-advantaged accounts (401k, IRA), the after-tax return typically beats the after-tax cost of a mortgage. The mortgage interest deduction (IRS Pub 936) makes the effective mortgage rate even lower for itemizers. Pay extra principal only if rate is above 8% or you value debt-free psychology.
What if my employer offers a 401k match?
Take the match before paying off any debt under ~10% interest. A 100% employer match is an immediate 100% return — no debt rate competes with that. The SEC and Department of Labor both list capturing the full match as the first priority in retirement planning. Only credit card debt at 22%+ APR might justify skipping the match temporarily, and even then most advisors would still recommend at least getting the match.
How does the calculator handle student loan interest?
For federal student loans, interest is tax-deductible up to $2,500/year per IRS Form 1098-E (phased out at higher incomes). Effectively this lowers your debt rate by your marginal tax bracket. A 6% federal student loan with a 22% tax bracket = 4.7% effective rate, often below market expected returns. This calculator does not model deductibility automatically — adjust your debt rate manually if your interest is deductible.
Why does the calculator subtract tax on investment gains?
Investment gains are taxed by the IRS. Long-term capital gains rates are 0%, 15%, or 20% based on income (per IRC Section 1(h)). Short-term gains and traditional 401k withdrawals are taxed at ordinary income rates. Roth IRA / Roth 401k withdrawals are tax-free in retirement (subject to 5-year and age-59½ rules). Including the tax gives a true comparison of after-tax outcomes.
What about emergency fund before either choice?
Build a $1,000–$3,000 starter emergency fund before extreme debt payoff or aggressive investing. The CFPB notes that 39% of Americans cannot cover a $400 emergency with cash — those who lack a buffer end up adding new credit card debt at 22%+ when life happens. A small buffer first, then attack debt or invest. Build to 3–6 months of expenses after high-interest debt is paid off.