Pay off student loans early when the loan's interest rate is higher than the return you can reasonably expect from investing after tax, and invest when it is lower, but only after two things are in place: the full employer retirement match and an emergency fund. Paying extra on a loan earns a guaranteed return equal to its rate. Investing earns an expected return that has historically been higher than many student loan rates and can be negative in any given year. High-rate private loans usually favor payoff, low-rate federal loans usually favor investing, and loans headed for forgiveness are a special case where extra payments are mostly wasted.
The core comparison: a guaranteed rate vs an expected return
A dollar of extra payment on a 6% loan saves 6% a year in interest for as long as that dollar would have stayed borrowed. No market can take that away, and no tax applies to it. A dollar invested in a diversified index fund earns whatever the market earns: more than 6% in some decades, less in others, with losing years along the way. Choosing one is the opportunity cost of the other.
Two adjustments make the comparison fair. On the loan side, the student loan interest deduction lowers the effective rate for borrowers who qualify: at an illustrative 20% marginal rate, a 6% loan costs about 6% × (1 − 0.20) = 4.8% after the deduction, up to the deduction's cap (current limits are on irs.gov). On the investing side, money in a taxable account loses part of its return to tax drag, while money in a Roth IRA or 401(k) does not, so the same portfolio is worth more inside a tax-advantaged account.
Step one: take the employer match first
Before either path gets a dollar, contribute enough to collect the full employer match. Worked: on a $60,000 salary with an illustrative match of 50% on contributions up to 6% of pay, contributing $3,600 a year brings in $1,800 from the employer, an instant 50% return. Sending the same $3,600 to a 6% loan instead saves about $3,600 × 6% = $216 of interest in the first year. Skipping the match to prepay the loan trades $1,800 for $216. Check the vesting schedule, then read why the 401(k) match comes first and run your own numbers in the 401(k) calculator.
Step two: build the emergency fund
Money paid into a loan is gone: if you lose your job next spring, the lender does not hand back last year's extra payments, and the required payment keeps coming. Federal loans soften that with income-driven plans, deferment and forbearance; private loans offer whatever the contract says, which is often little. An emergency fund of three to six months of essential spending, sized with the emergency fund calculator, comes before extra payments of either kind, because a missed payment or a forced sale of investments in a down market costs more than either choice gains. The save or invest first guide puts these steps in their full order.
Pay off or invest: a worked ten-year comparison
The setup: $30,000 of student loans on a ten-year schedule (a required payment of $304 a month at 4%, $348 at 7%), plus $300 a month of extra money. Under "prepay", the $300 goes to the loan until it is paid off, after which the whole old payment plus the $300 is invested every month until year ten. Under "invest", the $300 is invested from month one and the loan runs its full ten years. Returns are constant and before tax, an illustration rather than a forecast. Both paths are debt-free at year ten; the table compares what has been invested by then.
| Loan rate and assumed return | Prepay, then invest | Invest from day one | Difference at year ten |
|---|---|---|---|
| 4% loan, 6% return | Debt-free in month 55; $46,723 | $49,164 | Investing ahead by $2,441 |
| 7% loan, 7% return | Debt-free in month 55; $51,925 | $51,925 | A tie |
| 7% loan, 6% return | Debt-free in month 55; $50,466 | $49,164 | Prepaying ahead by $1,302 |
| 4% loan, 2% return (a weak decade) | Debt-free in month 55; $41,804 | $39,816 | Prepaying ahead by $1,988 |
| 7% loan, 2% return (a weak decade) | Debt-free in month 55; $45,127 | $39,816 | Prepaying ahead by $5,311 |
Three things stand out. When the return equals the loan rate, the two paths end at exactly the same dollar, which is the whole rule in one row. When investing wins, it wins by a modest amount: $2,441 on a cheap 4% loan over ten years. And when the market disappoints, prepaying wins by more, $5,311 in the worst row, because the loan's return was guaranteed. On the 7% loan, prepaying also cuts total interest from $11,799 to $5,068. The investment calculator and the student loan calculator let you rerun the two sides with your own balance, rate and extra amount.
How to compare your loan rate to an expected return
Nobody knows next decade's return, so use ranges rather than a single number, and lean on what you do know:
- Your loan's rate, after any deduction. It is printed on the statement. Federal rates are fixed for life; private rates can be fixed or variable, and a variable rate can climb, which favors paying it down.
- A conservative return. Long-run stock returns have beaten most loan rates, but volatility means a five-year stretch can return little or nothing. The shorter your horizon, the more conservative the number you should use.
- The account. A tax-advantaged account narrows the gap toward investing; a taxable account widens it toward payoff.
The rough result: a loan rate well above a conservative after-tax return is a payoff candidate, a rate well below it is an investing candidate, and the band in between is where personal factors decide. Worked: a 5% private loan against a 6% expected return in a taxable account that loses an illustrative one point a year to taxes is really 5% against 5%, the tie row of the table. Move the same investing into a Roth IRA, where the return is not taxed, and it becomes 5% against 6%, which tilts toward investing. Same loan, same portfolio, a different answer because of the account. If you are thinking about refinancing to get a lower rate first, read should you refinance student loans, because refinancing federal loans gives up their protections for good.
Forgiveness-track loans are a special case
If your federal loans are headed for forgiveness, the comparison above does not apply, because the balance you would be paying down is a balance the program would cancel. Under Public Service Loan Forgiveness, the remaining balance is forgiven after 120 qualifying payments while working for a qualifying employer, and the forgiven amount is not federal taxable income. Extra payments do not count as extra qualifying payments and do not speed up the clock.
Worked: a borrower on the PSLF path adds $300 a month to the loan for ten years. That is $36,000 of their own money spent to shrink a balance the program would have cancelled, and as long as some balance would remain at forgiveness, every one of those dollars is simply forgiven less. Invested at an assumed 6% instead, the same $300 a month grows to about $49,164 at year ten. Public Service Loan Forgiveness explained walks through the same logic on an $80,000 balance.
Forgiveness at the end of a long income-driven repayment term works similarly, with two differences: the horizon is much longer, and whether that forgiveness counts as taxable income has changed with legislation, so it belongs on studentaid.gov and irs.gov before you plan around it. Federal repayment plans changed in 2025 and 2026, and studentaid.gov lists the plans your loans can use; income-driven repayment explained covers when forgiveness is realistic. If it is not, because your income will clear the balance first, treat the loan like any other.
Risk and psychology: what the spreadsheet leaves out
The math is close more often than people expect, which leaves room for the factors no table captures:
- Cash flow. A paid-off loan frees the full monthly payment for good. That matters before a big change: a home purchase, a career switch, a baby, a lower-paying job you would take if the payment were gone.
- Liquidity. Invested money can be reached in an emergency (with taxes and penalties in a retirement account); prepaid loan money cannot.
- Job security. A shaky job argues for cash first, then investments you could sell, then prepayment last.
- How the debt feels. For some borrowers the balance is a weight that affects sleep and decisions. Paying it off sooner is a legitimate thing to buy, as long as the match and the emergency fund come first.
A middle path: split the extra money
You do not have to choose one side. Splitting the extra $300 into $150 for the loan and $150 for investments, on the 7% loan with a 6% assumed return, pays the loan off in month 75 instead of 55 or 120 and leaves about $50,049 invested at year ten: between the prepay-first $50,466 and the invest-first $49,164, and closer to the better one. More important, a split cannot be badly wrong whichever way the market goes. A common rule: send all the extra to any loan clearly above your conservative return, invest all of it when the loan is clearly below, and split inside the band where you are unsure.
| Your situation | Lean toward | Why |
|---|---|---|
| Not collecting the full employer match | Contribute up to the match | An instant 50% to 100% return on those dollars |
| Emergency fund thin or empty | Cash first | A missed payment costs more than either choice gains |
| Private loan at a high or variable rate | Pay it off early | Guaranteed return, few hardship options, rate can rise |
| Federal loan at a low fixed rate | Invest, pay the required amount | Expected return likely higher; protections stay |
| On track for PSLF or long-term forgiveness | Required payment only, invest the rest | Extra payments shrink the forgiven amount |
| Rate in the middle, and the debt weighs on you | Split the extra | Captures part of both outcomes |
If you settle on payoff, the order of attack is in how to pay off student loans faster, and the rest of the pay off student loans collection covers repayment plans, forgiveness and refinancing.
Both choices move the same number: $300 off a loan and $300 into an account each raise your net worth by $300 the day you do it. Stoia's net worth tracking shows the loans and the investments in one picture, so you can watch the debt fall and the balance grow side by side, whichever split you pick.
Frequently asked questions
Is it better to pay off student loans or invest?
It depends on the loan's rate compared with the return you can reasonably expect after tax, and on what comes first. Take any employer match and build an emergency fund, then lean toward paying off high-rate or variable-rate private loans and toward investing when federal loans carry a low fixed rate. If you are working toward loan forgiveness, pay the required amount and invest the rest.
Should I pay off student loans before investing in my 401(k)?
Not before collecting the full employer match. A match that adds 50 cents or a dollar for every dollar you contribute is an immediate 50% to 100% return, far above any student loan rate. Beyond the match, compare the loan's rate with the expected return on additional retirement contributions and weigh the tax advantage of the account.
At what interest rate should I pay off student loans early?
There is no official cutoff. As a rule of thumb, a loan rate well above the return you would expect from a diversified portfolio after tax favors paying it off, a rate well below it favors investing, and the middle is where splitting the extra money makes sense. Variable rates and private loans with few hardship options push the line toward paying off.
Should I pay extra on student loans if I am going for PSLF?
Usually not. Public Service Loan Forgiveness cancels the remaining federal balance after 120 qualifying payments, and extra payments do not count as extra qualifying payments. They only reduce the amount that would be forgiven, so most borrowers on that path make the required payment and save or invest the difference.
Does paying off student loans early hurt your credit?
Only slightly and temporarily, if at all. Closing an installment loan can nudge some scores down because an open account in good standing closes and your credit mix narrows, but the effect is small and fades. It is not a reason to keep paying interest.
This article is for educational purposes only and is not financial, legal, or tax advice. Figures and third-party prices were checked at publication and may have changed. See our disclaimer.