There are various ways to avoid capital gains taxes on a second home, including renting it out, performing a 1031 exchange, using it as your primary residence, and depreciating your property.