Skip to content

Planning

Pay off debt vs. invest calculator

Should you put extra cash toward your mortgage, student loan, or credit card—or invest it? Compare payoff-first vs. invest-first scenarios using your debt rate, expected return, and time horizon.

How this calculator works

Extra money each month can go toward paying down debt or investing. This calculator compares two paths over a time horizon you choose—defaulting to your remaining loan term when you enter one:

Scenario A — Pay off debt first: Apply the extra payment to accelerate debt payoff. When the loan is eliminated early, invest the freed minimum payment plus the same extra amount for any remaining years in the horizon.

Scenario B — Invest instead: Make minimum debt payments only and invest the full extra amount each month from the start.

The results show interest saved from accelerated payoff, projected investment values under your return assumption, remaining debt at the horizon if the loan is not fully paid, and which strategy leaves you ahead in net worth terms at the end of the period.

Toggle tax-deductible interest when modeling mortgage debt. Deductible mortgage interest lowers your effective borrowing cost after marginal tax savings—for example, 6% nominal interest at a 22% marginal rate behaves like roughly 4.7% for comparison purposes when you itemize and benefit from the deduction.

Investment returns in this model are pre-tax. Taxable brokerage accounts, Roth IRAs, and traditional 401(k)s produce different after-tax outcomes. Employer 401(k) match is not modeled here—capturing the full match usually beats both debt prepayment and generic market assumptions up to the match limit.

The comparison treats debt payoff as a guaranteed return equal to the interest rate eliminated (or the effective rate after tax when deductibility applies). Investment returns are uncertain even when long-term historical averages exceed your loan rate.

See the debt payoff calculator for avalanche and snowball timelines, and the compound interest calculator for growth on a fixed contribution schedule without debt in the picture.

What affects the result

Several inputs shift the balance between payoff-first and invest-first strategies.

  • Debt interest rate — Higher rates make payoff more attractive relative to investing. Credit card rates in the high teens or twenties often dominate expected stock returns on a risk-adjusted basis.
  • Expected investment return — Higher assumed returns favor investing—but returns are not guaranteed, and bad years early in the horizon can lag debt elimination.
  • Tax deductibility — Mortgage interest for itemizers reduces effective borrowing cost. Toggle deductibility and enter your marginal rate for mortgage comparisons.
  • Time horizon — Longer horizons give Scenario A more years to invest after the debt is cleared. Short horizons may not leave enough post-payoff investing time to catch up.
  • Extra monthly amount — Larger extras accelerate payoff in Scenario A and increase invested balances in both paths. Small extras may produce close outcomes where peace of mind matters more than math.
  • Remaining loan term — A loan with 3 years left behaves differently from one with 20 years. The default horizon tied to remaining term reflects how long each strategy has to compound.

Credit card and high-rate consumer debt usually favors payoff after emergency savings and employer match. Low-rate federal student loans, especially with forgiveness or income-driven options, may favor investing additional dollars once higher-priority bases are covered.

Pair with the extra mortgage payment calculator for amortization detail on prepayment, and the retirement projection calculator for long-term savings context beyond a single debt decision.

Real-world examples

Example 1: High-rate credit card. You owe $8,000 at 22% APR with a $200 minimum and can add $300 extra per month. Scenario A eliminates the balance quickly and saves substantial interest—a guaranteed 22% equivalent return. Scenario B investing at 7% expected return may show higher nominal investment value only if the horizon is long and markets cooperate, but the card rate usually wins for most realistic periods.

Example 2: Mortgage with tax deduction. You have a $280,000 balance at 6% with 22 years remaining, itemize deductions, and add $400 per month. Effective borrowing cost near 4.7% after tax vs. 7% pre-tax expected return may favor investing on paper. Scenario A still builds guaranteed savings equal to the effective rate; volatility and sequence risk in Scenario B are not guaranteed to deliver 7% every year.

Example 3: Auto loan close call. A $18,000 balance at 5.5% with $250 extra available vs. 7% expected return: the spread is modest. Outcomes may differ by only a few thousand dollars over 5 years. Some households prefer payoff for cash-flow simplicity even when investing edges ahead slightly.

