Here's the example I was trying to resurrect; it's from the NYSCPA (?) website. Seems if the apartment house that OP exchanged for land had been nonresidential, like a factory or office building, we'ld have *ordinary* income as there's a piece of section 1245 which trumps section 1031.
I'm quoting the following although I haven't given myself a chance to read it thoroughly. "Dictated not read" as any good CYA attorney would say...
"What's worse, if the investor's building is commercial property, he will wind up with $700,000 of currently taxed ordinary income. Commercial property placed in service after 1980 and before 1987, and depreciated by an accelerated method, is considered IRC Sec. 1245 property. Under IRC Sec. 1245(a), all depreciation claimed is recaptured as ordinary income on a disposition, up to the gain realized in the transaction.
"The IRC Sec. 1031 exchange does not protect the investor. There is IRC Sec. 1245((4) recapture even though the property is disposed of in an IRC Sec. 1031 exchange. The amount recaptured cannot exceed the sum of 1) any gain recognized on the transaction, plus 2) the FMV of property acquired that is not IRC Sec. 1245 property, and that is not taken into account in computing recognized gain. In the example, the investor will have fully taxed ordinary income of $700,000 regardless of whether the transaction is tax-deferred under IRC Sec. 1031.
"There may be a more fundamental problem for a taxpayer who wants to exchange nonresidential property that 1) was bought after 1980 and before 1987, and 2) was depreciated using accelerated depreciation. If the property is exchanged today for a commercial or residential building and land, the property received will be part land and part IRC Sec. 1250 properties.
"A technical reading of the statute calls for a full recapture when IRC Sec. 1245 property is replaced with non-IRC Sec. 1245 property."