Skip to main content
calculator

Should I pay off debt or invest the money?

Both branches, run month by month over the loan's remaining term with the same money leaving your account either way, and the pre-tax return the market has to earn to tie. Paying the loan returns the loan rate, guaranteed and already after tax. Investing returns whatever you assume, taxed at a rate measured from a complete Form 1040 for 2025. This page names the crossover between them and does not tell you which side to pick.

Published · 2026-08-22Updated · 2026-08-22By Tejas Shah, Co-founderModel · amortization schedule and Form 1040, tax year 2025

Loading the calculator.

Two returns, and only one of them is a promise

The comparison almost everyone runs is this: my loan charges 7.14%, the market returns about 10%, so investing wins. That sentence is wrong twice, and the two errors point in opposite directions, which is why the answer is not obvious.

The first error is tax. A 7.14% loan rate is an after-tax number already. Interest you never pay is not income: § 163(h) makes personal interest non-deductible, so it never touched your return in either direction, and nobody taxes you on a bill that did not arrive. Investment returns are taxed. This household, at $85,000 of wages filing single, pays 22.00% on its next dollar of interest income and 15.00% on its next dollar of long-term gain, both measured by running a complete Form 1040 twice and subtracting rather than by reading a bracket. Put the two on the same footing and the market has to earn 8.18% before tax to match 7.14% guaranteed.

The second error is certainty, and it runs the other way. The loan rate is contractual: it is charged in full, every month, whatever happens. The expected return is the middle of a distribution that includes years where the account falls by a third. Over 5 years the range of outcomes around an average is enormous, and this calculator cannot price the difference between a certain number and an uncertain one. Neither can any other. So what follows is the crossover, which is where the arithmetic ties, and not where the decision does.

Paying a loan is an investment, and its return is the loan rate

To compare the two you have to spend the same money over the same period in both branches, or the comparison is measuring something else. Here is the construction this page uses. The horizon is the loan's remaining term, 5 years. The household spends $737 a month in both branches: the $437 scheduled payment plus the $300 being decided about.

In the first branch the extra goes to the loan. The balance clears in 2 years and 9 months instead of 5 years, and from then on the whole $737 goes into the account. In the second the loan runs its full term and the extra goes into the account from month one. Same outlay, same end date, no debt left in either. Everything that differs is in the ending balance.

Set up that way, one result falls out exactly: when the account grows at the loan rate every month after tax, the two branches end at the same number to the cent, whatever the balance, the extra, or the horizon. That is what it means to say paying a loan returns the loan rate. It is not an analogy. It is an identity, and it is what makes the crossover a computable number instead of a rule of thumb.

The words every month are doing work in that sentence. Inside a Roth nothing is taxed again, so the after-tax rate is the return itself and the crossover is the loan rate, 7.14%. On savings and bonds the tax lands every year, so the after-tax rate is still a constant and the crossover is the loan rate divided by one minus the tax rate, 9.15%. A fund held and sold at the end has no constant after-tax rate at all: everything compounds untaxed and the tax arrives once, on the gain, at the end. There is nothing to divide by there, so that crossover, 8.18%, is solved for instead, by running both branches at candidate returns until they tie.

The interest side is computed the same honest way, which matters more than it sounds. An extra payment does not save the rate times the balance. It saves the interest that would have accrued on the months it removes from the end of the loan. At the inputs above, that is $1,932: the difference between $4,225 of interest at the scheduled payment and $2,293 with the extra, two complete amortization schedules subtracted. The same arithmetic across several debts at once is the debt payoff calculator, which orders them by rate and shows what the avalanche saves over the snowball.

What the market has to earn, at every loan rate

The crossover depends on two things and almost nothing else: the loan rate, and how the account is taxed. Below is the same household, single at $85,000 of wages, across the loan rates people actually carry. Every cell is the pre-tax annual return the market has to hit, over 5 years, to tie.

Loan rateRoth accountIndex fund, heldSavings or bonds
3.00%3.00%3.49%3.85%
5.00%5.00%5.77%6.41%
7.14%60-month new car, G.19 average7.14%8.18%9.15%
9.00%9.00%10.25%11.54%
11.86%24-month personal loan, G.19 average11.86%13.39%15.21%
22.15%credit card assessed interest, G.19 average22.15%24.36%28.40%

