One way to avoid capital gains taxes is to invest within tax-deferred retirement accounts. Because these accounts are shielded from current taxation, you can buy and sell as much as you want without triggering capital gains taxes. However, distributions taken in retirement will be taxed at your ordinary income tax rate.
A popular strategy to minimize capital gains taxes in non-retirement investment accounts is tax-loss harvesting. Many investment advisors use this method of strategically selling investments at a loss to offset gains on appreciated investments. If your annual losses and gains net to $0, then you won’t be subject to capital gains tax. If your losses exceed your gains for the year, then you may be able to reduce your taxable income.