Did you know that under the right circumstances you can legally avoid paying capital gains tax on proceeds from the sale of real property? As a general rule, under Internal Revenue Code Section 1031 you are not required to recognize a gain or loss when you exchange real property held for productive use in a trade or business, or for investment, if such real property is exchanged for real property of like kind.