Investors & landlords

Old adage for the basis when selling ...   if the cost basis for a loss ends up being a gain and the cost basis for a gain ends up being a loss then  you have no gain or loss. https://www.marketwatch.com/story/how-to-handle-tricky-tax-rules-when-you-convert-your-house-into-a-...

 

So if your cost basis (purchase price) was say 150K (basis for a gain)  and  the FMV for depreciation was 100K (basis for a loss) then  if you sell it for  anything between 100 - 150 you have no gain or loss.  Sell for less than 100 you have a loss or sell for more than 150 you have a gain.  Of course this is a simplified example ... in your case the depreciation taken and recaptured will have to come into play first.