Subscribe free
GoldSilverBitcoinGold/silver ratio

Using a 401(k) to pay off debt or a mortgage: the tax and penalty math

What it costs in federal tax and the 10% additional tax to clear a credit card, loan or mortgage with 401(k) money, how much has to come out to net a given payoff, how a plan loan compares, and which legal protections the money has while it stays in the plan.

By Diversify Guy, editorial desk11 min read

We may earn a commission from companies named on this page. It never changes a published fee or rating. How we get paid

In this article 9 sections
  1. Can you use a 401(k) to pay off debt?
  2. How much do you need to withdraw to pay off a debt?
  3. How does a 401(k) withdrawal affect your tax bracket?
  4. Can you pay off a mortgage with a 401(k)?
  5. How does a 401(k) loan compare with a withdrawal for paying off debt?
  6. How is 401(k) money protected from creditors, compared with home equity?
  7. What questions help you weigh using a 401(k) for debt?
  8. About this guide
  9. Sources and check dates

Key points

  • No tax rule treats paying off debt as special. The money comes out as an ordinary withdrawal, a hardship withdrawal or a plan loan, and each follows its own rules.
  • A withdrawal has to be bigger than the debt, because the withdrawal is itself taxable income and, before 59 and a half, usually owes the 10% additional tax. At 62, clearing $50,000 takes a $60,706 withdrawal in our example. At 52, after leaving a job, clearing $30,000 takes $41,692.
  • A large withdrawal is taxed at your top bracket, and in a single year it can push part of the money into a higher one.
  • While money stays in a 401(k), federal law keeps most creditors from reaching it, and bankruptcy law exempts it with no dollar cap. Home equity has a much smaller federal bankruptcy exemption ($31,575 from April 1, 2025). Once withdrawn, the money loses the retirement-account protection.

Whether to use 401(k) money for a debt depends on things only you know: the interest rate on the debt, your bracket this year and later, your age, how secure your job is and what else you could use. This guide gives the math and the rules on each side and stops there. Our guide to 401(k) withdrawals covers every way money comes out of a plan.

These are federal rules. We checked every rule and figure against the Internal Revenue Code, the Bankruptcy Code (title 11), ERISA (title 29), Treasury regulations, IRS pages and the Federal Register on October 27, 2026, and again on November 3, 2026. They are listed at the end. State tax and state exemption laws are not covered.

Can you use a 401(k) to pay off debt?

There are three routes, and which ones are open depends on your age, whether you still work for the employer and what your plan allows.

RouteWhen it is openTaxPaid back?
Withdrawal after you leave the job, or at 59 and a half if the plan allows it while you workAfter a separation from service, or from 59 and a halfIncome tax; 10% before 59 and a half unless an exception appliesNo
Hardship withdrawalWhile working, only for the reasons the plan allowsIncome tax; usually the 10%No
Plan loanIf the plan offers loansNone, if repaid on scheduleYes, within 5 years

The hardship route is narrow for debt. Credit cards and ordinary mortgage payments are not on the regulation’s list of needs that count automatically. Payments “necessary to prevent the eviction of the employee from the employee’s principal residence or foreclosure on the mortgage on that residence” are. The rules are in our 401(k) hardship withdrawal guide.

The tax rules do not ask what a loan is for: the IRS says “the purpose of the loan” is “irrelevant” in deciding whether it is permitted. A plan’s loan policy can still set its own conditions. Our 401(k) loan vs withdrawal guide has the limits and repayment rules.

How much do you need to withdraw to pay off a debt?

A withdrawal of pre-tax money is ordinary income in the year you take it. So to have a given amount left for the debt, the withdrawal has to cover the debt plus the federal income tax it adds, plus the 10% if it applies.

As a rough guide inside one bracket: withdrawal = payoff ÷ (1 minus your top bracket rate, minus 10% if the additional tax applies). At 22% with the 10%, that is payoff ÷ 0.68. The tables below were worked bracket by bracket with the 2026 brackets and standard deduction, and match our 401(k) withdrawal calculator.

At 62 (past 59 and a half), single, $40,000 of other taxable income (a pension, say).

To clearWithdrawFederal income tax it addsTop bracket
$20,000$22,728$2,72712%
$50,000$60,706$10,70522%
$100,000$125,940$25,94024%