Read the first column as the control. Inside a Roth nothing is taxed again, so the expected return is already after tax and the crossover is the loan rate itself, unchanged on every row. Everything to the right of it is the tax gross-up, and it is not small: at the 7.14% average on a five-year car loan, a fund you hold and sell at the end needs 8.18% and money earning interest needs 9.15%. That gap is the whole reason this question is harder than it looks. If your rate is what you want to check rather than what you want to compare, the marginal rate calculator shows the same measurement on your own income, including the credit phase-outs that can charge a middle income more than its bracket.

One thing the table does not show, because it is a fact about the money rather than the rate: a Roth crossover only describes dollars you can actually get into a Roth. The annual contribution limit, the income phase-out on direct contributions, and the penalty on earnings taken out early all bound how much of any real decision that column covers. The 401k calculator prices the tax-advantaged side properly.

Where it stops being a close call

Near the crossover this decision is worth very little. At the default inputs the tie is at 8.18%. Assume 8% and the loan branch ends $51 ahead. Assume 9% and the investing branch ends $238 ahead. Both are rounding on totals of roughly $21,284, which is worth knowing before spending a weekend on the question: within a point or two of your honest expected return, this decision is not moving much money either way.

High-rate debt is a different question with a different answer. At the Federal Reserve's 22.15% average for credit card accounts assessed interest, money in savings or bonds has to return 28.40% before tax, every year, to match paying the card off, and a fund held and sold at the end has to return 24.36%. Long-run stock returns have not been at that level, and more to the point the card rate is not an average of anything: it is charged in full every month whether or not the market cooperates.

The worked case: $8,000 at 22.15% with $200 a month spare over 3 years. Paying it down clears the balance in 19 months, avoids $1,475 of interest, and ends $1,164 ahead of investing the same money at 7.00%. The crossover here is 24.92%, a little above the 24.36% on the same rate in the table above, because that row runs the default 5 years and deferring a sale tax is worth more the longer you defer it. The credit card payoff calculator runs that side month by month, including what happens if you keep making the minimum instead.

What outranks this question arithmetically

Two things beat both branches on this page, and neither is a preference.

An employer match is the first. A dollar-for-dollar match is a 100% return the instant it lands, before the money has earned anything. No loan rate in the table above and no expected return anyone would type comes near that. If your plan matches and you are not contributing enough to collect all of it, the next dollar has an obvious home and it is not either branch here. This calculator does not model the match at all; the 401k calculator does.

Cash you can reach is the second, and its return is not measured in percent. Without a buffer, the next unexpected bill goes on a card at 22.15%, which undoes months of either branch in a single transaction. That is not a claim about risk tolerance; it is the observation that the alternative to having cash is borrowing at the highest rate in the table. The emergency fund calculator sizes that buffer against your own expenses.

After those two, the question this page asks is genuinely open, and the crossover is the number that frames it. If you want to see what the investing branch does on its own, without a loan in the picture, the compound interest calculator runs monthly contributions forward at whatever return you assume, and the capital gains calculator prices the tax when you eventually sell.

What this calculator does not know

Your risk tolerance, which is the whole remaining question. The crossover says the two branches tie at 8.18%. It does not say whether you would rather have a certain 7.14% or a coin weighted toward 8.18%, and that preference is not a number this page can compute or should guess. It also does not know whether a market drop in month 40 would make you sell, which changes the expected return you should have typed in the first place.

The dividends a real fund pays. Under the index fund, held setting the account is taxed once, at the end, at 15.00%. A real index fund also distributes qualified dividends every year and those are taxed as they arrive, so the true drag sits between that setting and the savings or bonds one at 22.00%. The calculator does not model a dividend yield, because it would be a number invented rather than sourced, so the crossover it shows for a fund is slightly low rather than slightly high, and the direction of that error is stated instead of hidden.

Deductible interest. This page treats avoided interest as untaxed, which is right for a car loan, a personal loan, or a credit card. It is wrong for a mortgage under § 163(h)(3) or for up to $2,500 of student loan interest under § 221, both of which come off taxable income. Where the interest is deductible, avoiding it saves you less than the full rate and the real crossover is below the one shown here.

