Investing
Invest or Pay Off Debt Calculator
Compare putting extra money toward a loan with investing it, and see which leaves you with more.
Editorial review in progress · How we review
Uses 2026 figuresYour results will appear here.
Adjust the numbers, then press Calculate.
Assumptions
- Monthly compounding for both. Once the debt is gone, its payment plus the extra is invested. Investment return should be after taxes; debt interest deductions aren't modeled.
When you have extra money each month, should it go toward debt or into investments? Paying off debt gives a guaranteed return equal to its interest rate. Investing may earn more, but with risk. This calculator compares the two over the same period so you can see the trade-off in dollars.
What this calculator does
Enter your debt balance, interest rate, required monthly payment, extra money available each month, expected after-tax investment return and the number of years to compare. It shows:
- which strategy leaves you with more,
- the difference in net worth,
- your net worth at the end if you pay the debt first, and
- your net worth at the end if you invest the extra.
The formula in plain English
The calculator follows both strategies month by month.
Pay debt first: each month, the required payment plus the extra goes to the debt. When the debt is paid off, both amounts are invested every month until the end.
Invest the extra: each month, the required payment goes to the debt and the extra is invested. When the debt is paid off, the freed-up payment is invested too.
Interest on the debt and growth on investments compound monthly.
Net worth at the end = investments − any remaining debt.
A worked example
Dr. Brown has $60,000 in student loans at 6.5%, with a $700 monthly payment. She has an extra $500 a month and expects 6% after-tax investment returns. She compares 10 years.
- Pay debt first: net worth after 10 years is about $86,200.
- Invest the extra: net worth is about $85,100.
- Paying the debt first comes out about $1,100 ahead.
The difference is small because the rates are close. With a 4% loan, investing would win; with a 9% loan, paying it off would win clearly. When the difference is this small, many people choose the guaranteed option.
Why it matters at each career stage
If you're: Resident / fellow
During training, the first priority is usually a small emergency fund and any retirement match. If you're aiming for PSLF, extra loan payments don't help. Otherwise, low-rate loans are less urgent than high-rate ones.
If you're: Employed
After training, many people do both: a fixed extra payment on student loans plus maxing out retirement accounts. Retirement accounts have tax benefits that make investing more attractive, especially at high tax rates.
If you're: Practice owner
Practice loans are often tax-deductible business expenses, which lowers their effective rate. Consider keeping cash reserves for the practice before paying off low-rate debt aggressively.
A practical order of priorities
- Build a starter emergency fund.
- Get your full employer retirement match.
- Pay off credit cards and other high-rate debt.
- Build a full emergency fund of three to six months.
- Max out tax-advantaged accounts (401(k)/403(b), HSA, backdoor Roth).
- Decide between extra debt payments and taxable investing based on the rate.
When the answer flips
Three things can flip the result. A higher debt rate favors paying it off, because that guaranteed return gets harder to beat. A longer time horizon favors investing, because compound growth has more time to work, though with more risk along the way. And taxes matter: investing inside a 401(k), 403(b) or HSA gives you a tax break that a loan payment doesn't, which is why maxing tax-advantaged accounts usually comes before extra payments on moderate-rate debt.
More than math
Being debt-free has value that doesn't show up in a spreadsheet: less stress, lower required monthly expenses and more flexibility to change jobs or cut back hours. If paying off a loan would help you sleep better, that's a legitimate reason to choose it even if investing might earn slightly more.
Next, see how extra payments shrink a loan, plan a full debt payoff, or see what investing could grow to with the compound interest calculator.
FAQ
Frequently asked questions
What return should I expect from investing?
No return is guaranteed. Over long periods, diversified stock portfolios have often returned 6%–10% a year before inflation, with large ups and downs. Use a conservative after-tax number, such as 5%–7%.
Should I include taxes?
Yes. Use an after-tax investment return. Investments in retirement accounts may grow tax-deferred or tax-free; taxable accounts pay tax on dividends and gains.
What about the student loan interest deduction?
It can lower the effective rate on student loans slightly, but it phases out at moderate incomes, so many healthcare professionals don't qualify.
Is there a rate where paying off debt always wins?
Many advisers suggest paying off debt above about 7%–8% before investing in taxable accounts, and always paying off credit cards first. Below about 4%, investing often wins over long periods.
Keep going
Recommended next
Related calculators and guides, sorted for your profile.
- Student Loans & PSLFExtra Student Loan PaymentSee the interest and time you save by paying extra on your student loans each month.
- InvestingCompound Growth CalculatorSee how regular investing compounds over time.
- Cash Flow & DebtDebt Payoff PlannerPlan a payoff order and date across all your debts.
- ArticleA practical plan to reduce money stress for healthcare workersYou take care of everyone else. Here's a simple, five-step plan to take some weight off your own shoulders.
- Student Loans & PSLFDental School Debt ProjectorProject dental school debt at graduation, how much must be private, and the payment it implies.
- Student Loans & PSLFPSLF Forgiveness CalculatorEstimate what you'll pay and how much PSLF could forgive after 120 qualifying payments.