Pay Off Debt or Invest Calculator

✓ Free ✓ No signup ✓ Private — runs in your browser By Evan Marsh · Last reviewed: July 8, 2026 · how we calculate

You have a debt, a required payment, and some money left over each month. Send the extra at the debt, or invest it and let the loan run its course? This calculator settles it fairly: both paths get exactly the same dollars every month and are measured at the same finish line — the month the debt would die on required payments alone. You see what each path is worth on that day, and the crossover return where the answer flips. Everything runs in your browser; nothing is stored.

Calculator

The amount you could either prepay or invest
Long-run US stock averages are often quoted at 7–10% before inflation — never guaranteed
Bar chart: prepaying the debt and investing instead both net $45,751 when the debt rate equals the expected return.
The crossover is simply your debt’s APR. Paying off 7% debt IS a guaranteed 7% return — and the market’s 7% is a hope, not a promise.

The only fair comparison: same finish line

Most versions of this debate quietly cheat. They compare ten years of investing against three years of debt payoff, or they let one path spend more total money than the other, and then act surprised when the bigger, longer pile wins. The comparison is only meaningful when both paths get the same dollars every month and are measured on the same day.

This calculator picks the natural finish line: month N, the month your debt would die on required payments alone. Both paths commit your required payment plus your spare money every single month from now until then — not a dollar more or less. The prepay path throws everything at the debt first; when the debt dies early, the entire freed-up payment is redirected into investing for the remaining months. The invest path pays only the required payment and puts the spare into the market from month one, letting the debt run its full course. On day N, both debts are gone, both paths have spent identical totals, and each has an investment balance. Whichever balance is bigger won — no asterisks needed for the arithmetic itself. The asterisks live somewhere else.

Should you pay off debt or invest?

Strip away the simulation and the rule is one line: investing wins if your after-tax return beats the debt’s APR; prepaying wins if it doesn’t. That is why the crossover rate this calculator computes lands essentially on your interest rate — prepaying a 7% debt is earning 7% on that money, compounding, for the loan’s remaining life. On paper, a 7% debt versus a 7% expected return is a dead heat. But the two sides of that equation are not the same kind of number, and that is where the three asterisks come in.

The engine behind that verdict is deliberately simple. Every month, both paths commit the same total budget; whatever the debt doesn’t swallow that month gets invested:

Invested this month = (required payment + spare) − what the debt takes

Investing wins if expected return > crossover rate ≈ debt APR

Here is that comparison run on the calculator’s own defaults — a $20,000 debt at 7.0% APR, a $250 required payment and $300 spare — with only the assumed return changing. On required payments alone the debt dies in 109 months (9 yr 1 mo), so that is the finish line where both paths are measured; the prepay path clears the debt in 41 months (3 yr 5 mo) and then invests the whole $550. Both paths spend an identical $59,950 in total:

Assumed annual return Prepay path at month 109 Invest path at month 109 Winner
4% $41,907 $39,583 Prepay, by $2,324
6% $44,421 $43,567 Prepay, by $854
7% (the default, and the debt’s APR) $45,751 $45,751 Dead heat
9% $48,565 $50,548 Invest, by $1,983

Read the middle row carefully, because it is the whole argument in one line: when the assumed return equals the debt’s APR, the two paths finish on exactly the same dollar. That is not a coincidence or a rounding artifact — it is what “the crossover rate is your APR” means. Every row above it and below it is just that same rule, priced out. And note what the table does not claim: nothing here predicts what markets will return. It only shows what each assumption implies, which is why the honest way to use the calculator is to run it twice — once at the return you hope for, once at one you’d bet on.

First: the guarantee. The prepay return is certain. The moment your extra payment posts, the interest it cancels is cancelled — no market crash can claw it back. The invest return is an average, and averages hide brutal stretches. Over a short horizon, a bad early run can leave you far below the long-run number just when the comparison ends.

Second: taxes. Interest you never pay is never taxed; the prepay return is tax-free by construction. Investment gains in an ordinary account are not — dividends and realized gains give some of the return back, so a quoted 7% may be closer to 5.5–6% after tax unless the money sits in a sheltered retirement account.

Third: behavior. The invest path only works if the spare money actually gets invested every month for years, and the prepay path only beats it if the freed-up payment really gets redirected after the debt dies instead of dissolving into lifestyle. The math assumes a discipline that real budgets don’t always deliver — and the path you will actually follow beats the path that only wins in a spreadsheet.

When prepaying is clearly right

High-APR debt ends the debate. A credit card at 24% is a guaranteed, tax-free, risk-free 24% return on every dollar of principal you kill — no legal investment offers anything close, and no honest expected-return assumption survives the comparison. Anything in the double digits deserves every spare dollar you have; our credit card payoff calculator maps out the attack plan when several cards are involved.

No emergency fund yet also ends it — though the honest answer there is “neither, aggressively.” Cash savings come before market investing, because investments sold in an emergency may be down exactly when you need them, and before heavy prepaying, because extra payments can’t be un-sent when the transmission fails.