Everything outside federal income tax on wages. State and local tax sits on top of every rate here and in some states adds more than a full bracket. Contribution limits, the income phase-outs on tax-advantaged accounts, early-withdrawal penalties, prepayment penalties on the loan, variable rates, and a mortgage's own escrow are all absent. The children input is capped at 2 because at three qualifying children the refundable credit switches to a formula this engine does not compute. The parameter set is tax year 2025 only, not a history of past brackets, and none of this is advice.

For agents and scripts

This calculator is built to be used without a browser. Every input is a query parameter on this page, and the same parameters on the JSON twin return the complete answer as a document.

GET /tools/debt-or-invest.json?balance=8000&rate=22.15&years=3&extra=200&income=85000

The response carries inputs after parsing and clamping, result with crossover, the pre-tax return at which the two branches tie, alongside loanReturn, marginalRate, and both ordinaryRate and ltcgRate measured from complete Form 1040 returns, plus debt and invest, each with contributions, gross value, tax at sale and ending value at the horizon, the interest each schedule pays as interestWithout, interestWith and interestSaved, a ladder of expected returns with the tie flagged, sensitivity across all three tax treatments and all five filing statuses, drivers, and computability, the engine's verdict on the returns behind the rate, drivers ranked by effect with a plain sentence each, assumptions that say for every field whether you supplied it and name the source when the default came from one, sources with a URL and an as-of date for each source the tool cites, which is an empty list on the calculators whose every default is an example input rather than a published figure, warnings, a disclaimer, and in tool the canonicalUrl and jsonUrl that carry only your non-default parameters. The canonical URL is the answer's permanent address; use it when you cite the number.

Parameters, all optional, in any order:

  • balance ($), default $22,000.
  • rate (%), default 7.14%, from Federal Reserve, G.19 Consumer Credit (June 2026 data).
  • years (years), default 5 years.
  • extra ($ per month), default $300 per month.
  • expectedReturn (%), default 7%.
  • income ($ per year), default $85,000 per year.
  • dependents (count), default 0.
  • treatment (one of index-fund, interest, roth), default index-fund.
  • status (one of single, married-joint, married-separate, head-of-household, qualifying-surviving-spouse), default single.

Values accept plain numbers and loose human formats such as 100k, $100,000, or 6.5%. Unknown parameters are ignored, values outside a field's range are clamped and reported in warnings, and the endpoint never fails on bad input. Responses are cacheable for a day; the defaults change when their sources publish, and tool.version changes when the method does.

Common questions

Should I pay off debt or invest?

This page will not answer that, and no calculator honestly can. What it can do is name the price of each choice. A 7.14% loan returns 7.14%, guaranteed, and that return is already after tax because interest you avoid is not income. Money in index fund, held is taxed at 15.00% on this household's next dollar, so it has to earn 8.18% before tax over the same 5 years just to tie. Above that number investing wins on average; below it the loan does. The part left over is whether you want a certain 7.14% or an uncertain 8.18%, and that is a question about you, not about arithmetic.

Is paying off a loan really the same as an investment?

Yes, and the equivalence is exact rather than a metaphor. Every dollar sent to principal removes that dollar's future interest at the loan rate, compounded monthly, for as long as the loan would have run. Run both branches month by month with the same total outlay and the same end date and they land on the same number, to the cent, when the account grows at the loan rate every month after tax. That is what makes the loan rate a return: not that it feels like one, but that swapping it for an equal after-tax market return changes nothing about where you end up.

Why does the market have to earn more than my loan rate to be worth it?

Tax. Interest you avoid never reaches your tax return, because § 163(h) makes personal interest non-deductible, so a 7.14% loan rate is a 7.14% after-tax return. Investment returns do reach your return, and this household pays 22.00% on its next dollar of interest income and 15.00% on its next dollar of long-term gain. Grossing the loan rate back up for that tax is the entire adjustment: 7.14% becomes 9.15% for money in savings or bonds, 8.18% for a fund held and sold at the end, and stays 7.14% inside a Roth where the return is already after tax.

What about credit card debt at 22%?

That is not a close call and the arithmetic says so loudly. At the Federal Reserve's 22.15% average rate on card accounts assessed interest, the market would have to return 28.40% before tax, every year, just to match paying the card off, 24.36% in a fund held and sold at the end, and 22.15% even inside a Roth, where nothing is taxed again and the bar is as low as it goes. On $8,000 of balance with $200 a month spare, paying it down clears the debt in 19 months instead of 3 years and avoids $1,475 of interest. The card payoff calculator at /tools/credit-card-payoff shows that side in month-by-month detail.

