Can You Use a 401(k) to Pay Off Student Loans? Costs and Alternatives

Using a 401(k) to pay off student loans is legally possible, but for most borrowers under age 59½ it costs more than it saves. A withdrawal triggers ordinary income tax plus a 10% early withdrawal penalty, and the plan withholds 20% off the top for federal taxes before you ever see the money. A $25,000 withdrawal often delivers only $15,000 or so to your loan servicer once taxes, the penalty, and withholding are settled, and you permanently lose the compound growth that balance would have earned. Before you go that route, look at the SECURE 2.0 employer match on student loan payments, a 401(k) participant loan, and income-driven repayment, all of which can address the debt without draining the account.

What an Early Withdrawal Actually Costs

A distribution from a traditional 401(k) before age 59½ hits you twice. The full amount is added to your taxable income for the year, and you owe an additional 10% penalty on top of regular taxes.1Internal Revenue Service. Retirement Topics – Exceptions to Tax on Early Distributions

Take a single filer earning $55,000 who withdraws $25,000 to knock out student debt. The 10% penalty alone is $2,500. Federal income tax on the added $25,000 could run $3,000 to $5,500 depending on where the money lands in the brackets. State income tax could add another $1,000 to $2,500. And the plan is required by law to withhold 20% of any eligible rollover distribution for federal taxes upfront, so a $25,000 gross withdrawal delivers only $20,000 in cash to you.2Internal Revenue Service. 401(k) Resource Guide – Plan Participants – General Distribution Rules

That withholding creates a math trap. If you actually need $25,000 to zero out a loan, you have to withdraw roughly $31,250 to net $25,000 after withholding, and the 10% penalty applies to the full $31,250, not just the amount that reached your servicer.

Then there’s the retirement cost the tax code doesn’t show you. That $25,000 left invested for 25 years at a 7% average annual return would grow to roughly $135,000. You aren’t just spending $25,000 of retirement money. You’re spending the six-figure balance it would have become.

Narrow Exceptions to the 10% Penalty

A handful of exceptions eliminate the penalty, though not the income tax. If you separate from your employer during or after the year you turn 55, distributions from that employer’s 401(k) are penalty-free, and public safety employees get the same break at age 50.3Office of the Law Revision Counsel. 26 USC 72 – Annuities; Certain Proceeds of Endowment and Life Insurance Contracts Distributions covering unreimbursed medical expenses above 7.5% of your adjusted gross income are also exempt, as are those made under a qualified domestic relations order in divorce. Student loan repayment is not on this list.

Hardship Withdrawals Do Not Cover Student Loans

Some plans allow hardship distributions, but the IRS holds them to a specific safe harbor list: medical expenses that would qualify for the medical deduction, costs of buying a principal residence, tuition and fees for the next 12 months of post-secondary education, payments to prevent eviction or foreclosure on your principal residence, funeral and burial expenses, casualty repair to your principal residence, and losses from a federally declared disaster.4Internal Revenue Service. Retirement Plans FAQs Regarding Hardship Distributions

Repaying a student loan is not on that list. Notice that tuition for upcoming education qualifies, but that covers future costs, not payments on loans from past education. Plan administrators enforce the distinction. Even if a plan approved a hardship distribution for debt repayment on discretionary grounds, the money would still be subject to income tax and the 10% penalty if you’re under 59½.

Borrowing from Your 401(k) Instead

A 401(k) participant loan is a different animal from a withdrawal. If your plan allows loans, you can borrow the lesser of $50,000 or half your vested balance under 26 U.S.C. § 72(p), with a $10,000 floor for smaller accounts.3Office of the Law Revision Counsel. 26 USC 72 – Annuities; Certain Proceeds of Endowment and Life Insurance Contracts The $50,000 cap is reduced by the highest outstanding balance you carried on any plan loan in the previous 12 months.

The loan has to be repaid in substantially level installments, at least quarterly, within five years, and most plans handle repayment through automatic payroll deduction.5Internal Revenue Service. 401(k) Plan Fix-It Guide – Participant Loans Don’t Conform to the Requirements of the Plan Document and IRC Section 72(p) The interest rate must resemble what a commercial lender would charge on a similar secured loan; most plans use prime plus one or two points, which puts current rates in the 7.75% to 8.75% range with prime at 6.75% in late 2025.

The interest goes back into your own account, which is the usual selling point. What that pitch leaves out is the return you would have earned on the borrowed dollars if they had stayed invested. If your funds would have returned 8% and your loan rate is 7.75%, you’re bleeding a small amount every year the loan is out. The bigger risk sits somewhere else entirely.

