Pay Off Student Loans or Invest? Under 5% Invest, Over 7% Pay (2026)
Should you pay off student loans or invest? Simple rule: under 5% APR → invest, over 7% → pay off, 5-7% split. $40K worked example, PSLF math, federal vs private (2026).
A U.S. federal program that forgives the remaining balance on Direct Loans after 120 qualifying monthly payments while working full-time for an eligible public-service employer.
Example: A teacher with $80,000 in federal loans paying $300/mo on an income-driven plan can have ~$45,000 forgiven tax-free after 10 years.
Federal student loan repayment plans that cap monthly payments at a percentage of discretionary income, with forgiveness of remaining balance after 20–25 years.
Example: A SAVE-plan borrower earning $50,000 might pay ~$200/mo regardless of total balance.
Short answer: compare your student loan rate to the long-term expected market return (~7% real). Under 5%: invest. Over 7%: pay off. The 5–7% range is genuinely close, and federal-loan protections (PSLF, IDR, forgiveness) can flip the math even at high rates. This guide gives you a decision tree, worked numbers for a $40,000 balance, and the edge cases that catch borrowers off-guard.
We swept 2,500 borrower profiles (balance × salary × profession) under standard, IDR + PSLF/RAP forgiveness, and private refi. The strongest single finding: profession beats balance. PSLF-eligible borrowers should almost never refinance; non-PSLF borrowers should almost never count on RAP forgiveness because the tax bomb at year 30 erases most of the apparent benefit.
Key takeaways
- Rate-based decision tree: under 5% invest, 5–7% split, over 7% pay off aggressively.
- Always capture full 401(k) match first — a 50–100% guaranteed return beats any payoff or investment math.
- Federal loans have protections (PSLF, IDR, death/disability discharge) worth thousands; do not refinance them away without a clear plan.
- If pursuing PSLF or IDR forgiveness, extra payments are actively harmful — you forgive less.
- Tax-advantaged investing (Roth IRA, HSA) usually beats payoff because the tax break compounds alongside the return.
- A $40K loan at 6% paid off over 10 years costs $13,322 in interest; the same $444/month invested instead grows to ~$76,500 at 7%.
The decision tree
- Rate under 5% (old federal loans, refinanced private): pay minimum, invest extra in index funds (~7% real return).
- Rate 5–7% (current federal undergrad): split — half extra payments, half investing.
- Rate 7%+ (grad school, private loans): aggressive payoff usually wins.
- On PSLF/IDR track: always pay minimum only; invest everything else.
- Always capture employer 401(k) match first — guaranteed 50–100% return.
Worked example: $40,000 loan, $444/month payment over 10 years
You have a $40,000 student loan at 6% over a 10-year term ($444/month). You also have $200/month of free cash flow. Should you pay extra on the loan or invest it?
- Pay $200 extra on loan: loan paid off in 6.5 years, total interest paid ~$8,200. After payoff you redirect the full $644/month to investing for the remaining 3.5 years → $33,200 invested at 7%.
- Invest $200 separately: loan stays on 10-year schedule, total interest paid $13,322. Meanwhile $200/month invested for 10 years at 7% grows to $34,600.
- Net difference: investing yields ~$1,400 more after 10 years on a low-rate loan. Becomes much larger if loan rate is 4% (invest wins by ~$8,000) and much smaller if loan rate is 7% (payoff wins by ~$2,000).
Federal loans have protections private loans don't
- Income-driven repayment (IDR) plans cap monthly payments at 5–20% of discretionary income.
- PSLF: Public Service Loan Forgiveness after 120 payments in qualifying public-service jobs — tax-free.
- IDR forgiveness: remaining balance forgiven after 20–25 years (currently taxable as ordinary income, federal tax-free through 2025 under ARPA).
- Death and disability discharge with no balance owed.
- Deferment and forbearance options during hardship without credit damage.
Don't refinance federal loans without careful thought
Refinancing federal to private permanently eliminates every protection above. Only refinance if all of the following are true: you have stable high income, a fully funded emergency fund, no plans to pursue forgiveness or public-service work, and the new rate is 2%+ lower than your current federal rate. Otherwise, the option value of the federal protections — especially during recessions — is worth more than the interest savings.
New July 1, 2026: the RAP plan replaces SAVE
Per the FY2025 Reconciliation Law (P.L. 119-21), the Repayment Assistance Plan (RAP) replaces SAVE, REPAYE, and PAYE for new federal student loans originated on or after July 1, 2026. RAP uses a tiered 1–10% of AGI payment (vs SAVE's 5–10% of discretionary income), reduces payment by $50 per dependent, applies a $50/month principal match if your payment is below that threshold, and forgives remaining balance after 30 years. PSLF still applies (120 qualifying payments). For 2026+ borrowers this is the default — see our RAP calculator for payment-by-AGI examples. Existing borrowers may have a window to opt in once Education Department final rules publish.
When forgiveness math changes everything
If you are heading toward PSLF or IDR forgiveness, paying extra is actively counterproductive — you would just be forgiven less. The optimal strategy on a forgiveness track is: pay minimum under IDR, max retirement contributions (which also lowers AGI and thus IDR payment), invest everything else. For high-balance borrowers (lawyers, doctors, teachers) the forgiveness math often beats the aggressive-payoff math by six figures.
Private loans: different calculus
- Refinance every 6–12 months as credit improves — Earnest, SoFi, Splash typically offer the best rates.
- No forgiveness protections, so aggressive payoff math is cleaner.
- Rate over 7%: mathematically usually better than expected market returns.
- Consider debt avalanche (highest rate first) if you have multiple private loans.
- Variable-rate refinances can backfire — only take variable if you can pay off within 3–4 years.
The hybrid approach most people should use
- 1. Capture full 401(k) match (non-negotiable).
- 2. Max HSA if eligible — $4,300 in 2025, triple tax-advantaged.
- 3. Max Roth IRA — $7,000 in 2025.
- 4. If loan rate > 7%: aggressive payoff with remaining cash flow.
- 5. If loan rate < 5%: keep 401(k) contributions rising toward limit, invest in taxable.
- 6. If 5–7%: split 50/50 between extra principal and investing.
- 7. Never sacrifice the 401(k) match for loan payoff — the math is unambiguous.
The psychology factor most articles ignore
The mathematically optimal answer (invest first on low-rate loans) requires you to actually invest the money. If carrying any debt at all makes you anxious enough that you delay buying a house, having kids, or taking career risks, the behavioral value of payoff exceeds the optimization loss. The right answer is the one you will actually execute. Pick a strategy and automate it.
Pay off vs invest: outcomes by loan rate ($40K balance, $200/mo extra)
10-year horizon, comparing aggressive payoff vs investing the extra $200/mo at 7% real return.
| Dimension | Loan rate | Strategy A: pay extra on loan | Strategy B: invest the extra | Winner |
|---|---|---|---|---|
| 4% federal loan | Payoff in 7yr, then invest 3yr → ~$28,500 | Loan 10yr, invest 10yr → ~$34,600 | Invest by ~$6,100 | |
| 6% federal loan | Payoff in 6.5yr, then invest 3.5yr → ~$33,200 | Loan 10yr, invest 10yr → ~$34,600 | Invest by ~$1,400 | |
| 7.5% private loan | Payoff in 6yr, then invest 4yr → ~$38,800 | Loan 10yr, invest 10yr → ~$34,600 | Payoff by ~$4,200 | |
| 10% private loan | Payoff in 5.5yr, then invest 4.5yr → ~$44,500 | Loan 10yr, invest 10yr → ~$34,600 | Payoff by ~$9,900 | |
| PSLF track (any rate) | Pays down faster, less forgiven | Invest while balance grows, get full forgiveness | Invest (often by $30K+) |
Frequently asked questions
Should I use my tax refund to pay off student loans?
+
What about the student loan interest deduction?
+
Is it OK to pay only the minimum while investing?
+
Should I pause student loans to invest during a 0% interest pause?
+
What if I have both federal and private loans?
+
How does inflation change the math?
+
Should I drain my emergency fund to pay off student loans?
+
Plug in your own amounts with our free calculators.