In the United States, a 401(k) retirement savings plan allows a worker to save for retirement and have the savings invested while deferring current income taxes on the saved money and earnings until withdrawal. This type of plan is also known as a "traditional" 401(k).
401(k) plans are mainly employer-sponsored: employees elect to have a portion of their wages paid directly into their individual 401(k) account, which is managed by the employer. Such payments are known as "contributions". As a benefit to the employee, the employer can optionally choose to "match" part or all of the employee's contribution by depositing additional amounts in the employee's 401(k) account or simply offering a profit-sharing contribution to the plan.
Since 2006, another type of 401(k) plan is available. Participants in 401(k) plans that have the proper amendments can allocate some or all of their contributions to a separately-designated Roth account, commonly known as a Roth 401(k). These "Roth" contributions will be collected and treated as after-tax dollars; that is, income tax is paid or withheld in the year contributed. Qualified distributions from a designated Roth 401(k) account, including all income, are tax-free. (A traditional 401(k) account is funded with pre-tax dollars and, in general, tax must be paid when the original contribution and earnings are withdrawn.)
In participant-directed plans (the most common option), the employee can select from a number of investment options, usually an assortment of mutual funds that emphasize stocks, bonds, money market investments, or some mix of the above. Many companies' 401(k) plans also offer the option to purchase the company's stock. The employee can generally re-allocate money among these investment choices at any time. In the less common trustee-directed 401(k) plans, the employer appoints trustees who decide how the plan's assets will be invested.
Most 401(k) contributions are on a pre-tax basis. With either pre-tax or after-tax contributions, earnings from investments in a 401(k) account (in the form of interest, dividends, or capital gains) are tax deferred. The resulting compounding interest with delayed taxation is a major benefit of the 401(k) plan when held over long periods of time. Starting in the 2006 tax year, employees can either contribute on a pre-tax basis or opt to utilize the Roth 401(k) provisions to contribute on an after-tax basis and have similar tax effects of a Roth IRA. However, in order to do so, the plan sponsor must amend the plan to make those options available.
For pre-tax contributions, the employee does not pay federal income tax on the amount of current income that he or she defers to a 401(k) account. For example, a worker who earns $50,000 in a particular year and defers $3,000 into a 401(k) account that year only recognizes $47,000 in income on that year's tax return. Currently this would represent a near term $750 savings in taxes for a single worker, assuming the worker remained in the 25% marginal tax bracket and there were no other adjustments (e.g. deductions). The employee ultimately pays taxes on the money as he or she withdraws the funds, generally during retirement. The character of any gains (including tax favored capital gains) are transformed into "ordinary income" at the time the money is withdrawn.
For after-tax contributions to a designated Roth account (Roth 401(k)), qualified distributions can be made tax free. To qualify, distributions must be made more than 5 years after the first designated Roth contributions and not before the year in which the account owner turns age 59 and a half, unless an exception applies as detailed in IRS code section 72(t). In the case of designated Roth contributions, the contributions being made on an after-tax basis means that the taxable income in the year of contribution is not decreased as it is with pre-tax contributions. Roth contributions are irrevocable and cannot be converted to pre-tax contributions at a later date. Administratively Roth contributions must be made to a separate account, and records must be kept that distinguish the amount of contribution that are to receive Roth treatment.
Withdrawal of funds
Virtually all employers impose severe restrictions on withdrawals while a person remains in service with the company and is under the age of 59½. Any withdrawal that is permitted before the age of 59½ is subject to an excise tax equal to ten percent of the amount distributed, including withdrawals to pay expenses due to a hardship, except to the extent the distribution does not exceed the amount allowable as a deduction under Internal Revenue Code section 213 to the employee for amounts paid during the taxable year for medical care (determined without regard to whether the employee itemizes deductions for such taxable year).
In any event any amounts are subject to normal taxation as ordinary income. Some employers may disallow one, several, or all of the previous hardship causes. Someone wishing to withdraw from such a 401(k) plan would have to resign from their employer. To maintain the tax advantage for income deferred into a 401(k), the law stipulates the restriction that unless an exception applies, money must be kept in the plan or an equivalent tax deferred plan until the employee reaches 59½ years of age. Money that is withdrawn prior to the age of 59½ typically incurs a 10% penalty tax unless a further exception applies. This penalty is on top of the "ordinary income" tax that has to be paid on such a withdrawal. The exceptions to the 10% penalty include: the employee's death, the employee's total and permanent disability, separation from service in or after the year the employee reached age 55, substantially equal periodic payments under section 72(t), a qualified domestic relations order, and for deductible medical expenses (exceeding the 7.5% floor). This does not apply to the similar 457 plan.
Many plans also allow employees to take loans from their 401(k) to be repaid with after-tax funds at pre-defined interest rates. The interest proceeds then become part of the 401(k) balance. The loan itself is not taxable income nor subject to the 10% penalty as long as it is paid back in accordance with section 72(p) of the Internal Revenue Code. This section requires, among other things, that the loan be for a term no longer than 5 years (except for the purchase of a primary residence), that a "reasonable" rate of interest be charged, and that substantially equal payments (with payments made at least every calendar quarter) be made over the life of the loan. Employers, of course, have the option to make their plan's loan provisions more restrictive. When an employee does not make payments in accordance with the plan or IRS regulations, the outstanding loan balance will be declared in "default". A defaulted loan, and possibly accrued interest on the loan balance, becomes a taxable distribution to the employee in the year of default with all the same tax penalties and implications of a withdrawal.
These loans have been described as tax-disadvantaged, on the theory that the 401(k) contains before-tax dollars, but the loan is repaid with after-tax dollars. While this is precisely correct, the analysis is totally bogus. Some will argue that the loan is repaid with after-tax dollars, but the loan itself is not a taxable event, so the "income" from the loan is tax-free, but the "fact" that you get taxed a second time when you do retire and get your final distribution is a red herring. From your perspective as the borrower, this is identical to a standard loan where you are not taxed when you get the loan, but you have to pay it back with taxed dollars. From the perspective of the 401(k) fund, the loan made is just like any other investment (with slight variations in risks, and rates), that is, money that you have not yet paid taxes on is loaned out to be repaid with interest and you will pay taxes on the total repayment only when you withdraw it. It is better than pulling the money out all together before retirement age, as you are only paying 4% on the loan (into your fund) instead of 10% early hardship withdrawal (to the government), and as you are returning your money to the 401(k), it keeps working for you. This treatment is identical to that of any other loan, as long as the balance is repaid on schedule. (A residential mortgage loan or home equity line of credit will have definite tax advantages over the 401(k) loan because the interest on home mortgages is deductible, and unrelated to the tax-deferred features of the 401(k).
Required minimum distributions
An account owner must begin making distributions from their accounts by April 1 of the calendar year after turning age 70½ or April 1 of the calendar year after retiring, whichever is later. The amount of distributions is based on life expectancy according to the relevant factors from the appropriate IRS tables. The only exception to minimum distribution are for people still working once they reach that age, and the exception only applies to the current plan they are participating in. Required minimum distributions apply to both pre-tax and after-tax Roth contributions. Only a Roth IRA is not subject to minimum distribution rules. Other than the exception for continuing to work after age 70½ differs from the rules for IRA minimum distributions. The same penalty applies to the failure to make the minimum distribution. The penalty is 50% of the amount that should have been distributed, one of the most severe penalties the IRS applies. In response to the economic crisis, Congress suspended the RMD requirement for 2009.
Former employees ("terminated participants") can have their 401(k) plans closed if the balance is low; such a provision in the plan is referred to as a force-out provision. Almost 90% of plans have a force-out provision. As of March 2005, the limit for force-out provisions is a balance of $1,000 – a participant whose balance is over $1,000 cannot have their plan terminated. Prior to March 2005, the limit was $5,000.
Closing the plan requires that the participant either roll-over the funds to an IRA or take a distribution ("cash out"), and 85% of those with balances of under $1,000 cash out, either voluntarily or due to a force-out provision.
In 1978, Congress amended the Internal Revenue Code by adding section 401(k), whereby employees are not taxed on income they choose to receive as deferred compensation rather than direct compensation. The law went into effect on January 1, 1980, and by 1983 almost half of large firms were either offering a 401(k) plan or considering doing so. By 1984 there were 17,303 companies offering 401(k) plans. Also in 1984, Congress passed legislation requiring nondiscrimination testing, to make sure that the plans did not discriminate in favor of highly paid employees more than a certain allowable amount. In 1998, Congress passed legislation that allowed employers to have all employees contribute a certain amount into a 401(k) plan unless the employee expressly elects not to contribute.
In the mid-1980s, there were fewer than 8 million participants with less than $100 billion of assets in 401(k) plans. By 2006, there were seventy-million participants with more than $3 trillion of assets in 401(k) plans. There were 438,000 companies sponsoring 401(k) plans in 2003.
Originally intended for executives, the section 401(k) plan proved popular with workers at all levels because it had higher yearly contribution limits than the Individual Retirement Account (IRA); it usually came with a company match, and in some ways provided greater flexibility than the IRA, often providing loans and, if applicable, offered the employer's stock as an investment choice. Several major corporations amended existing defined contribution plans immediately following the publication of IRS proposed regulations in 1981.
A primary reason for the explosion of 401(k) plans is that such plans are cheaper for employers to maintain than a defined benefit pension for every retired worker. With a 401(k) plan, instead of required pension contributions, the employer only has to pay plan administration and support costs if they elect not to match employee contributions or make profit sharing contributions. In addition, some or all of the plan administration costs can be passed on to plan participants. In years with strong profits employers can make matching or profit-sharing contributions, and reduce or eliminate them in poor years. Thus 401(k) plans create a predictable cost for employers, while the cost of defined benefit plans can vary unpredictably from year to year.
One danger of the 401(k) plan is if the contributions are not diversified, particularly if the company had strongly encouraged its workers to invest their plans in their employer itself. This practice violates primary investment guidelines about diversification. In the case of Enron, where the accounting scandal and bankruptcy caused the share price to collapse, there was no PBGC insurance and employees lost the money they invested in Enron stock. Congress inserted trust law fiduciary liability upon employers who did not prudently diversify plan assets to avoid the chance of large losses inside Section 404 of ERISA, but it is unclear whether such fiduciary liability applies to trustees of plans in which participants direct the investment of their own accounts.
 Technical details
Maximum limit on the total yearly employee pre-tax salary deferral. The limit, known as the "401(k) limit", is $15,500 for the year 2008 and $16,500 for 2009 and 2010. For future years, the limit may be indexed for inflation, increasing in increments of $500. Employees who are 50 years old or over at any time during the year are now allowed additional pre-tax "catch up" contributions of up to $5,000 for 2008 and $5,500 for 2009 and 2010. The limit for future "catch up" contributions may also be adjusted for inflation in increments of $500. In eligible plans, employees can elect to have their contribution allocated as either a pre-tax contribution or as an after tax Roth 401(k) contribution, or a combination of the two. The total of all 401(k) contributions must not exceed the maximum contribution amount.
If the employee contributes more than the maximum pre-tax limit to 401(k) accounts in a given year, the excess must be withdrawn by April 15 of the following year. This violation most commonly occurs when a person switches employers mid-year and the latest employer does not know to enforce the contribution limits on behalf of their employee. If this violation is noticed too late, the employee may have to pay taxes and penalties on the excess. The excess contribution, as well as the earnings on the excess, is considered "non-qualified" and cannot remain in a qualified retirement plan such as a 401(k).
Plans which are set up under section 401(k) can also have employer contributions that (when added to the employee contributions) cannot exceed other regulatory limits. The total amount that can be contributed between employee and employer contributions is the section 415 limit, which is the lesser of 100% of the employee's compensation or $44,000 for 2006, $45,000 for 2007, $46,000 for 2008, and $49,000 for 2009. Employer matching contributions can be made on behalf of designated Roth contributions, but the employer match must be made on a pre-tax basis.
Governmental employers in the US (that is, federal, state, county, and city governments) are currently barred from offering 401(k) plans unless they were established before May 1986. Governmental organizations instead can set up a section 457(g).
Highly Compensated Employees (HCE)
To help ensure that companies extend their 401(k) plans to low-paid employees, an IRS rule limits the maximum deferral by the company's "highly compensated" employees, based on the average deferral by the company's non-highly compensated employees. If the less compensated employees are allowed to save more for retirement, then the executives are allowed to save more for retirement. This provision is enforced via "non-discrimination testing". Non-discrimination testing takes the deferral rates of "highly compensated employees" (HCEs) and compares them to non-highly compensated employees (NHCEs). An HCE in 2008 is defined as an employee with compensation of greater than $100,000 in 2007 or an employee that owned more than 5% of the business at any time during the year or the preceding year. In addition to the $100,000 limit for determining HCEs, employers can elect to limit the top-paid group of employees to the top 20% of employees ranked by compensation. That is for plans whose first day of the plan year is in calendar year 2007, we look to each employee's prior year gross compensation (also known as 'Medicare wages') and those who earned more than $100,000 are HCEs. Most testing done now in 2009 will be for the 2008 plan year and compare employees' 2007 plan year gross compensation to the $100,000 threshold for 2007 to determine who is HCE and who is a NHCE.
The average deferral percentage (ADP) of all HCEs, as a group, can be no more than 2 percentage points greater (or 150% of, whichever is less) than the NHCEs, as a group. This is known as the ADP test. When a plan fails the ADP test, it essentially has two options to come into compliance. It can have a return of excess done to the HCEs to bring their ADP to a lower, passing, level. Or it can process a "qualified non-elective contribution" (QNEC) to some or all of the NHCEs to raise their ADP to a passing level. The return of excess requires the plan to send a taxable distribution to the HCEs (or reclassify regular contributions as catch-up contributions subject to the annual catch-up limit for those HCEs over 50) by March 15 of the year following the failed test. A QNEC must be an immediately vested contribution.
The annual contribution percentage (ACP) test is similarly performed but also includes employer matching and employee after-tax contributions. ACPs do not use the simple 2% threshold, and include other provisions which can allow the plan to "shift" excess passing rates from the ADP over to the ACP. A failed ACP test is likewise addressed through return of excess, or a QNEC or qualified match (QMAC).
There are a number of "safe harbor" provisions that can allow a company to be exempted from the ADP test. This includes making a "safe harbor" employer contribution to employees' accounts. Safe harbor contributions can take the form of a match (generally totalling 4% of pay) or a non-elective profit sharing (totalling 3% of pay). Safe harbor 401(k) contributions must be 100% vested at all times with immediate eligibility for employees. There are other administrative requirements within the safe harbor, such as requiring the employer to notify all eligible employees of the opportunity to participate in the plan, and restricting the employer from suspending participants for any reason other than due to a hardship withdrawal.
Employers are allowed to automatically enroll their employees in 401(k) plans, requiring employees to actively opt-out if they did not want to participate. (Traditionally 401(k)s required employees to opt-in.) Companies offering such automatic 401(k)s must choose a default investment fund and savings rate. Employees who are enrolled automatically will become investors in the default fund at the default rate, although they may select different funds and rates if they choose, or even opt out completely.
Automatic 401(k)s are designed to encourage high participation rates among employees. Therefore, employers can attempt to enroll non-participants as often as once per year, requiring those non-participants to opt out each time if they do not want to participate. Employers can also choose to escalate participants' default contribution rate, encouraging them to save more. 
The Pension Protection Act of 2006 made automatic enrollment a safer option for employers. Prior to the Pension Protection Act, employers were held responsible for investment losses as a result of such automatic enrollments. The Pension Protection Act established a safe harbor for employers in the form of a “Qualified Default Investment Alternative,” an investment plan that, if chosen by the employer as the default plan for automatically enrolled participants, relieves the employer of financial liability. Under Department of Labor regulations, three main types of investments qualify as QDIAs: lifecycle funds, balanced funds, and managed accounts. QDIAs provide sponsors with fiduciary relief similar to the relief that applies when participants affirmatively elect their investments. 
 401(k) plans for certain small businesses or sole proprietorships
Many self-employed persons felt (and financial advisors agreed) that 401(k) plans did not meet their needs due to the high costs, difficult administration, and low contribution limits. But the Economic Growth and Tax Relief Reconciliation Act of 2001 (EGTRRA) made 401(k) plans more beneficial to the self-employed. The two key changes enacted related to the allowable "Employer" deductible contribution, and the "Individual" IRC-415 contribution limit.
Prior to EGTRRA, the maximum tax-deductible contribution to a 401(k) plan was 15% of eligible pay (reduced by the amount of salary deferrals). Without EGTRRA, an incorporated business person taking $100,000 in salary would have been limited in Y2004 to a maximum contribution of $15,000. EGTRRA raised the deductible limit to 25% of eligible pay without reduction for salary deferrals. Therefore, that same businessperson in Y2008 can make an "elective deferral" of $15,500 plus a profit sharing contribution of $25,000 (i.e. 25%), and — if this person is over age 50 — make a catch-up contribution of $5,000 for a total of $45,500. For those eligible to make "catch up" contribution, and with salary of $122,000 or higher, the maximum possible total contribution in 2008 would be $51,000. To take advantage of these higher contributions, many vendors now offer Solo-401(k) plans or Individual(k) plans, which can be administered as a Self-Directed 401(k), allowing for investment into real estate, mortgage notes, tax liens, private companies, and virtually any other investment.
Note: an unincorporated business person is subject to slightly different calculation. The government mandates calculation of profit sharing contribution as 25% of net self employment (Schedule C) income. Thus on $100,000 of self employment income, the contribution would be 20% of the gross self employment income, 25% of the net after the contribution of $20,000.