Real estate investors can legally defer or eliminate capital gains taxes on rental properties by utilizing specific Internal Revenue Service provisions, most notably the Section 1031 tax-deferred exchange, which allows sellers to reinvest sales proceeds into like-kind replacement properties. Alternatively, investors can convert a rental investment property into a primary residence and satisfy the strict ownership and use tests required under Section 121 to exclude up to $250,000 or $500,000 of capital gains from taxable income.