The 401(k) is the most popular type of retirement plan offered by private-sector employers to help their employees save and invest for retirement. Unlike traditional pension plans, 401(k)s are known as defined contribution plans, and the retirement benefits they produce depend on the performance of the account's underlying investments.

401(k) retirement plans may seem complicated, but they don't need to be. Here's an in-depth discussion of what a 401(k) is, why you should contribute to one if you can, how investing in a 401(k) works, the tax benefits of 401(k) investing, and more.

Hand putting money into a piggy bank with 401k written in the background on a chalkboard.

Image Source: Getty Images.

What is a 401(k)?

A 401(k) is a form of defined-contribution retirement plan, as opposed to a defined-benefit plan like a pension.

Instead of contributing money throughout your career to receive a fixed amount of income when you retire, a defined-contribution plan involves contributing a set percentage of your compensation. Instead of fixed retirement income, your nest egg depends on how well the investments held in your account perform.

401(k) plans are offered by employers to allow their employees to set aside money for retirement on a tax-advantaged basis. 

Employers may make contributions to 401(k) plans on their employees' behalf, and money in a 401(k) plan can be invested in a selection of mutual funds or other investment options (like company stock) offered by the specific plan.

Reasons to use a 401(k) to save for retirement

The main reason to use a 401(k) to save for retirement as opposed to simply investing in a standard brokerage account is for the tax benefits. Most 401(k) contributions are made on a tax-deferred basis, meaning that the money you choose to contribute, up to the annual contribution limit, is excluded from your taxable income. After it is contributed, your investments can grow and compound year after year with no tax implications until you withdraw money, at which time the amount of your withdrawal will be considered taxable income.

401(k)s are increasingly offering Roth contribution options. This means that the contributions are not tax-deductible, but your investments still grow and compound tax-deferred and qualified withdrawals will be 100% tax-free. We'll get into the differences between standard and Roth 401(k) contributions and which you should use later on.

Another good reason to use a 401(k) to save for retirement is that it's easy. Once you've set your 401(k) investment allocations, the ongoing maintenance that is required is minimal. Contributions are automatically deducted from your paycheck and you can even choose investment options that will gradually shift your allocations over time as you get older.

Can you open a 401(k) on your own?

The short answer is "it depends." To open a 401(k) account, you need to join a plan sponsored by an employer you work for.

However, that employer can be yourself. Self-employed individuals and independent contractors can open individual 401(k) accounts (also known as "solo" or "one-member" 401(k)s). The same contribution limits apply, and the employer matching portion can't exceed 25% of self-employment earnings.

401(k) contribution limits

The 401(k) contribution limits are set by the IRS each year and are increased to keep pace with inflation as time goes on.

For 2018, the elective deferral limit is $18,500, meaning that you can choose to have as much as this amount withheld from your paychecks and deposited into your account. If you're 50 or older, you can choose to defer as much as $6,000 more as a "catch-up" contribution for a total of $24,500.

Keep in mind that this includes only the money that you choose to contribute. It does not include employer matching contributions, forfeiture allocations (when someone else loses unvested contributions), mandatory contributions, or contributions from any other sources.

The overall limit from all sources for 2018 is $55,000, including your own elective deferrals. If you're 50 or older, the catch-up contribution limit is added to this, for a grand total of $61,000.

What is 401(k) vesting?

The term "vesting" is used to describe your ownership in the assets contained in your 401(k) plan. Simply put, if you are vested, you have the legal right to keep the contributions made to your account.

To be clear, you are always 100% vested in contributions you make to your 401(k). However, the same is not always true when it comes to your employer's matching contributions.

Employers can choose to immediately vest their contributions, or they can follow one of two vesting schedule types:

  • Graded vesting means that your contributions vest a little more each year. At a minimum, employees must vest in 20% of their contributions at the end of the second year or service and another 20% each year thereafter. So, by the end of the sixth year of service, employees on a graded vesting schedule will be 100% vested in their entire 401(k) account.
  • Cliff vesting means that there is a certain period of time where employees are not vested at all, and then become 100% vested at once. Employers who select cliff vesting can push the vesting date as far out as three years of service.

How does employer matching work?

The majority of 401(k) matching programs have the same general structure. The employer will match a certain percentage of employee contributions up to a certain percentage of their compensation. As an example, an employer may match its employees' contributions dollar for dollar up to a maximum of 5% of their salary.

In this case, an employee who earns $50,000 per year would have all of their contributions up to $2,500 matched dollar for dollar by their employer. To be clear, they could certainly choose to contribute more than their employer is willing to match, but the amount of employer contributions will be limited according to this rule.

