The borrowing limit is usually half your vested balance, up to $50,000

The IRS sets a ceiling on 401k loans: you can borrow up to 50 percent of your vested account balance, or $50,000, whichever is smaller. If your vested balance is $80,000, you can borrow $40,000. If it is $120,000, you can borrow $50,000, not $60,000. The limit resets each time you take a loan, so if you borrowed $30,000 five years ago and have since repaid it, you can borrow up to $50,000 again based on your current balance.

Your plan document may set a lower limit. Some employers cap loans at $25,000 or require you to leave a minimum balance untouched. Check with your plan administrator — usually the HR or benefits department — to learn what your specific plan allows. The IRS floor is 50 percent up to $50,000, but your employer can be more restrictive.

The vested balance is the money that belongs to you, not the portion your employer contributed that you have not yet earned. If you have been at your job two years and your employer uses a three-year vesting schedule, only the first two years of employer contributions count toward your borrowing limit. Ask your plan administrator for your current vested balance; they can tell you the exact number in writing.

Key Takeaways

  • You can borrow up to 50 percent of your vested 401k balance, with a $50,000 ceiling, though your employer's plan may set a lower limit.
  • You must repay the loan within five years in most cases, with payments made through payroll deductions, and you pay interest to your own account.
  • If you leave your job, the loan typically becomes due within 60 to 90 days, and failure to repay triggers income tax plus a 10 percent early withdrawal penalty if you are under 59½.
  • Borrowing reduces the money working in your account and may cost you years of compound growth, even if you repay on time.

Repayment terms and how interest works

Most 401k loans must be repaid within five years, though loans used to buy a primary residence may have longer terms — sometimes up to 15 or 30 years depending on your plan. You repay through payroll deductions, meaning your employer withholds the payment from each paycheck and sends it back to your 401k account. The interest rate is typically the prime rate plus 1 or 2 percentage points; your plan administrator will tell you the exact rate when you borrow.

The interest you pay goes back into your own 401k account, not to a bank or lender. That sounds like a benefit, but it is not: you are paying interest on your own money, and that interest is money you would have earned through investment growth if you had left the balance alone. If you borrow $30,000 at 7 percent interest over five years, you will pay roughly $5,600 in interest — all of which goes back into your account, but all of which represents money that could have grown through market returns instead.

If you miss a payment, the loan goes into default. Your plan will typically give you a grace period — often 90 days — to catch up. If you do not, the unpaid balance is treated as a withdrawal, which means you owe income tax on it immediately plus a 10 percent early withdrawal penalty if you are under 59½. This can happen without warning, so if you are struggling with payments, contact your plan administrator right away.

What happens to your loan if you leave your job

When you leave your employer, the loan becomes due in full. Most plans give you 60 to 90 days to repay the entire balance. If you cannot pay it back, the unpaid amount is treated as a taxable withdrawal. You will owe income tax on the full amount, plus the 10 percent early withdrawal penalty if you are under 59½. A $30,000 loan that you cannot repay could cost you $9,000 to $12,000 in taxes and penalties, depending on your tax bracket.

Some plans allow you to roll the loan into an IRA or a new employer's 401k plan, which extends the repayment timeline. This is not automatic — you have to ask your plan administrator whether your plan permits it and what the process is. If your new employer's plan does not accept rollovers, or if you do not move the money within the 60-day window, the loan is treated as a distribution and the tax bill applies.

This is one of the largest hidden costs of 401k borrowing: job changes are common, and a loan that seemed manageable at your old job can become a tax emergency at a new one. If you are thinking about leaving your job in the next few years, borrowing from your 401k carries extra risk.

The long-term cost of removing money from your account

Even if you repay your loan on time and never leave your job, borrowing costs you money through lost growth. When you borrow $30,000, that $30,000 stops earning returns. Over 20 years, $30,000 invested at 7 percent annual growth becomes roughly $116,000. If you borrow it for five years and repay it with interest, you have paid back $36,000 but your account has lost 20 years of growth on that money — a cost of roughly $80,000 in foregone returns.

This is not a fee you see on a statement. It is an opportunity cost, and it is real. The younger you are when you borrow, the larger this cost becomes, because you have more years of compound growth ahead of you. A 25-year-old borrowing $30,000 loses far more to foregone growth than a 55-year-old borrowing the same amount.

Repaying the loan does not fully recover this loss. Your account balance returns to what it was, but the years of growth you missed are gone forever. This is why financial advisors often recommend borrowing from a 401k only when other options — a personal loan, a line of credit, or a family loan — are not available or are significantly more expensive.

Loans versus withdrawals: the tax difference

A 401k loan is not a withdrawal. You are borrowing your own money and repaying it, so you do not owe income tax on the amount borrowed. A withdrawal, by contrast, is taxable in the year you take it. If you withdraw $30,000 before age 59½, you owe income tax on the full $30,000 plus a 10 percent penalty — potentially $9,000 to $12,000 depending on your tax bracket.

This is why loans can seem attractive: you get the money without an immediate tax bill. But the tax advantage disappears if you leave your job and cannot repay the loan, or if you default on payments. At that point, the unpaid balance becomes a withdrawal, and you face the full tax and penalty bill retroactively.

Some plans offer a Roth 401k option, which has different rules. Roth contributions are made with after-tax dollars, so withdrawals of your contributions (not earnings) are not taxed. Loans from a Roth 401k follow the same 50-percent-up-to-$50,000 rule, but the tax consequences of default are different. Ask your plan administrator how loans work under your specific plan type.

Hardship withdrawals as an alternative

If you face a genuine financial hardship — medical bills, foreclosure, eviction, or funeral expenses — your plan may allow a hardship withdrawal instead of a loan. Hardship withdrawals do not have to be repaid, but they are taxable and subject to the 10 percent early withdrawal penalty if you are under 59½. They are also subject to stricter rules: you must prove the hardship is immediate and severe, and you must have exhausted other resources first.

Hardship withdrawals are not better than loans from a tax standpoint — you still owe tax and penalty. But they do not have a repayment obligation, so you do not risk default if your situation does not improve. The trade-off is that you lose the money permanently rather than temporarily. Your plan administrator can tell you whether your situation meets the hardship definition and what documentation you need to provide.

Frequently Asked Questions

Can I borrow from my 401k if I am self-employed or have a Solo 401k?

Solo 401k plans allow loans, but the rules are stricter. You can borrow up to 50 percent of your vested balance or $50,000, the same as a traditional 401k. However, if you are the only employee, you cannot borrow from your own contributions — only from employer contributions. If you have no employer contributions, you cannot borrow at all. Consult a tax professional or your plan administrator about your specific situation.

What if I have multiple 401k accounts from different jobs?

The $50,000 limit applies across all your 401k accounts combined, not per account. If you have a $100,000 balance at your current job and a $60,000 balance at an old job, you can borrow up to $50,000 total, not $50,000 from each. This limit resets only after you repay the loan in full, so plan accordingly if you have accounts spread across multiple employers.

Can I borrow from my 401k while I am still working at the same company?

Yes. You can borrow while employed and repay on schedule without triggering the full-repayment requirement that applies when you leave. However, most plans require you to stop contributing to your 401k while you have an outstanding loan, which means you lose the employer match during the repayment period. Check your plan document or ask your HR department about this restriction.

What happens if I die before I repay my 401k loan?

The unpaid loan balance is treated as a taxable withdrawal to your estate or beneficiaries. They will owe income tax on the amount, plus the 10 percent early withdrawal penalty if the withdrawal would have been subject to it. This can significantly reduce the amount your heirs receive. If you have a large loan balance and are concerned about this, discuss it with your plan administrator or a financial advisor.