After five years of a raging bull market in stocks, many investors are sitting on huge capital gains. But it's easy to get confused about what tax rates you'll pay on your capital gains when you sell.

In the following video, Dan Caplinger, The Motley Fool's director of investment planning, looks at the rules governing capital gains, noting that short-term capital gains on assets held for a year or less are subject to ordinary income tax rates. For long-term capital gains on assets owned longer than a year, rates of 0%, 15%, or 20% can apply depending on your regular tax bracket. But Dan notes that some assets don't qualify for those lower rates, citing examples like collectibles and the bullion ETFs SPDR Gold Shares (GLD -0.19%) and iShares Silver Trust (SLV -0.36%) as subject to a higher maximum rate of 28%. Dan also goes through depreciation recapture and the special 25% rate that applies in those circumstances. Dan concludes that it's important to know the tax impact of your selling decisions before you pull the trigger, so you'll avoid nasty surprises at tax time.