Run the $50,000 case or the $100,000 case.

At 52, left the job at 52: single, $50,000 of other taxable income. The rule of 55 does not apply, because it starts in the year you turn 55, so the 10% applies.

To clearWithdrawIncome tax10% additional taxTax and 10% together
$20,000$26,986$4,287$2,699$6,986
$30,000$41,692$7,522$4,169$11,691
$50,000$71,103$13,993$7,110$21,103

Run the $30,000 case. All figures assume pre-tax money only, the standard deduction and no state tax. They are 2026 figures; the 2027 brackets had not been published on November 3, 2026.

Withholding: the cash on the day is less

When a plan pays you a withdrawal that could be rolled over, it must hold back 20% for federal tax. A hardship withdrawal cannot be rolled over, so it has 10% withheld by default instead, and Form W-4R lets you choose any rate from 0% to 100%. On the $60,706 withdrawal at 62, $12,141 is withheld and $48,565 reaches you, short of the $50,000 payoff. The tax due is $10,705, so about $1,436 comes back when you file, if your other withholding covers the tax on your other income. To have the full $50,000 in hand on the day, $62,500 must come out ($50,000 ÷ 0.8). That adds $11,100 of tax, and about $1,400 of the withholding comes back at filing; run it.

How does a 401(k) withdrawal affect your tax bracket?

The withdrawal is stacked on top of your other income, so it is taxed at your highest rates. In the $50,000 case at 62, taxable income before the withdrawal is $23,900. The $60,706 withdrawal is taxed $26,500 at 12% and $34,206 at 22%: $10,705 in all, 17.6% of the withdrawal. In the $100,000 case, $44,140 of the $125,940 lands in the 24% bracket.

Spreading it out. Taking the money over two tax years can keep more of it in a lower bracket. Two withdrawals of $30,353, one in each year, assuming income, brackets and deductions stay the same, add $4,027.66 of tax each: $8,055.32, against $10,705.32 in one year, $2,650 less. That illustration uses the 2026 brackets for both years. The debt keeps charging interest until it is paid, so the saving is set against the extra interest.

Other effects of a higher income.

  • Social Security. A withdrawal counts in the income test that decides how much of your benefits is taxable. See our guide to whether Social Security is taxable.
  • Medicare premiums. Part B surcharges (IRMAA) are set from your income two years earlier, so a large withdrawal can raise the premium two years later if you are on Medicare by then. Under the 2026 tiers, a single filer pays a surcharge above $109,000 of income, and $165,940, as in the $100,000 case, falls in the tier that adds $202.90 a month to the standard $202.90 premium. The tiers for 2028 premiums, which will use 2026 income, have not been set.
  • Taxes on 401(k) withdrawals in general are in our guide to taxes on 401(k) withdrawals.

Can you pay off a mortgage with a 401(k)?

The gross-up is the same: clearing a $100,000 mortgage at 62 in the example above takes $125,940. A few rules are specific to a mortgage.

  • Hardship. A plan may make a hardship payment to stop a foreclosure on your main home, not to pay the mortgage down. The rule excludes “mortgage payments” from the home-purchase reason.
  • Loan term. A plan loan longer than 5 years is allowed only to “acquire” a principal residence, and a refinancing “cannot qualify” in general. A loan to pay off a mortgage on a home you already own is generally a 5-year loan.
  • Mortgage interest deduction. Home mortgage interest is deductible only if you itemize on Schedule A. If you do, paying off the mortgage also ends that deduction. Interest on a 401(k) loan secured by your deferrals is not deductible.
  • Home equity. Paying off the mortgage moves money from the plan into home equity, which has different protection from creditors (below).

How does a 401(k) loan compare with a withdrawal for paying off debt?

Take a $30,000 credit card balance at 52, with $50,000 of income.

Plan loan (still working)Withdrawal (left the job)
Comes out of the plan$30,000$41,692
Federal income tax and 10%$0$11,691
Repayment60 payments of $608.29 at an assumed 8%, $6,497.40 of interestNone
Account afterwardsRebuilt as you repay$41,692 smaller for good
If the job endsThe plan may call the loan; an unpaid balance is offset and taxed unless rolled overNo effect

