The one you are most familiar with is known as tax loss harvesting. It's where you sell losers to offset the gains of winners. You don't pay taxes because you didn't gain anything. That pretty much sucks but as a tax strategy it's effective.
But there's another way you can have gains and still pay ZERO on the capital gains.
You have probably heard that long term capital gains are taxed at either 15% or 20% depending on your marginal tax rate for ordinary income. If you are in the 25%, 28%, 33%, or 35% brackets then you pay 15%. If you are in the 39.6% bracket, you pay 20%.
Where's the top end of the 15% bracket? $37,650 for single filers and $75,300 for married filers for 2016.
Add back in the standard deduction of $6,200 for single filers and $12,400 for married filers and your ceiling on the 15% bracket is $43,850 for single and $87,700.
Add back personal exemptions, which are $3,950 a piece, and now you're talking!
Family of four would get $15,800 personal exemptions lifting the ceiling to $102,000.
When you go to sell investments, whatever gains you would get that remain under that $102,000 ceiling after adding in your income would be tax free.
As we near the end of the year, check to see what your tax rate on long term capital gains might be. If it's 0%, it might be a good time to harvest some of those gains tax free.
That's how you avoid paying capital gains on long term investments. And you don't have to be wealthy to do it!