After a lifetime spent building a portfolio, most retirees eventually have to deconstruct it, steadily selling off their holdings during retirement.

Simply unloading stocks in a random fashion, however, ensures that you'll leave money on the table. Here's a helpful primer on when to begin, how to proceed, and how to make mid-stream adjustments.

The Age-Inverse Rule

Let's face it, stocks are risky investments. And as we age, our desire for risk diminishes as we'd like to ensure that there's plenty of money around, even if the stock market heads south. Financial planners suggest you follow the age-inverse rule. Subtract your age from 100, and that's how much of your net worth should be tied up in stocks.

For example, a 65-year-old should have their exposure down to 35% and keep reducing their exposure to stocks from there. Some planners suggest you include home equity in the calculation of your net worth, while most simply suggest focusing on liquid investments like stocks, bonds, and Certificates of deposit (CDs).

A Fresh Look

When it comes time to start selling off various stocks, you'll need to forget the past. Unloading stocks that have already risen in value while hanging on to stocks that have languished is a mistake that many investors make. Instead you should look at all of your stocks and analyze them as if you don't yet own them. The stocks that look least appealing -- and hence are least likely to rise in value in future years -- should be the first ones in your selling queue.

It's also wise to hang on to your dividend-paying stocks as long as possible. Not only are these stocks more stable when markets turn treacherous, but those dividend streams can continue to help generate extra income when you're retired.

The Taxman Awaits

Once you've arranged your holdings into some sort of pecking order, you'll need to limit how much you actually sell in any given year. Although the capital gains tax rate is just 15% right now, it's likely to be raised to 25% or even 35% in coming years as Washington seeks to raise revenue. If you sell $100,000 in stock in a few years, you may be looking at a $25,000 or even $30,000 tax bill.

To offset that tax bite, you may want to selectively pair your winners with your losers so the capital losses shield the capital gains. Financial planners suggest you maintain a spreadsheet of all of your stock investments, tracking what you paid for each stock and your current profit or loss in each name. Match up a $10,000 gainer and a $10,000 loser and you'll owe no taxes (as long as the matched stocks are in the same long-term (one year or longer) or short-term holding period.

Of course, if you hold your investments in a tax-sheltered retirement plan, then different rules apply. You can start selling stocks without any tax consequences when you turn 59 1/2 but you must start selling by the time you reach 70 1/2.

Selling Into Rallies

Nobody likes to leave a party when it's really rocking. Yet that's precisely the best time to sell -- even if the party goes on a bit longer.

Investors that had the fortitude to sell stocks in the late 1990s were best able to sleep at night when the eventual pullback arrived. The converse is also true. If the market slumps deeply, as it did in late 2008 and early 2009, then you're best off sitting tight and waiting out the storm. Sadly, many investors fled the market when it plunged and have missed the subsequent sharp rebound that has seen the S&P 500 double in value from the March 2009 low.

The Annual Tune-Up

Once your plan is in place, you'll need to keep fine-tuning it. If you've decided to hold off retirement a bit longer, then an automatic decision to sell stocks every year may not make sense. And those stocks you've lined up in order of appeal? Well, you'll have to re-check your assumptions annually to see what makes sense to hold and what to unload.

The Investing Answer: If you follow these steps, you may still have your feet in the market well into your 80s. But by then, most of your money should be tied up in safer assets, such as bonds and CDs. Right now, these financial instruments offer paltry payouts, and it's understandable to want to transition to them slowly. Yet it pays to watch interest rates. As they rise, you should become prepared to sell stocks.

With all of these variables to monitor, it's clear that your financial maneuvering doesn't end simply when you decide to stop buying new stocks.