How much should you contribute to your 401(k)?

Financial planners have differing opinions on this. Most agree that at a minimum, participants should contribute as much as their employer is willing to match. So, in our previous example, this hypothetical employee should contribute 5% of their salary at an absolute minimum. Not contributing enough to take full advantage of your employer's matching program is like refusing to take a portion of your salary.

As a general rule, I suggest a retirement savings rate of 10%, not including matching contributions. I'll spare you the mathematics, but this percentage of the average worker's salary compounded at historical average investment returns should grow into enough of a nest egg that should be able to produce enough income for a comfortable retirement.

However, you don't necessarily have to put it all in your 401(k). For instance, it's fine to set aside 5% of your salary in your 401(k) -- as long as it's enough to get your employer match -- and another 5% in an IRA, which has some key advantages as well.

IRAs versus 401(k)s

On that note, let's briefly discuss the differences between investing for retirement in individual retirement accounts, or IRAs, and employer-sponsored plans like 401(k)s.

As I mentioned, there are some key advantages to IRA investing. For starters, while your 401(k) offers a selection of a few dozen investment choices at most, you can buy virtually any stock, bond, or mutual fund you want in your IRA. You can also use your IRA before reaching retirement age without penalty to pay for college expenses or a first-time home purchase for you or a relative. Both of these options are unavailable to 401(k) investors.

On the other hand, 401(k)s allow for early withdrawals after the account owner reaches age 55 if they are no longer working for the sponsoring employer, while IRAs don't. 401(k) plans also have much more generous contribution limits. As I mentioned, for 2018, you can choose to defer up to $18,500 of your compensation into a 401(k) while IRA contributions are capped at $5,500. If you're 50 or older, these limits jump to $24,500 and $6,500, respectively.

Both types of accounts have similar tax benefits. Qualified individuals can deduct their traditional IRA contributions, same as with standard 401(k) contributions. And qualified individuals can make Roth IRA contributions, which enjoy the same tax benefits as Roth 401(k)s. It's important to mention that the tax benefits of IRA investing are income-restricted, unlike 401(k)s, which are available to all eligible employees.

Obviously, there's a lot more to IRA investing than I can discuss in a few paragraphs. However, this is a quick overview of the key differences savers should consider.

Standard versus Roth 401(k) contributions

As I mentioned earlier, the main difference between standard tax-deferred 401(k) contributions and the Roth variety of contributions is the tax treatment. In simple English, standard 401(k) contributions give you your tax benefit now while Roth 401(k) contributions give you a tax benefit later when you eventually use the funds in your account.

So, which should you use? In a nutshell, if you're in a lower marginal tax bracket right now -- particularly the 10% or 12% brackets -- Roth contributions could be the smartest choice for you. In this case, it's unlikely that your tax rate in retirement will be much lower than it is now, so it's a smart idea to save your tax break for later.

On the other hand, if you're in a relatively high tax bracket right now -- I generally say 22% or higher -- it could be a smart idea to take your tax break now with standard 401(k) contributions.

Keep in mind that you can choose to switch your contribution type whenever you want in order to best meet your current financial needs. As a personal example, I used Roth contributions in my own retirement accounts when I was just starting out in my career and was in a low tax bracket. As my career progressed and my income started to increase, I gradually started using tax-deductible contributions instead.

It's also important to point out that any employer matching contributions you receive will be of the standard tax-deferred variety, regardless of whether your own contributions are standard or Roth. If you make Roth contributions and either you or your employer make standard tax-deferred contributions, your account will be effectively separated into two baskets of investments.

How to allocate your 401(k) assets

I've written an in-depth asset allocation primer that you can read if you're interested, but here's an overview of the basic ideas you need to know.

First, your 401(k) investment funds can generally be grouped into three main varieties:

  • Equities (stocks) -- Stocks are the most volatile of the three types, but also tend to produce the best returns over long periods of time. Historically, the stock market has averaged returns of 9%-10% per year.
  • Fixed-income (bonds) -- Bonds don't have the high long-term return potential of stocks, but also tend to be less volatile.
  • Cash (money market) -- Cash and money market investments produce the lowest returns, but they are also the safest. For example, a money market fund generates a fixed interest rate with no risk of loss of principal. 

While you're young, the majority of your 401(k) assets (but not all) should be in stock-based investment options in order to maximize your long-term return potential. Then, as you get older, your investments should gradually shift into fixed-income options. I generally discourage anyone to even consider cash-based investment options before reaching retirement, as they tend to not even keep up with inflation.

