If—
If—
(A) the section 1231 gains for any taxable year, exceed
(B) the section 1231 losses for such taxable year,
If—
(A) the section 1231 gains for any taxable year, do not exceed
(B) the section 1231 losses for such taxable year,
For purposes of this subsection—
(A) Section 1231 gainThe term “section 1231 gain” means— (i) any recognized gain on the sale or exchange of property used in the trade or business, and (ii) any recognized gain from the compulsory or involuntary conversion (as a result of destruction in whole or in part, theft or seizure, or an exercise of the power of requisition or condemnation or the threat or imminence thereof) into other property or money of— (I) property used in the trade or business, or (II) any capital asset which is held for more than 1 year and is held in connection with a trade or business or a transaction entered into for profit.
(B) Section 1231 loss The term “section 1231 loss” means any recognized loss from a sale or exchange or conversion described in subparagraph (A).
For purposes of this subsection—
(A) In determining under this subsection whether gains exceed losses— (i) the section 1231 gains shall be included only if and to the extent taken into account in computing gross income, and (ii) the section 1231 losses shall be included only if and to the extent taken into account in computing taxable income, except that section 1211 shall not apply.
(B) Losses (including losses not compensated for by insurance or otherwise) on the destruction, in whole or in part, theft or seizure, or requisition or condemnation of— (i) property used in the trade or business, or (ii) capital assets which are held for more than 1 year and are held in connection with a trade or business or a transaction entered into for profit, shall be treated as losses from a compulsory or involuntary conversion.
(C) In the case of any involuntary conversion (subject to the provisions of this subsection but for this sentence) arising from fire, storm, shipwreck, or other casualty, or from theft, of any— (i) property used in the trade or business, or (ii) any capital asset which is held for more than 1 year and is held in connection with a trade or business or a transaction entered into for profit, this subsection shall not apply to such conversion (whether resulting in gain or loss) if during the taxable year the recognized losses from such conversions exceed the recognized gains from such conversions.
For purposes of this section—
The term “property used in the trade or business” means property used in the trade or business, of a character which is subject to the allowance for depreciation provided in section 167, held for more than 1 year, and real property used in the trade or business, held for more than 1 year, which is not—
(A) property of a kind which would properly be includible in the inventory of the taxpayer if on hand at the close of the taxable year,
(B) property held by the taxpayer primarily for sale to customers in the ordinary course of his trade or business,
(C) a patent, invention, model or design (whether or not patented), a secret formula or process, a copyright, a literary, musical, or artistic composition, a letter or memorandum, or similar property, held by a taxpayer described in paragraph (3) of section 1221(a), or
(D) a publication of the United States Government (including the Congressional Record) which is received from the United States Government, or any agency thereof, other than by purchase at the price at which it is offered for sale to the public, and which is held by a taxpayer described in paragraph (5) of section 1221(a).
(2) Timber, coal, or domestic iron ore Such term includes timber, coal, and iron ore with respect to which section 631 applies.
Such term includes—
(A) cattle and horses, regardless of age, held by the taxpayer for draft, breeding, dairy, or sporting purposes, and held by him for 24 months or more from the date of acquisition, and
(B) other livestock, regardless of age, held by the taxpayer for draft, breeding, dairy, or sporting purposes, and held by him for 12 months or more from the date of acquisition.
(4) Unharvested crop In the case of an unharvested crop on land used in the trade or business and held for more than 1 year, if the crop and the land are sold or exchanged (or compulsorily or involuntarily converted) at the same time and to the same person, the crop shall be considered as “property used in the trade or business.”
For purposes of this subsection, the term “non-recaptured net section 1231 losses” means the excess of—
(1) In general The net section 1231 gain for any taxable year shall be treated as ordinary income to the extent such gain does not exceed the non-recaptured net section 1231 losses.
For purposes of this subsection, the term “non-recaptured net section 1231 losses” means the excess of—
(A) the aggregate amount of the net section 1231 losses for the 5 most recent preceding taxable years, over
(B) the portion of such losses taken into account under paragraph (1) for such preceding taxable years.
For purposes of this subsection, the term “net section 1231 gain” means the excess of—
(A) the section 1231 gains, over
(B) the section 1231 losses.
For purposes of this subsection, the term “net section 1231 loss” means the excess of—
(A) the section 1231 losses, over
(B) the section 1231 gains.
(5) Special rules For purposes of determining the amount of the net section 1231 gain or loss for any taxable year, the rules of paragraph (4) of subsection (a) shall apply.
(Aug. 16, 1954, ch. 736, 68A Stat. 325; Pub. L. 85–866, title I, § 49(a), Sept. 2, 1958, 72 Stat. 1642; Pub. L. 88–272, title II, § 227(a)(2), Feb. 26, 1964, 78 Stat. 97; Pub. L. 91–172, title II, § 212(b)(1), title V, §§ 514(b)(2), 516(b), Dec. 30, 1969, 83 Stat. 571, 643, 646; Pub. L. 94–455, title XIV, § 1402(b)(1)(R), (2), Oct. 4, 1976, 90 Stat. 1732; Pub. L. 95–600, title VII, § 701(ee)(1), Nov. 6, 1978, 92 Stat. 2924; Pub. L. 97–34, title V, § 505(c)(1), Aug. 13, 1981, 95 Stat. 332; Pub. L. 98–369, div. A, title I, § 176(a), title VII, § 711(c)(2)(A)(iii), title X, § 1001(b)(15), (e), July 18, 1984, 98 Stat. 709, 944, 1012; Pub. L. 106–170, title V, § 532(c)(1)(G), Dec. 17, 1999, 113 Stat. 1930; Pub. L. 113–295, div. A, title II, § 221(a)(81), Dec. 19, 2014, 128 Stat. 4049; Pub. L. 115–97, title I, § 13314(b), Dec. 22, 2017, 131 Stat. 2133.)