How 401(k)s Work: A Step-by-Step Look at Employer Retirement Plans
What a 401(k) is and how it works
A 401(k) is a retirement savings account that your employer sets up and you contribute to through payroll deductions. Money comes out of your paycheck before taxes are calculated, which lowers your taxable income for that year. Your employer may match a portion of what you contribute — for example, matching 50 cents for every dollar you put in, up to 3% of your salary. The money you contribute and any employer match sit in an investment account that you choose from a menu of options, usually mutual funds or target-date funds.
The account grows tax-free until you withdraw the money. When you turn 59½, you can withdraw without penalty. If you withdraw before that age, you typically pay a 10% penalty plus income tax on the amount withdrawn. When you leave a job, you can roll the 401(k) balance into an individual retirement account (IRA) or into your new employer's plan if they allow it.
The name comes from the section of the tax code that created it. Not all employers offer 401(k)s — some offer similar plans called 403(b)s (common in nonprofits and schools) or 457 plans (for government workers). The mechanics are similar, but contribution limits and withdrawal rules differ.
Key Takeaways
- Money you contribute to a 401(k) comes out of your paycheck before income tax is calculated, reducing what you owe the IRS that year.
- Your employer may match part of your contribution, which is information programs that goes into your account if you contribute enough to trigger it.
- You choose how the money is invested from a list your employer provides, and the account grows tax-free until you withdraw it.
- You can withdraw without penalty starting at age 59½; withdrawals before that age usually cost you a 10% penalty plus income tax.
- When you change jobs, you can move the money to an IRA or to your new employer's plan instead of cashing it out.
How much you can contribute and what your employer might match
For 2024, you can contribute up to $23,500 of your own money to a 401(k) each year. If you are 50 or older, you can contribute an additional $7,500 as a "catch-up" contribution, for a total of $31,000. These limits change each year and are set by the IRS. Your employer's match is separate — it does not count toward your contribution limit.
Employer matches vary widely. A common match is 100% of the first 3% you contribute, meaning if you earn $50,000 and contribute $1,500 (3%), your employer adds another $1,500. Some employers match a smaller percentage, and some match nothing. A few generous employers match more than 100%. To get the full match, you have to contribute at least the percentage your employer matches — if you contribute less, you leave money on the table.
Your employer decides the match formula and can change it year to year. Some plans have a vesting schedule, which means you do not own the employer match when ready — you own it gradually over a set number of years (typically three to five). If you leave before you are fully vested, you forfeit the unvested portion. Your own contributions are always 100% yours from day one.
Pre-tax versus Roth contributions
Most 401(k)s offer two contribution types: traditional (pre-tax) and Roth. With traditional contributions, the money comes out before income tax, so you pay less tax now but pay income tax on withdrawals later. With Roth contributions, you pay income tax on the money now, but withdrawals in retirement are tax-free.
Which one makes sense depends on whether you expect your tax bracket to be higher or lower in retirement. If you think you will be in a lower tax bracket when you retire, traditional may save you more money overall. If you think you will be in a higher bracket, or if you want tax-free withdrawals in retirement, Roth may be better. Many people split the difference and do both.
Not all employers offer Roth 401(k)s — check your plan documents or ask your benefits department. If your employer does not offer Roth, you can open a separate Roth IRA on your own, though Roth IRA contributions have income limits that Roth 401(k)s do not.
Investment choices and how to pick them
Your employer provides a list of investment options, usually between 10 and 30 choices. Common options include stock mutual funds, bond mutual funds, money market funds, and target-date funds. A target-date fund is a single fund that automatically shifts from stocks to bonds as you get closer to retirement — you pick the fund with the year closest to when you plan to retire, and the fund does the rebalancing for you.
If you do not know where to start, a target-date fund is often the simplest choice because it handles the mix for you. If you want more control, you can build your own mix — a common approach for younger workers is 80% stocks and 20% bonds, shifting toward more bonds as you age. Your employer may offer educational materials or a retirement calculator to help you decide.
The investment options available to you depend entirely on what your employer's plan includes. You cannot pick individual stocks or funds outside the plan menu. If you disagree with the options offered, you can still contribute and choose the least-bad option available, or you can contribute less and put additional retirement savings into an IRA where you have more choices.
What happens when you leave your job
When you leave an employer, you have four choices for the 401(k) balance: leave it with your old employer's plan, roll it into your new employer's plan (if they allow it), roll it into an IRA, or cash it out. Cashing it out triggers a 10% penalty plus income tax on the full amount, so it is the most expensive option unless you are in genuine hardship.
A rollover to an IRA or new employer plan moves the money without triggering taxes or penalties, as long as you complete it within 60 days. Many people choose an IRA rollover because IRAs typically offer more investment choices than employer plans. Your old employer is required to give you information about your rollover options — read it carefully, because the rules matter.
If you leave the money with your old employer, you can usually leave it there indefinitely as long as your balance is above a minimum (often $5,000). This can be useful if you like the investment options or want to delay a decision, but you will no longer be able to contribute to that plan. If your balance is very small (under $1,000 in some plans), your old employer may force you to roll it over or cash it out.
Loans and early withdrawals
Some 401(k) plans allow you to borrow against your balance, usually up to 50% of what you have saved or $50,000, whichever is less. You repay the loan to yourself with interest, and the interest goes back into your account. If you leave your job while you have an outstanding loan, you typically have to repay it within 60 days or it becomes a taxable withdrawal subject to the 10% penalty.
If you face a genuine hardship — medical bills, preventing eviction, funeral expenses — some plans allow a hardship withdrawal before age 59½ without the 10% penalty, though you still pay income tax. The definition of hardship varies by plan, and your employer decides whether your situation qualifies. Hardship withdrawals are not automatic; you have to request one and provide documentation.
Loans and hardship withdrawals should be last resorts because they reduce the money available to grow for retirement. If you borrow and then leave your job, you may face an unexpected tax bill. If you take a hardship withdrawal, you lose years of tax-free growth on that money.
Understanding vesting and what you actually own
Your own contributions to a 401(k) are always yours when ready — you own 100% from day one. Employer matching contributions may have a vesting schedule, which means you do not own them right away. A common schedule is 20% per year over five years, so after one year you own 20% of the match, after two years you own 40%, and so on. Some employers use a cliff schedule where you own 0% until you hit a milestone (like three years of service), then you own 100%.
If you leave before you are fully vested, you forfeit the unvested portion — it goes back to your employer. This is one reason to check your vesting schedule before you resign. If you are close to a vesting milestone, staying a few more months could mean thousands of dollars in information programs. Your benefits statement or plan documents show your vesting schedule.
Vesting applies only to employer contributions. Your own money is always yours, and any investment gains on your contributions are always yours. Only the employer match can be forfeited.
Required withdrawals and what happens in retirement
Once you turn 73, the IRS requires you to withdraw a minimum amount each year from your 401(k), called a required minimum distribution (RMD). The amount is calculated based on your age and account balance. If you do not take the RMD, you pay a penalty of 25% of the amount you should have withdrawn (or 10% if you correct it within two years). This rule does not explore to Roth 401(k)s while you are alive, though it does explore to inherited Roth 401(k)s.
If you are still working at age 73 and your employer allows it, you may be able to delay RMDs until you actually retire. This is called the "still-working exception." Check with your plan administrator to see if your plan allows it.
When you retire and start withdrawals, you pay income tax on the amount you withdraw each year. If you contributed to both traditional and Roth, you can choose which to withdraw from and in what order. Many people withdraw from traditional first to manage their tax bracket, or withdraw from Roth to keep traditional balances growing longer.
Frequently Asked Questions
What is the difference between a 401(k) and an IRA?
A 401(k) is offered by your employer and has higher contribution limits ($23,500 in 2024 versus $7,000 for an IRA). An IRA is an account you open on your own with a bank or brokerage and offers more investment choices. Many people use both — they contribute to their employer's 401(k) to get the match, then contribute to an IRA for additional retirement savings.
Can I contribute to a 401(k) if I am self-employed?
No, 401(k)s are only for employees of companies that offer them. If you are self-employed, you can open a Solo 401(k) or a SEP IRA, which have similar tax advantages but different rules. A Solo 401(k) allows higher contributions than a SEP IRA if you have significant self-employment income.
What happens to my 401(k) if my employer goes out of business?
Your 401(k) is held in a separate trust account, not by your employer directly, so it is protected if the company fails. You will be notified of what happens next, and you can roll the balance into an IRA or another employer's plan. Your money is safe even if the company does not.
Can I withdraw money from my 401(k) to pay off debt?
You can take a loan against your balance if your plan allows it, or request a hardship withdrawal if you meet your plan's hardship definition. Cashing out before 59½ costs you a 10% penalty plus income tax. Most financial advisors recommend exhausting other options first because you lose years of tax-free growth and may face a large tax bill.
What if I do not think I will work until 59½?
You can still contribute and benefit from the tax break and employer match. If you retire early, you can withdraw from a traditional IRA using the "Rule of 55" (if you left your job in the year you turned 55 or later) or convert to a Roth and wait five years. These strategies let you access money before 59½ without the 10% penalty, though the rules are complex and worth discussing with a tax professional.
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.