The main reason for holding stocks in an IRA has to do with the tax benefits. Understanding what those benefits are and how they apply to both the traditional and Roth IRA is important if you want to maximize your advantage on the way to your investing goals.If you do decide to invest in stocks as part of your IRA strategy, you may want to check out FinanceBoards to access all kinds of financial data to help you in your research efforts before buying and selling.Related: WIDGET SPOTLIGHT #10: MODEL SCREENERSComparing IRA TypesBoth types of IRA – traditional and Roth – have several features in common.* You can contribute up to $5,500 ($6,500 if you are 50 or over) per year in either IRA.* All capital gains inside the IRA are tax-free in most cases.* Dividends kept within either IRA are also tax free.* Distributions taken before retirement (age 59 ½) may be taxable and are often assessed an additional penalty.The two types of IRA differ in other respects.* Distributions from a traditional IRA after you retire are taxed as regular income. Distributions from a Roth IRA are tax-free.* Money you contribute into a traditional IRA is deductible from taxable income the year you make the contribution. Roth IRA contributions are taxed the year you put them in. (That’s why they are not taxed at withdrawal.)* Roth IRA contributions may be capped if your adjusted gross income is too high. There is no income cap on traditional IRA contributions.What This Means When You Buy StocksMost stocks that investors buy are from what is known as “C” corporations. Those types of stocks can be held in any IRA with no tax consequences on either dividends or capital gains while in the IRA.Remember, when you withdraw funds from a traditional IRA at retirement, both original contributions and earnings are taxable. Neither contributions nor earnings in a Roth IRA are taxed at regular withdrawal.A Word Of CautionIf you buy stocks from a master limited partnership (MLP), “S” corporation or LLC, you may end up paying taxes. The reason for this has to do with certain tax advantages those types of investments already have.These investments normally pay large dividends. If those dividends are large enough they can result in unrelated business taxable income (UTBI). Under current rules if your IRA earns more than $1,000 in total UBTI in a tax year, you must pay income tax on those earnings.For this reason, many people avoid putting those types of investments inside an IRA.Related: STOCKS, MUTUAL FUNDS OR ETFS?One More CaveatYou also need to know that when you sell stocks within an IRA at a loss you can’t deduct the loss from your taxes. This is different from selling stocks outside an IRA in a taxable account. The reason is obvious. Your investments inside an IRA are sheltered from taxes. Since you don’t pay taxes on capital gains or dividends, naturally you can’t claim a loss as a deduction.It is possible to claim a loss on an IRA investment but it requires you to withdraw all funds from all IRAs of the same type. If you experience a loss in a traditional IRA and wish to claim it, you must withdraw all funds from all your traditional, SEP and SIMPLE IRAs. This is obviously a drastic move and not one most people take lightly.