Generally speaking, I'm a big fan of rollover IRAs. The right rollover IRA offers nearly unlimited investment options and low fees, which beats trying to choose among the choices in an old employer's 401(k), hands down. Most people will change jobs 10 to 12 times during their career, which means it's all too easy to end up with an awful lot of old 401(k) balances. Managing, rebalancing, and incorporating each into an overall retirement investing strategy can be quite a pain -- until you roll 'em up. Then it's easy.

But if you hold company stock in your 401(k), it's not so easy. In fact, rolling company stock into an IRA can deprive you of some valuable tax benefits, and end up costing you a bundle.

The pitfalls of company stock
I admit I'm not a big fan of holding your employer's stock in your retirement plan. I understand why people do it -- a desire to benefit from one's own work, a sense of loyalty to one's employer, a feeling that Peter Lynch's famous advice to "buy what you know" should start with the company you know best -- but it has a big drawback:

  • It messes up your diversification. If you look at your whole financial life as one big portfolio, you already have huge exposure to the ups and downs of your employer's business even if you don't own a single share of their stock. Your employer doesn't have to be Enron to expose you to the double-edged sword of unemployment and 401(k) damage -- just ask all those General Motors (NYSE:GM) employees who bought stock in the $60-$80 range in the late 1990s, only to get laid off a couple of years ago when shares were trading in the low $20s and the company was fighting for survival. The company's subsequent recovery has still left them with a large loss -- especially when they compare their stock's performance to what they could have gotten from, say, an index fund.

On the other hand, if I can't talk you out of holding company stock in your plan, you do get one big advantage, assuming that your stock has gone up in value since you bought it:

  • It messes up your rollover. How is this an advantage? Read on to see what I mean.

The NUAnces of rolling it over
In truth, it's not so much that it messes up your rollover as that by not rolling it in to an IRA, you get a nice tax break -- thanks to the net unrealized appreciation (NUA) strategy. The NUA strategy, which you can only use with your employer's stock, works like this:

  • Roll your company stock into a taxable account. When you do that, you'll pay income taxes on only the cost basis of the stock -- not on any appreciation it has had since you bought it. If the stock is worth $150,000, but it cost you $60,000, you pay taxes only on the $60,000 -- for now. Since you haven't realized the appreciation -- cashed out the gains, in other words -- you don't owe taxes on them yet.
  • Later, when you sell those shares to make a withdrawal from the taxable account, you pay taxes on the sale -- but only on your investment gains, and at the long-term capital gains rate, which maxes out at 15%.

If, instead, you had rolled that stock into a Rollover IRA, you'd pay no taxes at the time of the rollover, but the whole thing would be taxed as income when you sold it. Here's an example to make the difference clear.

Let's say the stock is worth $180,000 when you finally sell it. Let's also say that you paid $60,000 for it originally, and you're in a 33% tax bracket. If you roll it into a Rollover IRA, you'll pay taxes on the $180,000 at a 33% rate when you sell -- $59,400. If you roll it into a taxable account, you'll pay 33% taxes on the cost basis when you roll it over -- $19,800 -- and 15% taxes on the $120,000 in capital gains when you sell -- $18,000, for a total tax of $37,800, or a $21,600 tax savings. That's a nice chunk of change.

Naturally, there are other complexities involved, but if you hold company stock in your 401(k), hopefully I've gotten your attention. Check out this article by Fool Nathan Slaughter for a more detailed explanation of the ins and outs of the NUA, and hit the Fool's Tax Center for more details on managing your tax exposure.

For more great tips to help you maximize your retirement benefits, check out The Motley Fool's Rule Your Retirement newsletter. Each month's issue is packed with practical, easy-to-understand guidance and ideas from some of the best minds in the business. Check it out free for 30 days -- there's no obligation to buy.

Fool contributor John Rosevear has no position in the stocks named in this article. The Motley Fool has a disclosure policy.