{"tool":{"slug":"debt-or-invest","name":"Debt or invest calculator","version":"2026-08-22","canonicalUrl":"https://carlo.finance/tools/debt-or-invest","jsonUrl":"https://carlo.finance/tools/debt-or-invest.json","pageUrl":"https://carlo.finance/tools/debt-or-invest","parameters":[{"key":"balance","label":"Loan balance","unit":"usd","min":0,"max":5000000,"default":22000,"sourceId":null,"help":"What you still owe today on the loan you would be paying down faster. One loan at a time: if you have several, run the highest rate first."},{"key":"rate","label":"Loan interest rate","unit":"percent","min":0,"max":40,"default":7.14,"sourceId":"g19","help":"The rate on the loan, as an APR. The default is the Federal Reserve's May 2026 average for a 60-month new car loan. This is the number the market has to beat, and unlike the market it is written on your statement."},{"key":"years","label":"Years left on the loan","unit":"years","min":0.5,"max":40,"default":5,"sourceId":null,"help":"How long the loan has to run if you pay only the scheduled amount. This is also the horizon both branches are measured over, so nothing is compared at two different dates."},{"key":"extra","label":"Extra each month","unit":"usd-per-month","min":0,"max":100000,"default":300,"sourceId":null,"help":"The spare dollars you are deciding about. Every month they go to one place or the other, never both, and both branches spend exactly this much on top of the scheduled payment."},{"key":"expectedReturn","label":"Expected return before tax","unit":"percent","min":0,"max":30,"default":7,"sourceId":null,"help":"What you expect the money to earn each year before tax. There is no right answer here and this page does not supply one: it is your assumption, and the whole comparison moves with it."},{"key":"income","label":"Household income","unit":"usd-per-year","min":0,"max":100000000,"default":85000,"sourceId":null,"help":"Wages for the year, before tax. It is here only to find the rate on your next dollar of investment income, which is what turns an expected return into an after-tax one."},{"key":"dependents","label":"Children under 17","unit":"count","min":0,"max":2,"default":0,"sourceId":null,"integer":true,"help":"Qualifying children for the child tax credit. They matter here because investment income phases the credit out, which can charge your next dollar several points more than your bracket does."}],"options":[{"key":"treatment","label":"Where the money would go","options":[{"value":"index-fund","label":"Index fund, held"},{"value":"interest","label":"Savings or bonds"},{"value":"roth","label":"Roth account"}],"default":"index-fund","sourceId":"usc-title-26","help":"How the account is taxed, which is most of what separates the two sides. An index fund you hold is taxed once when you sell, at the § 1(h) long-term rates. Interest from savings or bonds is taxed every year at your ordinary rate. Money inside a Roth is never taxed again, so its expected return is already after tax."},{"key":"status","label":"Filing status","options":[{"value":"single","label":"Single"},{"value":"married-joint","label":"Married filing jointly"},{"value":"married-separate","label":"Married filing separately"},{"value":"head-of-household","label":"Head of household"},{"value":"qualifying-surviving-spouse","label":"Qualifying surviving spouse"}],"default":"single","sourceId":"rev-proc-2024-40","help":"Your status on the last day of the tax year. It moves the brackets, the long-term gain breakpoints, and the thresholds for the 3.8% investment income tax, so it moves the rate on the money you would be investing."}]},"taxYear":2025,"inputs":{"balance":22000,"rate":7.14,"years":5,"extra":300,"expectedReturn":7,"income":85000,"dependents":0,"treatment":"index-fund","status":"single"},"result":{"crossover":8.18,"loanReturn":7.14,"marginalRate":15,"ordinaryRate":22,"ltcgRate":15,"afterTaxReturn":null,"payment":437.08,"budget":737.08,"horizonMonths":60,"payoffMonths":33,"monthsSaved":27,"interestWithout":4224.86,"interestWith":2292.82,"interestSaved":1932.04,"debt":{"payoffMonths":33,"loanInterest":2292.82,"contributions":19932.04,"gross":21522.45,"gain":1590.42,"taxAtSale":238.56,"net":21283.89},"invest":{"payoffMonths":60,"loanInterest":4224.86,"contributions":18000,"gross":21477.87,"gain":3477.87,"taxAtSale":521.68,"net":20956.19},"difference":327.7,"ahead":"debt","ladder":[{"expectedReturn":5,"afterTaxReturn":null,"debtNet":20884.06,"investNet":20041.55,"difference":842.51,"crossover":false},{"expectedReturn":6,"afterTaxReturn":null,"debtNet":21082.58,"investNet":20491.36,"difference":591.22,"crossover":false},{"expectedReturn":7,"afterTaxReturn":null,"debtNet":21283.89,"investNet":20956.19,"difference":327.7,"crossover":false},{"expectedReturn":8,"afterTaxReturn":null,"debtNet":21488.05,"investNet":21436.6,"difference":51.45,"crossover":false},{"expectedReturn":8.18,"afterTaxReturn":null,"debtNet":21525.1,"investNet":21524.77,"difference":0.33,"crossover":true},{"expectedReturn":9,"afterTaxReturn":null,"debtNet":21695.09,"investNet":21933.15,"difference":-238.06,"crossover":false},{"expectedReturn":10,"afterTaxReturn":null,"debtNet":21905.06,"investNet":22446.45,"difference":-541.39,"crossover":false},{"expectedReturn":11,"afterTaxReturn":null,"debtNet":22118.01,"investNet":22977.11,"difference":-859.1,"crossover":false}],"computability":{"status":"final","fileReady":true,"blocking":[]}},"drivers":[{"key":"rate","label":"Loan interest rate","step":1,"crossoverDelta":1.12,"sentence":"A loan rate one point higher, 8.14% instead of 7.14%, moves the crossover from 8.18% to 9.30%. The loan rate is the whole answer, grossed up for the tax the investing side pays."},{"key":"years","label":"Years left on the loan","step":2,"crossoverDelta":-0.09,"sentence":"Stretching the loan to 7.0 years moves the crossover from 8.18% to 8.09%. Deferred tax is worth more the longer it is deferred, so a longer horizon lowers the return the market needs."},{"key":"income","label":"Household income","step":25000,"crossoverDelta":0,"sentence":"Earning $25,000 more does not change the rate on your investment income, which stays 15.00%, so the crossover stays at 8.18%."},{"key":"dependents","label":"Children under 17","step":1,"crossoverDelta":0,"sentence":"One more child under 17 changes what you owe for the year but not the rate on your investment income, which stays 15.00%, so the crossover stays at 8.18%."}],"sensitivity":{"byTreatment":[{"treatment":"index-fund","label":"Index fund, held","marginalRate":15,"crossover":8.18},{"treatment":"interest","label":"Savings or bonds","marginalRate":22,"crossover":9.15},{"treatment":"roth","label":"Roth account","marginalRate":0,"crossover":7.14}],"byStatus":[{"status":"single","label":"Single","marginalRate":15,"crossover":8.18},{"status":"married-joint","label":"Married filing jointly","marginalRate":0,"crossover":7.14},{"status":"married-separate","label":"Married filing separately","marginalRate":15,"crossover":8.18},{"status":"head-of-household","label":"Head of household","marginalRate":0,"crossover":7.14},{"status":"qualifying-surviving-spouse","label":"Qualifying surviving spouse","marginalRate":0,"crossover":7.14}]},"assumptions":[{"key":"balance","label":"Loan balance","value":22000,"unit":"usd","provided":false,"source":null},{"key":"rate","label":"Loan interest rate","value":7.14,"unit":"percent","provided":false,"source":{"id":"g19","name":"Federal Reserve, G.19 Consumer Credit (June 2026 data)","url":"https://www.federalreserve.gov/releases/g19/current/default.htm","asOf":"2026-08-07","note":"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."}},{"key":"years","label":"Years left on the loan","value":5,"unit":"years","provided":false,"source":null},{"key":"extra","label":"Extra each month","value":300,"unit":"usd-per-month","provided":false,"source":null},{"key":"expectedReturn","label":"Expected return before tax","value":7,"unit":"percent","provided":false,"source":null},{"key":"income","label":"Household income","value":85000,"unit":"usd-per-year","provided":false,"source":null},{"key":"dependents","label":"Children under 17","value":0,"unit":"count","provided":false,"source":null},{"key":"treatment","label":"Where the money would go","value":"index-fund","unit":"choice","provided":false,"source":{"id":"usc-title-26","name":"26 U.S.C. (Internal Revenue Code)","url":"https://uscode.house.gov/browse/prelim@title26","asOf":"2026-04-21","note":"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."}},{"key":"status","label":"Filing status","value":"single","unit":"choice","provided":false,"source":{"id":"rev-proc-2024-40","name":"IRS Rev. Proc. 2024-40 (2025 inflation-adjusted items)","url":"https://www.irs.gov/pub/irs-drop/rp-24-40.pdf","asOf":"2024-10-22","note":"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."}}],"sources":[{"id":"g19","name":"Federal Reserve, G.19 Consumer Credit (June 2026 data)","url":"https://www.federalreserve.gov/releases/g19/current/default.htm","asOf":"2026-08-07","note":"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."},{"id":"rev-proc-2024-40","name":"IRS Rev. Proc. 2024-40 (2025 inflation-adjusted items)","url":"https://www.irs.gov/pub/irs-drop/rp-24-40.pdf","asOf":"2024-10-22","note":"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."},{"id":"pl-119-21-obbba","name":"Public Law 119-21 § 70102 (2025 standard deduction)","url":"https://www.congress.gov/bill/119th-congress/house-bill/1/text","asOf":"2025-07-04","note":"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."},{"id":"usc-title-26","name":"26 U.S.C. (Internal Revenue Code)","url":"https://uscode.house.gov/browse/prelim@title26","asOf":"2026-04-21","note":"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."}],"warnings":[{"code":"crossover","message":"Paying this loan down returns 7.14%, guaranteed and already after tax. To match it your investments have to earn 8.18% before tax, every year, for 60 months. Above that the market wins on average; below it the loan does. Nothing here says which will happen."},{"code":"certainty","message":"The two returns on this page are not the same kind of number. The loan rate is contractual: pay the balance down and you have avoided that interest, and nothing can take it back. The expected return is an average of outcomes that have not happened yet, and the range around it is wide. This calculator cannot price that difference, and neither can any other one, so the crossover is where the arithmetic ties and not where the decision does."},{"code":"employer-match","message":"An employer match beats both branches on this page and is not modeled here. A dollar-for-dollar match is an immediate 100% return, which no loan rate and no expected return comes close to. If your plan matches and you are not contributing enough to collect all of it, that is where the next dollar goes, before this question is even open."},{"code":"dividend-drag","message":"This treats the fund as taxed once, when you sell, at 15.00%. A real index fund also pays out dividends every year, and those are taxed as they arrive, so the true drag sits somewhere between this setting and the \"Savings or bonds\" one at 22.00%. That makes the crossover shown here slightly low rather than slightly high."},{"code":"tax-gross-up","message":"The gap between the loan rate and the crossover, 1.04 points, is entirely tax. Interest you avoid never reaches your return under § 163(h), so it is not income; investment returns do, and yours are taxed at 15.00%. Comparing a loan rate against a pre-tax expected return without that adjustment is the single most common error in this decision."},{"code":"deductible-interest","message":"This page treats the interest you avoid as untaxed, which is right for a car loan, a personal loan, or a credit card under § 163(h). It is not right if the interest is deductible: mortgage interest under § 163(h)(3) and up to $2,500 of student loan interest under § 221 come off your taxable income, so avoiding them saves you less than the full rate and the true crossover is lower than the one shown here."}],"disclaimer":"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."}