Does an employer match change the answer?

It outranks the question entirely, and this calculator does not model it. A dollar-for-dollar match is a 100% return the moment it lands, which no loan rate on this page and no expected return in it comes close to. If your plan matches and you are not contributing enough to collect all of it, that is arithmetic rather than preference: the match is the highest return available to you. The 401k calculator at /tools/401k prices the match and the deferral together. Once the match is collected in full, this page's question is open again.

Can an agent or a script use this calculator?

Yes, and it is the same computation the page runs. Every input is a query parameter, and the same parameters on /tools/debt-or-invest.json return the full answer as JSON: the crossover return, the marginal rate on both ordinary income and long-term gain measured from complete Form 1040 returns, both branches with their contributions, gross value, tax at sale and ending value, the interest each schedule actually pays, a ladder of expected returns with the tie flagged, the crossover under all three tax treatments and all five filing statuses, the drivers, and the engine's own computability verdict. The page itself reads that endpoint, so the agent surface cannot quietly drift from the human one.

Sources

  • Federal Reserve, G.19 Consumer Credit (June 2026 data), as of 2026-08-07. Commercial bank interest rates, May 2026: 60-month new car loans 7.14%; 24-month personal loans 11.86%; credit card accounts assessed interest 22.15%. The loan rate this page starts from is the car figure, and the card figure is the one the page uses to show where the comparison stops being close.
  • IRS Rev. Proc. 2024-40 (2025 inflation-adjusted items), as of 2024-10-22. The ordinary rate tables and the long-term capital gain breakpoints for tax year 2025, which are what the engine applies when it computes the return twice to measure the rate on investment income.
  • Public Law 119-21 § 70102 (2025 standard deduction), as of 2025-07-04. The 2025 standard deduction the engine actually applies, raised by this statute after Rev. Proc. 2024-40 had set it. It decides how much taxable income sits under the extra dollar of investment income, so it decides the rate on it.
  • 26 U.S.C. (Internal Revenue Code), as of 2026-04-21. The rules that make the two sides asymmetric: § 1(h) preferred rates on long-term gain, § 1411 the 3.8% net investment income tax, § 24(b)(2) the child credit phase-out that any extra income walks into, and § 163(h) making personal interest non-deductible, which is why interest you avoid comes back to you untaxed.

The loan rates are the Federal Reserve's own published averages, not illustrative numbers, and the tax parameters are the ones the engine reports for every computation rather than citations chosen after the fact. The code sections are the rules that make the two sides of this comparison asymmetric in the first place. When the engine loads a different parameter set, this list changes with it.

Want the number for your actual finances?

Carlo is a personal finance agent. It knows your accounts, debts, and goals, so instead of one loan against one assumed return it can see every balance you carry, what each one charges, what your accounts actually earn, and what is already committed, and tell you what the next spare $300 is worth in each place. Text it the question.

ask carlo anything(415) 376-5678

Other calculators

Loan payment calculator
Amount, rate, and term to the fixed monthly payment, the interest over the loan, the true APR after an origination fee, and the amortization schedule.
Auto loan calculator
Price, trade-in, taxes, and fees to the monthly payment, the loan amount, and what the car costs all in.
Credit card payoff calculator
Balance, APR, and payment to the debt-free month and the interest, next to the minimum-payment path computed the CFPB way.
Debt payoff calculator
Your debt list and an extra payment to avalanche against snowball: the payoff order, the debt-free dates, and what the order costs in interest.
How much house can I afford?
Income, debts, and down payment to the most expensive home a lender's debt-to-income rule supports, with the monthly payment and cash to close.
Mortgage payment calculator
Price, down payment, rate, and term to the full monthly payment with tax, insurance, and PMI, the interest over the loan, and the year-by-year schedule.

Every calculator is on one page, and each one answers at the same address in JSON.

Written by Tejas Shah, Co-founder, Engineering. Building Carlo, the financial model that begins with the decision you're actually weighing. Previously engineering leadership across fintech and consumer startups.

This compares one loan against one investment account over the loan's remaining term, using federal income tax for 2025 on wage income to price the tax on the investing side. It leaves out state and local tax, employer matches, tax-advantaged contribution limits, deductible loan interest, and every risk that makes an expected return an expectation rather than a promise. It is not advice, and it does not tell you which side to choose.