The 8% rate is an assumption; your plan sets its own, and the payments go back into the plan under its loan terms. The loan route trades the tax for 5 years of payments and the job-loss risk. If the loan is offset and not rolled over, $30,000 at 52 adds $4,950 of income tax and $3,000 of 10% tax with this income. Our 401(k) loan vs withdrawal guide covers the offset and the extended rollover deadline.

While you still work for the employer at 52, a withdrawal for a credit card may not be available at all: the plan can pay out deferrals only on certain events, and credit card debt is not one of the hardship reasons that count automatically.

How is 401(k) money protected from creditors, compared with home equity?

From most creditors. ERISA requires that “Each pension plan shall provide that benefits provided under the plan may not be assigned or alienated.” The tax code has the same rule for a qualified plan, and the Treasury regulation spells it out: benefits “may not be anticipated, assigned (either at law or in equity), alienated or subject to attachment, garnishment, levy, execution or other legal or equitable process.” The exceptions include a federal tax levy and a qualified domestic relations order (for example, in a divorce). Neither rule covers governmental plans, or church plans that have not elected to be covered.

In bankruptcy. The Bankruptcy Code lets a debtor exempt “retirement funds to the extent that those funds are in a fund or account that is exempt from taxation under section 401, 403, 408, 408A, 414, 457, or 501(a).” The exemption is on both lists a debtor can choose from: the federal list and the list based on state law. For traditional and Roth IRAs there is a cap, $1,711,975 from April 1, 2025, which does not count money rolled over from employer plans. A 401(k) has no dollar cap.

Home equity. Under the federal exemption list, the homestead exemption is $31,575 of equity in your residence from April 1, 2025. States set their own exemptions, and a state’s law can stop its residents from using the federal list.

What changes when you withdraw. The retirement-funds exemption covers funds “in a fund or account” of those kinds. Once money is withdrawn and paid to a lender, it is no longer in one. In the $100,000 mortgage example, $125,940 leaves a plan with no dollar cap on its exemption, $25,940 goes in tax, and $100,000 becomes home equity, which the federal list protects up to $31,575. This is the federal picture only, and bankruptcy outcomes depend on the facts and the state.

What questions help you weigh using a 401(k) for debt?

  1. Which route is open? Your age, whether you have left the employer and what the plan allows decide whether it is a withdrawal, a hardship withdrawal or a loan.
  2. What does the payoff really cost? Gross the debt up for the tax and any 10%, as in the tables, and set that against the interest the debt would charge.
  3. Which bracket are you in this year, and next? One large withdrawal is taxed at your top rates; two smaller ones in two years may not be.
  4. Are you near 55 or 59 and a half? The rule of 55 starts in the year you turn 55 for the plan of the job you leave; see our rule of 55 guide. Before 59 and a half, see the exceptions in our 401(k) early withdrawal penalty guide.
  5. How secure is the job? A plan loan stays untaxed only while the payments are made, and leaving the job can bring the balance due. Our guide to your 401(k) after a layoff covers loan offsets after a job loss.
  6. What protection does the money have now, and what will it have after?

About this guide

Written by the Diversify Guy editorial desk. Diversify Guy is a pen name. It is the byline of our editorial team, not a single individual. We do not publish personal trading records or claim to be your adviser. We tell you where every figure came from so you can check it yourself. How we work and how we get paid.

This guide explains federal rules. It is not personalized tax, legal or investment advice, and it makes no recommendation either way.

Sources and check dates

All sources were fetched and checked on October 27, 2026, and all were checked again on November 3, 2026 (eCFR titles 20 and 26 up to date as of October 30, 2026).

About this byline

Diversify Guy is the pen name of our editorial desk, not a person. We do not claim a personal investment track record, we are not advisers, and every claim about a company comes from a source you can check. Who writes this

Spotted an error? Tell us. We fix pages in place and say what changed.

First published Dec 5, 2026

The Fine Print

Plain-English notes on your 401(k), IRA and Social Security.

By subscribing, you agree to get emails from Diversify Guy, including sponsored messages. Unsubscribe anytime. You also agree to our Terms of use, which include an arbitration agreement, and our Privacy policy.