And the sleep-at-night value is real. Some people carry debt lightly; others feel it every day. If owing money keeps you anxious, the guaranteed return plus the psychological one is a legitimate combined payoff — just know which part of the return is mathematical and which part is peace of mind, so you’re choosing it on purpose.

When investing is clearly right

An employer 401(k) match beats everything on this page. A match is free money at 50–100 cents per dollar contributed — an instant 50–100% return before the investment itself earns anything. No debt short of loan-shark territory charges enough to outrank that, so capturing the full match comes first, ahead of extra payments on any normal debt. Only the dollars left after the match belong in this calculator’s comparison.

Low fixed-rate debt is the other clear case. If your loan sits below roughly 4–5% — an old mortgage, a cheap auto loan, subsidized student debt — the guaranteed return from prepaying is modest, inflation is quietly eroding the balance in real terms, and even conservative assumptions give investing a comfortable edge over a long horizon. That doesn’t make prepaying wrong; it makes it a choice you’re paying for. The question is sharpest with mortgages, where the horizon is decades and the rate is often the lowest you’ll ever borrow at — our mortgage payoff calculator handles the mortgage-specific version, extra-payment schedules and all.

The hybrid most people should run

Framing this as either/or is the last trap, because the strongest answer for most budgets is a sequence, not a side. First, capture the full employer match — nothing else pays 50–100% instantly. Second, kill genuinely high-APR debt — cards and anything in the double digits are guaranteed returns too good to skip. Third, with what remains, split. Once the surviving debt is mid-single-digit, the math is close enough that a 50/50 or 70/30 split between prepaying and investing is entirely defensible — you bank part of the guaranteed return, keep part of the money compounding in the market, and stop treating a coin-flip-close decision as all-or-nothing.

The calculator above is built for exactly this triage: run it once per debt with your real spare amount and a return assumption you actually believe after taxes. Where the winner is decisive, follow the math. Where it’s within a rounding error — as it will be whenever your APR sits near your expected return — the tie-breakers are the asterisks: the guarantee, the taxes, and which plan you’ll genuinely stick to for the whole ride.

Frequently Asked Questions

Do I have to pay taxes on the investment gains?

Usually, yes — and the calculator does not subtract them, so treat the invest-path number as a before-tax figure. In a regular brokerage account, dividends are taxed the year you receive them and gains are taxed when you sell (long-term rates of 0–20% for most people, plus state tax). Inside a 401(k) or IRA the growth is sheltered, which tilts the comparison meaningfully toward investing. The prepay path needs no adjustment: interest you never pay is never taxed.

What investment return should I assume?

Be conservative. Long-run US stock averages are often quoted at 7–10% per year before inflation, but that is an average across a century that included long flat stretches — no one is owed it over your particular five or ten years. A useful habit is to run the calculator twice: once at your hopeful number and once at something like 4–5%. If investing only wins under the hopeful assumption, that tells you how much of the case rests on optimism.

What role does inflation play?

It quietly helps the borrower. A fixed-rate debt is repaid in future dollars that are worth less than today’s, so inflation erodes the real burden of the balance every year — one reason low fixed-rate debt is less urgent to kill than it feels. Investments in productive assets tend to (roughly, unevenly) keep pace with inflation over long periods. Neither effect changes the nominal math on this page, but both nudge the real comparison slightly toward investing when the debt’s rate is low and fixed.

Why does the crossover rate come out so close to my debt’s APR?

Because that is the honest math. Paying a dollar of principal early earns you exactly the loan’s rate, compounding, for the debt’s remaining life — so an investment has to beat that rate to beat prepaying. The crossover the calculator finds by simulation will land essentially on your APR, and that is the point: the whole decision reduces to whether you believe your investments will out-earn your debt’s interest rate after taxes and risk.

Should I build an emergency fund before doing either?

Yes, and it is not close. Extra debt payments are a one-way door — once sent, you cannot get the money back without borrowing again, often at a worse rate — and investments sold in an emergency may be down exactly when you need them. Several months of expenses in boring, instantly available savings comes before any acceleration plan, because it is what keeps a surprise car repair from turning back into high-interest debt.

Does this comparison account for an employer 401(k) match?

No, and that is deliberate — a match is not really part of this debate. If your employer matches contributions at 50 or 100 cents on the dollar, that is an instant 50–100% return that neither prepaying nor ordinary investing can approach, so contribute enough to capture the full match before sending extra money anywhere else. This calculator compares what to do with the dollars left over after that.

Does this calculator store my information?

No. All calculations run entirely in your browser. Nothing you type is saved, stored, or sent to any server.

Read more on this

Related calculators

All 16 loans & payoff planning calculators →

Disclaimer: This calculator is for educational purposes only and provides estimates based on the numbers you enter. It is not financial, legal, or tax advice. Actual loan terms, rates, and payments depend on your lender and personal circumstances. All calculations run in your browser — nothing you enter is stored or sent anywhere.