Ever since you started investing, you've heard that whenever you can, you should avoid paying taxes. Tax-favored accounts like IRAs are a great way to keep the tax man at bay for decades. But with some stocks, the IRS will have the last laugh if you put them in your retirement account.

Everyone's favorite tax shelter
In general, IRAs are amazing tools to help you save for retirement. With a traditional IRA, you get to contribute pre-tax money, giving you an immediate tax break. If investments inside your IRA pay out income, whether it comes from dividends on stocks or interest payments on bonds or bank accounts, then you don't have to pay tax on that income right away. Similarly, if you sell investments inside your IRA at a gain, you don't have to pay capital gains tax on the profits. That's the benefit of tax deferral.

Eventually, though, you have to pay the piper. With traditional IRAs, in exchange for the tax deduction you got when you first contributed to your retirement account, you have to pay taxes when you withdraw your money from your IRA. That only seems fair; after all, you didn't have to worry about taxes throughout your career. What's not fair, though, is the rate of tax you have to pay.

How IRAs can hurt you
The downside of traditional IRAs is that all the money you withdraw from your account is treated as ordinary income for tax purposes. Right now, that means you'll pay up to 35% of the amount you take out of your traditional IRAs to Uncle Sam. Next year, the rate could be even higher, if Congress doesn't extend current tax rates beyond the end of 2010.

Compare that result to the amount of tax you would have had to pay if you'd kept your investments in a taxable account. You would have paid tax on investment income each year as you received it, at whatever rate applied to that particular type of income. But most importantly, if you'd held your investments for a long time and built up a large capital gain, you would qualify for favorable long-term capital gains rates, which are currently set at a maximum of 15%.

Put another way, by not using an IRA for those highly appreciated assets, you might pay less than half the taxes you'd have to pay if you kept those investments inside a traditional IRA.

The best stocks to keep taxable
The investments that get hurt the most inside a traditional IRA are low- or no-dividend stocks. They don't generate much income, so the tax deferral an IRA provides isn't worth much. Nearly all their profit potential comes from capital gains that would be eligible for lower tax rates outside a retirement account.

To find some of the best stocks to hold outside your IRA, I turned to our Motley Fool CAPS community. I searched for highly rated stocks with dividend yields of 1% or less in order to minimize the year-to-year tax burden of keeping them in a taxable account. I also looked for attractive valuations that would make it more likely for stock prices to appreciate over the long haul, as well as a history of at least modest revenue growth. Here are some of the stocks I found:

Stock

CAPS Rating  
(out of 5)

P/E Ratio

Dividend 
Yield

3-Year Avg. 
Revenue Growth

Petroleo Brasileiro (NYSE: PBR) ***** 8.6 0.4% 6.8%
Hewlett-Packard (NYSE: HPQ) **** 11.3 0.8% 5.1%
Gilead Sciences (Nasdaq: GILD) ***** 10.9 None 23.2%
Teck Resources (NYSE: TCK) **** 12.2 0.9% 7.7%
Transocean (NYSE: RIG) ***** 7.3 None 25.1%
National Oilwell Varco (NYSE: NOV) ***** 12.1 0.9% 11.1%
Cameco (NYSE: CCJ) ***** 10.1 1% 8.2%

Source: Motley Fool CAPS.

Each of these stocks has promising prospects for growth, especially as interest around the world focuses increasingly on commodities. Technology is always a prime source for growth candidates, and health care has demographics on its side.

Yet even if things turn badly, keeping these stocks outside an IRA also lets you benefit. Each of these stocks has at least some chance of a significant loss. Transocean is at risk from the BP oil spill, and it, along with National Oilwell Varco and Petrobras, are highly exposed to the changing fortunes of the energy industry. Similarly, Teck Resources and Cameco have benefited greatly from the commodities boom, but they've seen reversals of fortune in past busts and could see them again. Even HP and Gilead aren't invulnerable to the whims of changing economic conditions, with HP having to deal with a new CEO and Gilead facing problems in its drug pipeline. If any of these stocks produces losses, keeping them outside an IRA lets you harvest those losses for immediate tax benefits.

Stay smart
IRAs are useful tools, but you have to know how to use them. By keeping the right investments outside your IRA, you'll end up with more and give Uncle Sam less over the course of your lifetime.

Tune in every Monday and Wednesday for Dan's columns on retirement, investing, and personal finance.

True to its name, The Motley Fool is made up of a motley assortment of writers and analysts, each with a unique perspective; sometimes we agree, sometimes we disagree, but we all believe in the power of learning from each other through our Foolish community.

Fool contributor Dan Caplinger gets while the getting's good. National Oilwell Varco is a Motley Fool Stock Advisor pick. Petroleo Brasileiro is a Motley Fool Income Investor selection. The Fool owns shares of and has written covered calls on Cameco. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy will never tell you to get out.