Get your taxes done using TurboTax

You can use the capital loss carryovers to offset the capital gain from the sale.

 

Note, however, that unrecaptured Section 1250 gain (from previous depreciation deductions) is taxed at your marginal tax rate (up to 25%) which could be higher than your top capital gains tax rate (depending upon your total gain, et al).