exchange, and (B) the amount of gain excluded by subparagraph (A) shall be included in gross income as provided by paragraph (2). (2) Deferral of gain invested in opportunity zone property (A) Year of inclusion Except as provided by subparagraph (C), gain to which paragraph (1)(B) applies shall be included in income in the taxable year in which the qualified opportunity zone property related to such gain is sold or exchanged in the amount determined under subparagraph (B). (B) Amount includible The amount of gain determined under this clause shall be— (i) 100 percent of such gain in the case of the sale or exchange of the qualified opportunity zone property with respect to which gain is deferred under paragraph (1) that is held for less than 5 years, (ii) 90 percent of such gain in the case of the sale or exchange of the qualified opportunity zone property with respect to which gain is deferred under paragraph (1) that is held for at least 5 years but less than 7 years, and (iii) 85 percent of such gain in the case of the sale or exchange of the qualified opportunity zone property with respect to which gain is deferred under paragraph (1) that is held for at least 7 years. (C) Property held after 2026 treated as sold For purposes of subparagraph (A), any qualified opportunity zone property that has not been sold or exchanged on or before December 31, 2026, shall be treated as sold on December 31, 2026. (3) Exclusion of gain on qualified opportunity zone property held for at least 10 years Except as provided in paragraph (2), in the case of the sale or exchange of qualified opportunity zone property, or an investment in a qualified opportunity fund, held for at least 10 years, gross income for the taxable year shall not include any gain from the sale or exchange of such property or investment. (4) One election per property No election may be made under paragraph (1) with respect to a sale or exchange if an election previously made with respect to such sale or exchange is in effect. (b) Basis rules relating to