Net unrealized appreciation
If you are holding your employer's stock in your employer provided plan, a special favorable section of the tax law allows you to to pay capital gains tax rates on the stock if you are separating from service with your employer, the plan is distributed in a lump sum, and the stock was purchased by your pretax contributions and employer matches. The Net unrealized appreciation of the stock is not taxed upon distribution, and is taxed at capital gains tax rates when sold. Only the basis of the stock is recognized as a taxable distribution.
Example: Chris is set to retire from his job with Coca-Cola,Inc. His 401-k contains $1.1 million dollars of Coca-Cola stock. The 401-k administrator informs Chris that he has a basis of $300,000 in the stock and $800,000 of NUA. Instead of rolling the 401-k over into an IRA, Chris elects to take out the stock under the NUA tax rules. The $300,000 basis is deemed a distribution from the 401-k and is subject to income tax, and if Chris is less than 55, a 10% early withdrawal penalty tax. The $800,000 NUA is not taxed upon distribution. If Chris sells the stock upon distribution, it will be taxed as a long term capital gain. If Chris holds on to the stock, he can defer tax until he sells. Any further realized short term gain on the stock will be taxed as a short term capital gain; any further realized gain held for more than a year is taxed as a long term gain.
Note that the determination of basis and NUA is made by the employer or the plan.
Beneficiaries of a retirement plan can also take advantage of the NUA rules. The IRS considers this to be income in respect of a decedent (IRD). The NUA is taxed at capital gains tax rates when sold, and the beneficiaries get to take a deduction on any estate tax attributable to the NUA.
If the NUA is distributed and held until death, the beneficiaries do not receive step up valuation of the NUA (it still retains its character as NUA and becomes income in respect of a decedent taxed as a long term capital gain). Any appreciation in the stock beyond the NUA does qualify for stepped up valuation.
Qualified plan participants often hold a mixture of company stock and other investments. In this instance, the lump sum distribution would rollover the non NUA assets and not rollover the NUA.
Example:Mary takes a lump sum distribution from her company 401-k plan. Her $450,000 plan balance includes $80,000 of her employer's stock. The balance of her assets are in mutual funds. Her plan informs her that she has a basis of $30,000 in the stock. Mary rolls over (in a trustee-to-trustee transfer) the $370,000 of mutual fund investments and takes a distribution of the stock. She will pay income tax (and any applicable early withdrawal penalty taxes) on the $30,000 basis. Her $50,000 NUA will be taxed at capital gains tax rates when sold. 
When taking a distribution of NUA stock, it is advisable to not commingle the NUA stock with employer stock already held in a taxable account. One should set up a separate account for holding the NUA stock 
The decision as to whether to rollover employer stock or take the NUA distribution is a quantifiable decision. In general, a young employee changing jobs and having a small NUA would likely decide to roll the stock over to a rollover IRA, whereas a 70 year old retiree facing imminent Required Minimum Distributions would likely take the NUA distribution. Obviously, if the amount of NUA in a plan is large, taking the NUA distribution would be appealing.
The following advanced considerations concerning NUA require the aid of a professional retirement plan specialist:
- Rolling over the employer's basis in the plan and taking distribution of only the NUA.
- Contributing the NUA distribution to a Charitable Remainder Trust (private letter IRS authorization will be necessary. 
- Choate, Natalie, "Life and Death Planning for Retirement Benefits 6th Edition 2006" pp.138-139. ISBN 0-9649440-7-3
- Choate, Natalie, "Life and Death Planning for Retirement Benefits 6th Edition 2006" pp.143-144. ISBN 0-9649440-7-3
- *Investopedia: Rolling Over Company Stock: A Decision To Think Twice About
- Choate, Natalie, "Life and Death Planning for Retirement Benefits 6th Edition 2006" pp.138-145. ISBN 0-9649440-7-3
- Net Unrealized Appreciation on Employer's Stock Smith Barney White Paper
- Revisiting Net Unrealized Appreciation: A Tax-Wise Strategy That May Realize More Benefits Than Ever Neresian, John A. and Potter, Frances L., FPA Journal (February 2004)
- Investopedia: Rolling Over Company Stock: A Decision To Think Twice About
- Natalie Choate: Ataxplan Publications