pk
Level 15
Level 15

Get your taxes done using TurboTax

Also note that the accumulated depreciation allowable or claimed reduces your basis in the property and therefore increases  your gain.  Thus as @Hal_Al  and @Anonymous_  has pointed you do have to include the  allowable / taken  depreciation as ordinary gain before the exclusion is applied.