When you sell a rental, your taxable gain generally equals sale price minus selling costs, your adjusted basis, and plus any depreciation you claimed over the years. Part of that gain may be taxed as depreciation recapture at higher rates, with the rest treated as capital gains. Some investors use a 1031 exchange to defer these taxes by reinvesting in another qualifying property.