Can I Use My 401(k) to Pay Off Student Loans? Loans vs. Withdrawals

You can use a 401(k) to pay off student loans, but federal law does not include student loan repayment among the exceptions to the 10% early withdrawal penalty, so every direct route costs you taxes, a penalty, or both. The exception is a newer benefit created by the SECURE 2.0 Act: if your employer has adopted it, your student loan payments can trigger a 401(k) match, letting you pay down debt and build retirement savings at the same time without touching the account. Everything else, including a 401(k) loan, a hardship withdrawal, or a post-separation distribution, carries real costs that are worth understanding before you move any money.

Start With the SECURE 2.0 Student Loan Match

The best option doesn’t involve withdrawing anything. Under Section 110 of the SECURE 2.0 Act, effective for plan years beginning after December 31, 2023, employers can treat your qualified student loan payments as if they were 401(k) contributions for matching purposes.1Internal Revenue Service. Guidance Under Section 110 of the SECURE 2.0 Act with Respect to Matching Contributions Made on Account of Qualified Student Loan Payments Pay your servicer, and your employer deposits a matching amount into your 401(k) using the same formula it already uses for regular contributions.

An example makes the math concrete. If your employer matches 100% of contributions up to 4% of pay, sending at least 4% of your salary to your student loan servicer earns you the full 4% match in your 401(k). You don’t need to split cash between loan payments and retirement contributions. The loan payment itself qualifies you for the deposit.

To receive the match, you have to certify each year to your employer that you made the payments, including the amount, the date, and confirmation that the payment was yours.1Internal Revenue Service. Guidance Under Section 110 of the SECURE 2.0 Act with Respect to Matching Contributions Made on Account of Qualified Student Loan Payments Employers set their own submission deadlines, but IRS guidance says that deadline cannot fall earlier than three months after the close of the plan year.

The provision is optional. Employers can offer it; they aren’t required to. Ask your HR department or plan administrator whether your plan has adopted student loan matching before you consider any of the costlier options below.

The qualifying debt is broader than many people assume. The match covers any “qualified education loan” as defined in Section 221(d)(1) of the Internal Revenue Code: debt taken on solely to pay higher education expenses at an eligible institution, including tuition, room and board, and related fees.2Office of the Law Revision Counsel. 26 U.S. Code 221 – Interest on Education Loans Federal and private loans both count. Refinanced or consolidated loans still qualify as long as the original debt was for qualified education costs. Loans from a relative or from the employer’s own plan are excluded, and Parent PLUS loans taken out by a parent don’t qualify because the employee has to be the borrower.

Borrowing From Your 401(k) Balance

If your plan allows participant loans, borrowing against your balance avoids the tax and penalty hit of a withdrawal. Federal law caps 401(k) loans at the lesser of $50,000 or half your vested account balance.3Office of the Law Revision Counsel. 26 USC 72 – Annuities; Certain Proceeds of Endowment and Life Insurance Contracts If half your vested balance is under $10,000, the law allows a floor of $10,000, though plans aren’t required to offer that exception.4Internal Revenue Service. Retirement Topics – Loans The $50,000 cap doesn’t adjust for inflation.

Repayment runs through payroll deductions over no more than five years, with at least quarterly payments. Interest goes back into your own account rather than to a bank. The Department of Labor requires a “reasonable” interest rate, and most plans peg it to the prime rate.4Internal Revenue Service. Retirement Topics – Loans

The main risk shows up if you leave your job. Most plans require you to repay the outstanding balance shortly after separation. If you can’t, the unpaid balance is treated as a taxable distribution. You can still avoid the tax by rolling that amount into an IRA or another eligible plan by your tax filing deadline (including extensions), but you have to come up with the cash from somewhere else to complete the rollover.4Internal Revenue Service. Retirement Topics – Loans Fail to repay or roll over, and you’ll owe income tax plus the 10% early distribution penalty if you’re under 59½.

There’s a quieter cost too. The money you borrow stops growing in your retirement account for the entire loan period, so you’re trading potential investment returns for the interest you pay yourself.

Why a Hardship Withdrawal Usually Won’t Work

Hardship withdrawals exist for specific emergencies, and repaying student loan debt almost never qualifies. The IRS safe harbor list of expenses that meet the “immediate and heavy financial need” standard includes upcoming tuition, room, and board for the next 12 months of postsecondary education, but it does not include paying down loans you already owe.5Internal Revenue Service. Retirement Topics – Hardship Distributions Future education costs and past education debt sit on opposite sides of the rule.

