The 401(k) explained
How a 401(k) works: pre-tax and Roth deferrals, an employer match worked example, vesting, contribution limits and the early withdrawal tax.
Part of the Investment Accounts and Tax track on Agenticks. About 11 minutes, written for a beginner reader.
Read first: Tax-advantaged accounts explained.
Last reviewed .
Risk notice. Tax rules depend on where you live and on your own circumstances, and they change. This lesson explains how the rules work in general; the official source linked below is the final word.
Key takeaways
- A 401(k) is a US workplace retirement plan. Pre-tax deferrals lower taxable income now and are taxed later; designated Roth deferrals are taxed now and qualified withdrawals are not.
- Many employers add contributions such as a match. The formula varies by plan, and the employer's money may only become yours over time through vesting.
- Your own salary deferrals are always 100% vested. Employer contributions follow the plan's vesting schedule.
- Withdrawals before age 59½ generally face an additional 10% tax on the taxable part unless an exception applies.
This lesson applies to the United States. The 401(k) is defined in US tax law and the rules below are the IRS's. Each employer's plan also has its own terms, and your situation decides how the rules apply, so the plan documents and IRS pages are the final word. A 401(k) is a workplace retirement plan. You choose to have part of your pay put into an account in your name, and employers can contribute to employees' accounts too. Elective salary deferrals are left out of your taxable income, except for designated Roth deferrals, and distributions including earnings are taxed when they come out in retirement. So a 401(k) can follow either design from tax-advantaged accounts explained, depending on which kind of deferral the plan offers and you choose.
Pre-tax or Roth: the same plan, two tax treatments
Pre-tax deferrals are made with before-tax dollars and taxed on the way out. Designated Roth deferrals are made with after-tax dollars, and qualified withdrawals of contributions and earnings are not taxed. Unlike a Roth IRA, a Roth 401(k) has no income limit to take part.
The IRS's comparison chart sets the two side by side. With pre-tax deferrals, withdrawals of contributions and earnings are subject to federal and most state income taxes. With designated Roth deferrals, withdrawals of contributions and earnings are not taxed, provided the distribution is qualified, which among other things requires the account to have been held for at least five years. The arithmetic behind choosing between them is the same as in Roth IRA vs traditional IRA: if your tax rate when you withdraw is the same as now, the two leave you with the same amount. A lower future rate favours pre-tax; a higher one favours Roth. The limits. There is a yearly cap on your own elective deferrals, and it counts all your deferrals across every plan you take part in. People aged 50 and over can add catch-up contributions if the plan allows, and a higher catch-up applies at ages 60, 61, 62 and 63. A separate, larger cap covers employee and employer contributions together. All of these figures are in the table below.
401(k) plan
| Employee elective deferral limit (2026) | $24,500, source: IRS: Retirement topics, 401(k) and profit-sharing plan contribution limits, checked 2026-11-08 |
|---|---|
| Catch-up contribution, age 50 and over (2026) | $8,000, source: IRS: Retirement topics, 401(k) and profit-sharing plan contribution limits, checked 2026-11-08 |
| Higher catch-up contribution, ages 60 to 63 (2026) | $11,250, source: IRS: Retirement topics, 401(k) and profit-sharing plan contribution limits, checked 2026-11-08 |
| Total from employee and employer (2026) | $72,000, source: IRS: Retirement topics, 401(k) and profit-sharing plan contribution limits, checked 2026-11-08 |
| Additional tax on an early distribution (Current rule) | 10%, source: IRS: Topic no. 558, Additional tax on early distributions from retirement plans other than IRAs, checked 2026-11-08 |
Worked example: how an employer match adds up
An employee earns $60,000. Their plan matches 50% of what they contribute, on contributions up to 6% of pay. That formula is illustrative; real plans use many different formulas.
| Contribute 3% of pay (Match: 50% of $1,800 = $900. Total $2,700) | $1,800 |
|---|---|
| Contribute 6% of pay (Match: 50% of $3,600 = $1,800. Total $5,400) | $3,600 |
| Contribute 10% of pay (Match still $1,800, because only the first 6% of pay is matched. Total $7,800) | $6,000 |
| Most this formula adds | $1,800 a year, reached at 6% of pay |
Illustrative. The match is money from the employer that only reaches you through the plan, subject to its vesting schedule.
Vesting. In a retirement plan, vesting means ownership. Your own elective deferrals from salary are always 100% vested. Employer contributions can follow a schedule. The IRS describes two common shapes: cliff vesting, where you own nothing of the employer's money until a set point and then all of it, for example 100% after three years of service; and graded vesting, where your vested share rises each year, for example from 20% after two years to 100% after six. Under a six-year graded schedule like that, someone who leaves after three years would keep all of their own deferrals and part of the employer's contributions. Under a three-year cliff, leaving one month before the third year could mean keeping none of the employer's money. Knowing the schedule matters most when changing jobs.
Taking money out early. The law imposes a 10% additional tax on certain early distributions from retirement plans, generally those taken before age 59½, equal to 10% of the part of the distribution that is included in income. That is on top of the regular income tax on a pre-tax withdrawal. The IRS lists exceptions, including disability, death, terminal illness, birth or adoption, certain medical costs and some military service. Each plan also sets its own rules on when money can come out while you are still working there. The point of the additional tax is to keep retirement money for retirement. It is the price of the tax break.
- Pre-tax
- Lowers your taxable income this year, Withdrawals are taxed as income
- Designated Roth
- Made with after-tax dollars, Qualified withdrawals of earnings are not taxed
- Both
- Your own deferrals are always 100% vested
The plan holds investments, with their risks
A 401(k) usually offers a menu of funds. The tax treatment does not change how those funds behave: they can fall in value, and their fees compound against you over the decades the money stays invested.
For the accounts people open themselves alongside or instead of a workplace plan, read Roth IRA vs traditional IRA. How an employer match fits with paying down debt is covered in paying off debt or investing, and how to start investing covers the groundwork. Fund costs inside a plan are covered in fees and costs.
You understand how a 401(k) works
You can now explain pre-tax and Roth deferrals, how a match adds up, what vesting means and what an early withdrawal usually costs.
Check your understanding
- How are pre-tax 401(k) deferrals taxed?
- They are left out of taxable income now, and withdrawals including earnings are taxed later. That is the tax-deferred design.
- A plan matches 50% of what you contribute, on contributions up to 6% of pay. You earn $60,000 and contribute 10%. What is the match?
- $1,800, because only the first 6% of pay is matched. 6% of $60,000 is $3,600, and half of that is $1,800. Contributions above 6% are not matched under this formula.
- Which money in a 401(k) is always 100% vested?
- Your own elective deferrals from salary. The IRS says employee elective deferrals are always 100% vested.
- What generally happens to a distribution taken before age 59½?
- An additional 10% tax applies to the taxable part, unless an exception applies. Exceptions include disability, death and several others listed by the IRS.
Common questions
- What is the difference between a Roth 401(k) and a traditional 401(k)?
- Traditional, pre-tax deferrals are left out of taxable income now and taxed when withdrawn. Designated Roth deferrals are made with after-tax dollars, and qualified withdrawals of contributions and earnings are not taxed.
- What does vesting mean in a 401(k)?
- Vesting means ownership. Your own salary deferrals are always 100% vested, while employer contributions may become yours gradually or all at once after a number of years, depending on the plan's schedule.
- Is there a penalty for taking money out of a 401(k) early?
- Distributions before age 59½ generally face an additional 10% tax on the taxable part, on top of regular income tax, unless an exception such as disability applies.
Terms defined in this lesson
- 401(k) plan
- Employer match
- Vesting
- Catch-up contribution
- Early withdrawal penalty
- Roth account
- Tax-deferred
Continue
- Previous: What is a SIPP? Personal pensions explained
- Next: Roth IRA vs traditional IRA
- Tax-advantaged accounts explained
- Pay off debt or invest? Compare the rates
- How to start investing, step by step
- Fees, commissions, and the real cost of trading
- Investment Accounts and Tax track
- All Agenticks lessons
- Trading glossary
Sources
- Internal Revenue Service. (2026). 401(k) plans. IRS.gov.
- Internal Revenue Service. (2026). Roth comparison chart. IRS.gov.
- Internal Revenue Service. (2026). Retirement topics: 401(k) and profit-sharing plan contribution limits. IRS.gov.
- Internal Revenue Service. (2026). Retirement topics: Vesting. IRS.gov.
- Internal Revenue Service. (2026). Topic no. 558, Additional tax on early distributions from retirement plans other than IRAs. IRS.gov.
- Internal Revenue Service. (2025). Retirement topics: Exceptions to tax on early distributions. IRS.gov.
Written and reviewed by the Agenticks Learn editorial team. How we write and check lessons.
Agenticks Learn is general education. It is not financial, investment, tax or legal advice, it does not take your situation into account, and nothing on it is a recommendation to buy, sell or hold any security or to open any account. Examples use illustrative numbers. Investing involves risk, including losing money you put in, and past performance does not predict future results. Tax rules and limits change; the official sources linked in each lesson are the final word.