Here's a good rule of thumb: If you subtract your age from the number 110, it can give you a ballpark idea of how much of your 401(k) assets should be in stocks, as a percentage. For example, I'm 36, so this implies that about 74% of my 401(k) investments should be in stocks with the other 26% in bonds.

Most 401(k) plans also offer an option known as target-date retirement funds, which do the gradual shift from stocks to bonds for you. Just to name one popular example, the Vanguard Target Retirement 2050 Fund (NASDAQMUTFUND:VFIFX) is intended for people who plan to retire between 2048 and 2052 and currently has a 90% stock/10% bond allocation, which it achieves by dividing its capital among four other funds. Over time, the allocation will gradually shift until it achieves a roughly 30% stock/70% bond allocation a few years after the 2050 target date. These can be smart options for 401(k) participants who want to keep their accounts as low maintenance as possible. Just be aware that these options can come with higher fees than you'd pay by constructing your own allocations.

The costs of investing in a 401(k)

Contrary to popular belief, investing in a 401(k) plan isn't free. Plans may charge administrative fees to participants and all 401(k) plans' investment options charge annual fees known as expense ratios.

An expense ratio is a mutual fund's annual costs charged to investors to cover the fund's operating expenses and is expressed as a percentage of total assets. For example, a 1% expense ratio implies that for every $100 you have invested, $1 will go toward fees annually. 401(k) expense ratios can vary significantly, but the general rule is that lower expense ratios are better.

When can you withdraw your money?

The short answer is that in order to take a distribution from your 401(k) plan without paying a penalty to the IRS (we'll get into those in the next section), you need to be at least 59 and 1/2 years old.

However, there are a few notable exceptions:

  • If you are "separated from service" -- meaning you no longer work for the sponsoring employer -- you only need to be 55 years old to take a penalty-free distribution.
  • If you commit to taking a series of substantially equal annual distributions that last at least five years or until you reach 59 and 1/2 -- whichever comes later -- you can start tapping into your 401(k) at any age.
  • If you become totally and permanently disabled, you can use your 401(k) penalty-free.
  • You can use 401(k) funds toward unreimbursed medical expenses over 7.5% of your AGI.

Early withdrawal penalties

If you take a hardship withdrawal or otherwise withdraw money from your 401(k) without a valid reason as discussed in the previous section, your withdrawal will be subject to a 10% early withdrawal penalty from the IRS. And this is on top of any taxes you may have to pay.

As an example, let's say that you have $20,000 in a 401(k) and that you decide to cash your account out when you're 35. Assuming you're in the 22% federal income tax bracket, you'll only be able to take out $13,600 after income taxes and penalties, or even less if you live in a state with an income tax. So, think twice before you take money out of your 401(k) before reaching 59 and 1/2 years of age.

403(b) and other similar retirement plans

There are a couple of other employer-sponsored defined-contribution retirement plans -- 403(b), 457, and Thrift Savings are popular examples. Here's a quick rundown of what the difference is:

A 403(b) can be thought of as the 401(k) of the public sector. These accounts are often offered to employees of nonprofit corporations. For example, my wife works for a nonprofit hospital system that offers a 403(b) plan to employees. Just like 401(k)s, employers can choose to make contributions, and the same general contribution limits apply. 403(b) plans have an additional catch-up provision that allows extra contributions of $3,000 per year for employees with 15 or more years of service.

457 plans are supplementary retirement plans, meaning that they are offered in addition to another retirement plan. As another personal example, I teach part-time at a community college. The school participates in the state retirement system (a pension plan), but offers the opportunity to save tax-deferred in a 457 plan as well. The $18,000 elective deferral and $6,000 catch-up contribution limits apply, but since these are supplementary retirement plans, employers don't contribute to 457s on employees' behalf.

A thrift savings plan, or TSP, works a lot like a 401(k) and is offered to most federal workers. The federal government offers TSP participants matching contributions and the TSP has the same annual contribution limits as 401(k) plans.

What if you leave your job?

If you leave your job where you participate in that employer's 401(k) plan, you have four main options that may be available to you:

  • If your account value exceeds a certain threshold, say $5,000, you may be able to leave your money in your former employer's plan. If you're generally happy with the plan, this is a perfectly valid option.
  • If your new employer allows it (most do), you can roll over, or combine, your 401(k) into your new employer's plan. One main reason to do this is that it lets you keep your retirement savings in one place.
  • You can choose to roll the account over into an IRA, which gives you more freedom to choose investments and may have some other benefits.
  • You can cash out the account and take a lump sum distribution. As I discussed in the previous section, this is generally a bad idea.