Skip to main content

How a 401(k) Works: From Paycheck Deduction to Retirement

Your employer takes money from your paycheck and puts it in a retirement account

A 401(k) is a retirement savings account that your employer sets up. Money comes directly out of your paycheck before taxes, goes into an account in your name, and you choose how to invest it. Your employer may add matching money—typically 3 to 6 percent of your salary—if you contribute enough. The account grows tax-free until you withdraw it, usually after age 59½.

The name comes from the section of the tax code that created it. It is not a loan, not a government program, and not something you apply for through an agency. Your employer's payroll system handles the whole process automatically once you enroll.

Key Takeaways

  • Money leaves your paycheck before income tax is calculated, reducing your taxable income for the year.
  • Your employer may match a portion of what you contribute—often 50 cents to a dollar for every dollar you put in, up to a limit.
  • You choose how the money is invested from a menu of mutual funds and other options your employer's plan offers.
  • Withdrawals before age 59½ usually trigger a 10 percent penalty plus income tax, with limited exceptions for hardship or loans.
  • The IRS sets annual contribution limits that change each year; for 2024, the limit is $23,500 for people under 50.

How money moves from your paycheck into the account

When you enroll in your employer's 401(k) plan, you tell payroll what percentage of each paycheck to set aside—for example, 5 percent or 10 percent. That amount is deducted before federal income tax is calculated. If you earn $50,000 a year and contribute 10 percent, you contribute $5,000 and your taxable income drops to $45,000.

The money goes into a separate account held by a plan administrator—often a large financial services company like Fidelity, Vanguard, or Charles Schwab. Your employer does not hold the money; the administrator does, and it is legally yours from the moment it is deducted. Payroll sends the contributions to the administrator, usually weekly or monthly, and the administrator deposits them into your account.

Social Security and Medicare taxes (called FICA taxes) still come out of your paycheck, even though income tax does not. This is why a 401(k) reduces your tax bill but does not eliminate all payroll deductions.

Employer matching and why it matters

Many employers offer to match your contributions—meaning they add their own money to your account based on how much you contribute. A common match is 50 percent of what you contribute, up to 6 percent of your salary. If you earn $50,000 and contribute 6 percent ($3,000), your employer adds $1,500.

Matching is not automatic. You have to contribute first. If you contribute nothing, your employer contributes nothing. If you contribute less than the match threshold, your employer matches only what you contributed. This is why financial advisors often say to contribute at least enough to get the full match—it is immediate, may provide money added to your retirement savings.

The match amount and the rules vary by employer. Some employers match dollar-for-dollar up to 3 percent of salary. Others match 25 cents on the dollar up to 8 percent. Your employer's plan documents spell out the exact formula. You can find these in your plan's summary or by asking your HR or benefits department.

Choosing how your money is invested

Once the money is in your account, you decide how to invest it. Your employer's plan offers a menu of investment options—usually 10 to 30 choices. These are typically mutual funds that invest in stocks, bonds, or a mix of both. Some plans also offer target-date funds, which automatically shift from stocks to bonds as you approach retirement.

You can split your contributions among multiple funds. For example, you might put 60 percent in a stock fund and 40 percent in a bond fund. You can also change your allocation at any time, though most people change it only once or twice a year.

The investment options available to you depend entirely on what your employer's plan includes. There is no universal menu. A plan at one company might offer 15 funds; a plan at another might offer 40. If you want an investment that is not on the menu, you cannot buy it inside the 401(k)—you would have to buy it in a separate brokerage account outside the plan.

How taxes work now and in retirement

Money you contribute to a traditional 401(k) reduces your taxable income in the year you contribute it. If you contribute $10,000, your taxable income drops by $10,000. This means you owe less federal income tax that year. When you file your tax return, the $10,000 contribution is already subtracted before you calculate what you owe.

The money grows inside the account without being taxed each year. If your $10,000 grows to $50,000 over 20 years, you do not owe tax on that $40,000 gain until you withdraw it. This tax-free growth is one of the main reasons employers offer 401(k)s and why people use them.

When you withdraw money in retirement, you pay income tax on the full amount withdrawn—both your original contributions and all the growth. If you withdraw $50,000 in a year when you are retired, that $50,000 is added to your other income for that year and taxed at your ordinary income tax rate. Some people are in a lower tax bracket in retirement, which means they pay less tax on the withdrawal than they would have paid on the same income while working.

Withdrawal rules and penalties

You can withdraw your money at any time, but the IRS penalizes early withdrawals. If you withdraw before age 59½, you owe a 10 percent penalty on the amount withdrawn, plus income tax. If you withdraw $10,000 at age 45, you pay 10 percent ($1,000) in penalty plus income tax on the full $10,000.

