The 401(k) plan is a great tool for saving for retirement. But, like all tools, it can be used well -- or poorly.

Unfortunately, using it the wrong way could force you to delay your retirement by years -- and likely require you to set aside more money to reach your financial goals. Here are three key 401(k) mistakes you should avoid if at all possible.

Three yellow triangular signs with black exclamation points

Image source: Getty Images.

1. Failing to maximize your company match

One of the prime benefits of investing through a 401(k) plan is the company match -- funds that your employer will contribute toward your retirement, usually up to a set percentage of your salary, as long as you contribute too. That's "free" money -- the only cost is that you have to participate in the 401(k), which means foregoing the ability to spend some of the money you earn for quite awhile. But extra cash will grow tax-deferred until you withdraw it in retirement, and once it has fully vested, it is 100% yours. Think about it: By investing for your future, you're actually giving yourself a raise. That's even more reason to get every dime of it that you can.

Unfortunately, too many Americans fail to maximize their match. According to the most recent data available -- which dates from 2015 -- Americans who have 401(k) accounts are foregoing an estimated $24 billion in matching funds every year because they aren't contributing enough to the plan to take advantage. At a more granular level, about 25% of 401(k) plan participants were failing to max out their match, and leaving an average $1,336 per year in matching funds on the table.

That $1,336 per year can add up to a big chunk of change -- more than $135,000 in 30 years assuming 7% annual market returns (which are historically typical).

2. Taking an early withdrawal

A company match is nice because it's free money. But perhaps the biggest benefit of the 401(k) is its tax-advantaged status: Contributors to a traditional 401(k) pay no income tax on the money they route into it in the year that they earn it, and that money can grow tax-deferred until they withdraw it. That's a big incentive from the government to help get more people to save toward their retirement.

But paired with that big carrot is are a couple of big sticks. First, when someone takes money out of their 401(k), they immediately owe income tax on every dime they withdraw. What's more, if the investor is younger than 59 1/2, taking money out of that retirement account is considered (understandably) an early withdrawal.

Unless those withdrawn funds are used for one of a handful of specified purposes, they'll owe the IRS a 10% early withdrawal penalty on top of the taxes.

Now, while there are unfortunately some circumstances in which a 401(k) withdrawal is the least bad, last resort option, plenty of data out there shows that some people are taking early withdrawals for less necessary purposes. A study released last year by E*Trade found that almost 60% of investors under the age of 34 had taken money out of their 401(k), and over one-third of those younger workers who had done so said they used the money to pay for a vacation, "to spend on myself or my family", or for a large purchase.

It's hard to overstate just how damaging this can be to your retirement. Withdrawing $10,000 from your 401(k) early for a purchase would only net you $6,600 in cash, assuming you're in the 24% marginal tax bracket and have to pay the 10% early withdrawal penalty. Even worse, had you left that $10,000 alone to grow for say, another 30 years until you retired, it would have grown to more than $76,000, assuming a 7% annualized return.

3. Leaving your 401(k) orphaned when you switch employers

When you change jobs and move from one company to another, your 401(k) doesn't automatically transfer with you. The money is still yours, to be sure, but the 401(k) will sit in limbo until you do something with it. These 401(k)s are colloquially known as "orphan" accounts.

Now, here's the thing: If your old 401(k) plan is good, then there's no reason to immediately move it over. But there's always the danger of forgetting the account -- after all, there are 25 million orphan 401(k)s out there, according to the Bipartisan Policy Center. And sometimes your former employer will do some suboptimal things with forgotten accounts.

My wife's former employer, for example, transferred her orphan 401(k) out of their plan when she left her job. And the new custodian charged her quite a few fees that we only discovered when we remembered the 401(k) six years later. (We even had to pay to transfer the account to her IRA. We were less than thrilled.)

The downsides here are tougher to quantify, but generally speaking, simplicity is a good end in and of itself. Having your retirement accounts consolidated and in one place (or just a few places) makes it less likely that you'll accidentally mess up your asset allocation or start getting hit with a lot of extra fees.

Set yourself up for success

If you avoid these 401(k) mistakes, you stand a good chance of getting yourself on the path toward a reasonably secure retirement. Many companies require you to contribute 6% or more of your salary to maximize your match, which -- when combined with the average 4.7% match offered to American workers -- gets you saving nearly 11% of your salary each year. That kind of consistent investing will set you up to have a sizable nest egg. And once you have things on track, you can take some time to figure out exactly how much money you'll need to save for retirement.