401(k) Withdrawal for Medical Expenses: Rules, Taxes, and Alternatives

A 401(k) withdrawal for medical expenses can avoid the 10% early withdrawal penalty, but only on the portion of your unreimbursed medical bills that exceeds 7.5% of your adjusted gross income for the year.1Internal Revenue Service. Retirement Topics – Exceptions to Tax on Early Distributions The rest of the distribution still gets hit with the penalty, and the entire amount counts as taxable income regardless. Knowing exactly how much qualifies for the exception, and how to claim it on your return, is what keeps you from paying a penalty you didn’t have to.

The 7.5% AGI Rule Explained

The penalty exception doesn’t apply to every dollar of medical spending. It only covers the amount by which your unreimbursed medical expenses exceed 7.5% of your adjusted gross income.2Office of the Law Revision Counsel. 26 USC 213 – Medical, Dental, Etc., Expenses Spending below that line is treated as a normal cost of living.

Work through a number. Your AGI is $80,000. You have $15,000 in unreimbursed medical bills. The 7.5% floor is $6,000. Only $9,000 of your medical costs sit above that floor, so only $9,000 of a 401(k) withdrawal is shielded from the 10% penalty. If you pulled out the full $15,000, the extra $6,000 would face the penalty on top of regular income tax.

Two timing details matter. The medical bills have to be paid in the same tax year you take the distribution. A December surgery paid in December doesn’t count toward a January withdrawal in the following year. And your plan administrator will not do this calculation for you or cap your withdrawal at the penalty-free amount. That math is yours to do at tax time.

Which Medical Expenses Qualify

The IRS pulls its definition from Section 213 of the Internal Revenue Code: amounts paid for diagnosing, treating, or preventing disease, or for care affecting any structure or function of the body.2Office of the Law Revision Counsel. 26 USC 213 – Medical, Dental, Etc., Expenses That covers doctor and hospital bills, dental work, vision care, prescription drugs, mental health treatment, physical therapy, and long-term care. Health insurance premiums, including Medicare Part B, also qualify. Transportation to appointments, parking, tolls, and limited lodging for out-of-town treatment count too.3Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses

Expenses for your spouse and dependents count on the same terms as your own, with the same 7.5% floor and same-year payment rule.

What doesn’t count: cosmetic procedures that aren’t medically necessary, general-wellness supplements, gym memberships, and anything insurance or another source already reimbursed. If your insurer paid part of a bill, only the share you paid out of pocket goes toward the exception.

Hardship Withdrawal and Penalty Exception Are Not the Same Thing

This is where people lose money. A hardship withdrawal and the medical-expense penalty exception are separate rules.

A hardship withdrawal is a plan feature. Your 401(k) plan may let you take money out for an “immediate and heavy financial need,” and medical expenses for you, your spouse, or dependents are a recognized reason.4Internal Revenue Service. Hardships, Early Withdrawals and Loans Qualifying for a hardship withdrawal controls whether the plan releases the funds. It does not waive the 10% penalty.

The penalty waiver is a separate federal tax rule under IRC Section 72(t)(2)(B), claimed on your tax return.5Office of the Law Revision Counsel. 26 USC 72 – Annuities; Certain Proceeds of Endowment and Life Insurance Contracts You can claim it whether or not you itemize deductions. The IRS allows the Section 213 calculation either way.

Getting the Money Out

Call your plan administrator or recordkeeper and confirm the plan actually permits the distribution you want. Not every 401(k) allows in-service withdrawals, and some require you to exhaust loan options first. You’ll fill out a distribution request form and may need to attach medical bills or invoices. The administrator verifies that you meet the plan’s rules for releasing the money. They are not checking your AGI or the penalty math.

Gross Up for the 20% Withholding

The administrator must withhold 20% of any taxable distribution for federal income tax before sending the money.6Internal Revenue Service. 401(k) Resource Guide – Plan Participants – General Distribution Rules Request $10,000 and you’ll receive $8,000.

To actually net the amount you need, divide your target by 0.80. For a $10,000 bill, request $12,500. After $2,500 in withholding, you receive $10,000. But remember the full $12,500 is taxable income, and only the portion above the 7.5% AGI floor escapes the penalty, so grossing up too aggressively costs you.

Reporting It on Your Tax Return

Your plan sends Form 1099-R by January 31.7Internal Revenue Service. General Instructions for Certain Information Returns (2025) Box 7 will show distribution Code 1, “early distribution, no known exception.”8Internal Revenue Service. 2025 Instructions for Forms 1099-R and 5498 That’s expected. The IRS tells administrators to use Code 1 for medical-expense distributions because the administrator can’t verify whether you actually qualify. You claim the exception yourself.

File Form 5329 with your return. Enter exception number 05 and the portion of the distribution that qualifies, which the IRS defines as the amount you paid for unreimbursed medical expenses during the year minus 7.5% of your AGI.9Internal Revenue Service. 2025 Instructions for Form 5329 Anything above that qualifying amount still faces the 10% additional tax.

Hold on to every receipt, invoice, explanation of benefits, and proof of payment. If the IRS questions your return, you need documentation that each dollar claimed under exception 05 went to a qualifying expense and wasn’t reimbursed.

Income Tax Still Applies

Dodging the 10% penalty is not the same as dodging tax. A traditional 401(k) distribution is fully taxable as ordinary income because you never paid tax on the contributions or their growth.6Internal Revenue Service. 401(k) Resource Guide – Plan Participants – General Distribution Rules The withdrawal adds to your gross income for the year and can push you into a higher bracket.

Someone earning $70,000 who takes a $20,000 distribution reports $90,000 in gross income. That can raise your tax rate and affect income-based credits and deductions. If your medical provider will accept it, splitting payments across two tax years can soften the bracket impact, but only if each year’s spending independently clears the 7.5% floor.

State income tax is a separate consideration. Most states tax the distribution as ordinary income. Some conform to the federal penalty exception and some don’t. Check your state’s rules before assuming federal treatment is the whole picture.

Consider These Options First

A withdrawal is permanent. The money leaves your retirement account and doesn’t come back. Two alternatives can cost less.

A 401(k) Loan

If your plan allows loans, you can borrow up to the lesser of $50,000 or 50% of your vested balance.10Internal Revenue Service. Retirement Plans FAQs Regarding Loans A loan isn’t a taxable event. You repay yourself with interest, usually over five years through payroll deduction, and you avoid income tax and the 10% penalty entirely. The catch: if you leave your job before the loan is repaid, most plans require full repayment within a short window, and the unpaid balance becomes a taxable distribution.

SECURE 2.0 Emergency Distribution

Starting in 2024, the SECURE 2.0 Act created a penalty-free emergency personal expense distribution of up to $1,000 per year for unforeseeable needs, available in plans that adopt the provision. You can repay within three years. If you don’t repay, you have to wait until the repayment window closes or until new contributions equal the amount withdrawn before taking another. The cap is small, but for a modest medical bill it skips the penalty without having to clear the 7.5% AGI threshold. Confirm with your plan administrator whether the feature is available.