The building. Section 168(b)(3) forces the straight line method on residential rental and nonresidential real property, and section 1250(b)(1) recaptures only "additional depreciation", meaning depreciation in excess of straight line. For any building placed in service under the current system, that excess is zero, so section 1250 ordinary-income recapture has nothing to bite on. What remains is unrecaptured section 1250 gain, defined at section 1(h)(6)(A) as the long-term capital gain that would have been ordinary income if section 1250 had reached all depreciation. That category exists precisely because Congress wanted straight-line real-property depreciation taxed above the ordinary long-term capital gains rates without turning it into ordinary income.
Twenty-five percent is a ceiling, not a rate. Section 1(h)(1) opens by saying the tax "shall not exceed" the sum of its components, and subparagraph (E) applies "25 percent" to unrecaptured section 1250 gain. Because the whole subsection is a cap on the tax rather than a schedule of rates, a seller whose ordinary rate is below 25% pays their own lower rate on that slice. The common shorthand "recapture is taxed at 25%" overstates the bill for a lower-income seller. In the other direction, the net investment income tax can add 3.8% on top for a seller above its modified adjusted gross income threshold, so the practical federal ceiling on that slice is 28.8%.
The contents are a different rule entirely, and this is the half people miss. Section 1245(a)(1) treats gain up to the depreciation taken on section 1245 property as ordinary income, with no 25% ceiling, and section 1245(a)(3)(A) reaches "personal property". A landlord who depreciated a refrigerator, a stove, carpeting, or any of the 5, 7 and 15-year components a cost segregation study carves out of a building has section 1245 property in the sale. The correction "straight line means no ordinary-income recapture" is right about the building and wrong about the rental as a whole. Section 1245 gain is also recognized "notwithstanding any other provision of this subtitle", and section 453(i) says the same thing directly for an installment sale: recapture income is recognized in the year of disposition, and only the gain above it is spread over the installments.
Allowed or allowable. Section 1250(b)(3) defines the depreciation adjustments as those "allowed or allowable", and section 1245(a)(2) uses the same construction. The recapture is therefore measured by what you were entitled to deduct, not by what you actually claimed, so an owner who never took depreciation still faces the recapture on it. Both sections contain a narrow proviso letting a taxpayer who can establish by adequate records that the amount allowed was less than the amount allowable use the smaller figure, but that is an escape hatch carrying a burden of proof, not the default.
What defers it and what does not. A like-kind exchange under section 1031 defers the whole gain including the recapture, and carries the depreciation history into the replacement property rather than clearing it. The principal residence exclusion does not help either: section 121(d)(6) switches the exclusion off for gain up to the depreciation adjustments attributable to periods after May 6, 1997, which is what catches someone who rented out a former home before selling it.