Learn how to avoid capital gains tax and save money with these strategies, including investing in a tax-free savings account, exchanging your property through a 1031 exchange, donating your assets to a charity, offsetting capital gains with capital losses, holding investments for over a year, and using your primary residence exclusion.