There are exceptions to the early withdrawal penalty. You can withdraw without penalty if you become permanently disabled, if you have significant medical expenses, if you are unemployed and need money for health insurance premiums, or if you take substantially equal periodic payments based on your life expectancy. The rules for each exception are specific and documented in IRS Publication 590-B. A tax professional can tell you whether your situation qualifies.

At age 73, the IRS requires you to begin taking withdrawals—called required minimum distributions or RMDs. The amount is calculated based on your age and account balance. If you do not take the required amount, you owe a penalty equal to 25 percent of the shortfall (or 10 percent if you correct it within two years). You can take more than the minimum without penalty; you just cannot take less.

401(k) loans and hardship withdrawals

Some plans allow you to borrow from your own 401(k) account. You borrow from yourself, not from the employer or the plan administrator. The loan has terms—usually you repay it over five years with interest. The interest rate is typically the prime rate plus 1 or 2 percent, and the interest goes back into your account, not to a bank. If you leave your job, the loan usually must be repaid within 60 to 90 days or it is treated as a withdrawal and taxed.

A hardship withdrawal lets you take money out before age 59½ without the 10 percent penalty, though you still owe income tax. Hardship reasons include medical bills, home repairs to prevent foreclosure, tuition, or burial expenses. Not all plans offer hardship withdrawals, and the plan administrator decides whether your reason qualifies. You must also show that you have no other way to pay for the expense.

Loans and hardship withdrawals both reduce the money available for retirement growth, so they should be a last resort. Many people use a loan instead of a withdrawal because the loan does not trigger the 10 percent penalty and the money goes back into the account.

Contribution limits and catch-up contributions

The IRS sets an annual limit on how much you can contribute to a 401(k). For 2024, the limit is $23,500 for people under age 50. This limit changes most years, usually increasing by $500 or $1,000 to keep pace with inflation. The limit applies to your contributions only, not to your employer's match.

If you are age 50 or older, you can make an additional catch-up contribution of $7,500 per year, bringing your total to $31,000. This is designed to help people who started saving late or want to accelerate savings before retirement. Catch-up contributions are optional; you do not have to make them.

If you contribute more than the limit, the excess is taxed twice—once in the year you over-contribute and again when you withdraw it. Your plan administrator should catch this and return the excess to you, but it is your responsibility to track your contributions across all employers if you work multiple jobs or change jobs during the year.

What happens when you leave your job

When you leave your employer, your 401(k) account stays in the plan unless you move it. You have four main options: leave it where it is, roll it into your new employer's plan, roll it into an individual retirement account (IRA), or withdraw it and pay taxes and penalties.

A rollover moves money from one retirement account to another without triggering taxes or penalties, as long as you follow the rules. If you roll into an IRA, you have access to many more investment options than most 401(k) plans offer. If you roll into a new employer's plan, your money stays in a 401(k) structure. Some people leave money in their old employer's plan if the fees are low or the investment options are good.

If you withdraw the money instead of rolling it over, you owe income tax on the full amount and a 10 percent penalty if you are under 59½. This is rarely the best choice unless you have an immediate need and understand the tax cost.

Frequently Asked Questions

Can I contribute to a 401(k) and an IRA in the same year?

Yes. You can contribute to both a 401(k) and an IRA in the same year. The contribution limits are separate—the 401(k) limit does not reduce how much you can put in an IRA. However, if you have a high income and a workplace retirement plan, your ability to deduct IRA contributions may be limited. Check IRS Publication 590-A for income phase-out ranges.

What happens to my 401(k) if my employer goes out of business?

Your money is protected. The account is held by a separate plan administrator, not by your employer. Even if your employer files for bankruptcy, your 401(k) belongs to you and cannot be seized by creditors. The plan may be terminated, but your balance is yours. The administrator will contact you with instructions on what to do next, usually offering a rollover to an IRA.

Can I change my contribution amount or investment choices whenever I want?

Yes to both. You can change how much you contribute to your paycheck at any time by contacting payroll or your benefits administrator. You can also change how your money is invested at any time, usually through your plan's website or by calling the administrator. Most people make these changes once or twice a year, but there is no limit on how often you can change them.

Do I have to contribute to my employer's 401(k)?

No. Contributing is optional. Your employer cannot force you to participate. However, if your employer offers matching contributions and you do not participate, you miss out on assistance programs. Many people choose to contribute at least enough to capture the full match, even if they cannot afford to contribute more.

What is the difference between a traditional 401(k) and a Roth 401(k)?

A traditional 401(k) reduces your taxable income now and you pay tax when you withdraw. A Roth 401(k) does not reduce your taxable income now, but withdrawals in retirement are tax-free. Some employers offer both options. Roth contributions make sense if you expect to be in a higher tax bracket in retirement or want tax-free growth. Not all plans offer Roth options.