What Happens If You Leave the Job

Separation from your employer is where 401(k) loans go wrong. When you leave with a balance outstanding, the plan typically demands repayment quickly, and if you can’t come up with the cash, the plan offsets your account by the unpaid amount. That offset is treated as an actual distribution.6Internal Revenue Service. Plan Loan Offsets

The unpaid balance becomes taxable income, and if you’re under 59½, the 10% penalty stacks on top. A $30,000 borrower who can’t repay after separation could face $3,000 in penalty plus several thousand more in federal and state income tax, all while still carrying whatever loan balance the borrowed money didn’t erase.

There is one safety valve. If the offset qualifies as a qualified plan loan offset because it happened due to separation from employment, you have until your tax filing deadline for that year, including extensions, to deposit an equivalent amount into an IRA or another qualified plan and preserve the rollover treatment.6Internal Revenue Service. Plan Loan Offsets That requires finding the cash from somewhere else, which is exactly what most people leaving a job don’t have.

After You Leave a Job

Once separated, you can request a lump-sum distribution of your entire vested balance and use it however you want, including paying off student loans.7Internal Revenue Service. Retirement Topics – Termination of Employment The tax consequences don’t change. The 20% withholding still applies, the full amount is still taxable, and the 10% penalty still hits if you’re under 59½ and don’t qualify for the age-55 separation exception.

People in this situation sometimes take a partial distribution aimed at their highest-interest loans and roll the rest into an IRA to keep the tax-deferred growth going. That contains the damage while still cutting the debt.

The SECURE 2.0 Employer Match on Student Loan Payments

Section 110 of the SECURE 2.0 Act created a route that avoids the tax and penalty trap altogether. Employers can now make matching 401(k) contributions based on the student loan payments you make each month, even in years when you can’t afford to defer any salary into the plan yourself. The law treats your qualifying loan payments as if they were elective deferrals, so the employer match formula works the same way it does for ordinary 401(k) contributions.8Internal Revenue Service. Notice 2024-63 – Guidance Under Section 110 of the SECURE 2.0 Act

The loan has to be one you took out for your own higher education, or for a spouse or dependent at the time the debt was incurred. You certify to your employer each year that you made the payments, and the match vests on the employer’s normal schedule. Not every employer has adopted the provision, so ask your HR or benefits contact. If yours has, your loan payments effectively earn you retirement dollars you’d otherwise miss, with no taxable event.

You Lose the Student Loan Interest Deduction When the Loan Is Gone

Paying off your loans ends your ability to deduct up to $2,500 per year in student loan interest. This is an above-the-line deduction, so you get it even without itemizing.9Internal Revenue Service. Topic No. 456, Student Loan Interest Deduction At a 22% marginal rate, that’s about $550 in tax savings a year, which compounds over the remaining life of the loans.

Keeping loans purely for the deduction doesn’t make sense, but it’s worth counting on the ledger when you’re weighing a 401(k) withdrawal. You aren’t just paying taxes and a penalty to make the loan disappear. You’re also giving up a future tax break, and the full picture usually looks worse than the headline numbers suggest.

Options Worth Trying Before Touching Retirement

Several routes can ease the pressure without a taxable distribution.

  • Income-driven repayment. Federal student loans qualify for plans that cap monthly payments at 10% to 20% of discretionary income, with any remaining balance forgiven after 20 or 25 years depending on the plan. Lower payments can free up cash to contribute to your 401(k) and capture your employer match.10Federal Student Aid. Income-Driven Repayment Plans
  • Public Service Loan Forgiveness. If you work for a government agency or qualifying nonprofit, 120 qualifying monthly payments can lead to full forgiveness of your remaining federal balance. Pairing PSLF with an income-driven plan keeps payments manageable while you work toward forgiveness.
  • Refinancing. If your credit and income are strong, refinancing high-interest loans to a lower rate can cut total interest without touching retirement savings. Refinancing federal loans into private loans forfeits access to IDR, PSLF, and federal forbearance protections, so weigh that carefully.
  • Extra payments from other cash. Directing a tax refund, bonus, or side income at the highest-interest loan reduces total interest without disturbing the 401(k).

For most borrowers, the SECURE 2.0 match plus a manageable repayment plan will beat a lump-sum withdrawal on any reasonable time horizon. The withdrawal option is always there. It just tends to be the most expensive one on the list.