Even when a hardship withdrawal is approved for a qualifying expense, the full amount is taxed as ordinary income, and if you’re under 59½, the 10% early distribution penalty applies on top.3Office of the Law Revision Counsel. 26 USC 72 – Annuities; Certain Proceeds of Endowment and Life Insurance Contracts Your employer withholds a portion for federal taxes before you receive the money, and state income tax may apply depending on where you live. Unlike a 401(k) loan, a hardship withdrawal cannot be repaid to the plan. The money and its future growth are gone.6Internal Revenue Service. Hardships, Early Withdrawals and Loans

Distributions After You Leave the Job

Once you separate from an employer, you gain full access to your vested 401(k) balance and can take a lump-sum distribution and use the proceeds any way you want, student loans included. The tax cost is substantial. The plan administrator must withhold 20% of the distribution for federal income taxes before sending you the check.7Office of the Law Revision Counsel. 26 U.S. Code 3405 – Special Rules for Pensions, Annuities, and Certain Other Deferred Income That 20% is a prepayment, not the whole tax bill. Depending on your bracket, you may owe more at filing.

If you’re under 59½, the 10% early distribution penalty applies on top of the income tax.3Office of the Law Revision Counsel. 26 USC 72 – Annuities; Certain Proceeds of Endowment and Life Insurance Contracts Between the federal withholding, the penalty, and state taxes that reach about 11% in the highest-tax states, 30% to 40% or more of the distribution can disappear before a dollar reaches your loan servicer. On a $40,000 distribution, that’s $12,000 to $16,000 lost to taxes and penalties.

You have a 60-day window to change your mind. If you receive a distribution and roll all or part of it into an IRA or another qualified plan within 60 days, the rolled-over portion is not taxed.8Internal Revenue Service. Rollovers of Retirement Plan and IRA Distributions Because 20% was already withheld, rolling over the full gross distribution means replacing the withheld amount from other funds. Otherwise, that portion counts as taxable.

The IRA Education Exception Doesn’t Apply to 401(k) Plans

This is where online advice frequently misleads borrowers. Section 72(t)(2)(E) of the tax code waives the 10% early withdrawal penalty for distributions used to pay qualified higher education expenses, and it sounds tailor-made for the student loan situation. It applies only to IRAs, not to 401(k) plans.9Internal Revenue Service. Retirement Topics – Exceptions to Tax on Early Distributions Treat any forum post telling you otherwise as wrong for 401(k) money.

If you have both an IRA and a 401(k), the distinction matters for planning. An IRA distribution for qualifying education expenses avoids the 10% penalty, though you still owe income tax. A 401(k) distribution for the same purpose gets hit with both. Rolling 401(k) money into an IRA first and then taking the distribution could reach the exception, but that generally requires separating from the employer sponsoring the 401(k).

What a Distribution Does to Income-Driven Repayment

Federal income-driven repayment plans base your monthly payment on your adjusted gross income. A taxable 401(k) distribution inflates your AGI for the year, which can sharply raise your required monthly student loan payment for the following recertification period. A $30,000 distribution can push an IDR payment up by hundreds of dollars a month.

The impact is worse if you’re working toward Public Service Loan Forgiveness. Higher monthly payments mean you pay more before reaching forgiveness, reducing the total forgiven. If the inflated income pushes your calculated IDR payment above the standard 10-year amount, you lose qualifying PSLF credit for that period. Model the AGI increase before taking any distribution if you’re on an income-driven plan.

Loan vs. Withdrawal: The Bottom Line

The choice between borrowing from your 401(k) and taking a distribution usually comes down to whether you can handle the repayment schedule. A 401(k) loan keeps you whole on taxes. No income tax on the borrowed amount, no 10% penalty, and interest payments go back into your own account. The downsides are the repayment obligation, the job-loss risk, and lost investment growth while the loan is outstanding.

A withdrawal, whether hardship or post-separation, gives you money you never have to put back, but the tax damage is permanent. Between federal and state income taxes plus the early withdrawal penalty, you’re likely losing roughly a third of the money before it reaches your loan servicer, and you permanently reduce your retirement balance along with every year of compounding that money would have earned. For most people under 59½, the 401(k) loan is the less costly route if you’re confident you’ll stay employed long enough to repay it.

Neither option builds anything for retirement. The SECURE 2.0 matching provision is the only approach that grows your 401(k) balance while you pay down loans, which is why checking whether your employer offers it belongs at the top of the list rather than the bottom.