Example 4: Student loans at 4%. Low fixed-rate federal loans with $150 extra vs. investing in a Roth IRA at 7% assumptions: investing may project higher ending wealth over 15+ years, but payoff reduces monthly obligations and frees cash flow for life changes. Run both scenarios before treating historical averages as a promise.

Example 5: Employer match not modeled. A worker choosing between $300 extra on a 6% mortgage and $300 in a 401(k) with 50% match should fund the match first—the match is an immediate 50% return this calculator does not capture. After the match, rerun the comparison on remaining surplus.

Common mistakes

Ignoring employer 401(k) match. Match dollars are often the highest-return step available. This calculator compares debt vs. generic investing—it does not replace the match-first hierarchy.

Using gross investment returns in taxable accounts. Pre-tax 7% in a taxable brokerage is lower after dividends and capital gains taxes. Roth accounts differ again. Adjust return assumptions downward for taxable investing.

Prepaying before building an emergency fund. Payoff accelerates when you have surplus cash, but draining savings to prepay low-rate debt can force high-rate borrowing when surprises hit. Fund 3–6 months of expenses first unless debt rates are extreme.

Treating expected stock returns as guaranteed. Debt payoff returns are certain; market returns are not. A 7% average over 20 years can include years of negative performance that delay Scenario B's advantage.

Comparing deductible mortgage interest without itemizing. If you take the standard deduction, mortgage interest may not reduce effective cost—turn off deductibility unless itemizing actually benefits you.

Using the wrong horizon. Comparing a 5-year investment window against a 30-year mortgage without aligning assumptions can mislead. Match the horizon to your decision period or remaining loan term.

When to use this calculator

Use it when deciding where consistent monthly surplus should go—mortgage prepayment, student loans, auto loans, or brokerage and IRA contributions. It fits households with one dominant debt and a steady extra payment, not complex multi-debt optimization (use debt payoff for ordering multiple balances).

Reach for it when debating mortgage prepayment vs. investing after emergency fund and employer match are handled, or when a raise creates new monthly surplus and you want a structured comparison.

Pair with the extra mortgage payment calculator for interest saved from prepayment alone, the savings goal calculator for target-based planning, and the retirement projection calculator for nest-egg growth alongside debt decisions.

Skip this estimate for credit card minimum-only traps (see payoff calculators), tax-loss harvesting strategies, or investments with highly uncertain liquidity needs tied to the same cash.

Related calculators

Related guides

  • How to pay off debt — snowball, avalanche, and practical strategies before you choose investing instead.
  • Compound growth basics — why time and reinvestment matter when investing surplus cash instead of prepaying debt.

FAQ

Is it always better to invest if the return beats the interest rate?

Not always. Higher expected stock returns come with volatility and no guarantee. Paying off debt delivers a certain return equal to the interest rate you eliminate. Risk tolerance, emergency savings, and tax-advantaged accounts also matter.

Does paying off my mortgage early save more than investing?

It can when your mortgage rate exceeds expected after-tax investment returns. This calculator models accelerated payoff plus investing the freed payment afterward versus investing the extra while making minimum payments.

Should I pay off student loans or invest in my 401(k)?

Employer 401(k) match is often an immediate 50–100% return and usually comes first. After capturing the match, compare your loan rate to expected long-term investment returns and whether loans are forgiven or subsidized.

What counts as a "guaranteed return" when paying off debt?

Every dollar of interest you avoid by prepaying debt is a certain savings equal to the loan's interest rate. Market returns are uncertain even when historical averages are higher.

How does employer 401(k) match change this decision?

Match dollars are not modeled here. Contribute enough to get the full match before choosing between extra debt payments and additional investing—it is often the highest-return step available.

Does tax-deductible mortgage interest change the comparison?

Yes. Deductible interest lowers your effective borrowing cost. Toggle tax deductibility and enter your marginal rate to compare against pre-tax investment return assumptions.

Are investment returns after tax?

No. Returns are pre-tax. Taxable account returns are lower; Roth and traditional retirement accounts change the math in different ways.