Section 1231 Tax Code: Netting, Lookback, and Recapture Rules

Section 1231 of the tax code gives owners of business property a rare double benefit: when your sales for the year produce a net gain, it’s taxed at the lower long-term capital gains rates of 0%, 15%, or 20%; when they produce a net loss, it’s treated as an ordinary loss that offsets wages and other income with no $3,000 annual cap. The catch is that depreciation recapture and a five-year lookback rule can pull part of a gain back into ordinary income before the favorable rates ever apply.

What Property Section 1231 Covers

Section 1231 applies to two broad categories of assets used in a trade or business: depreciable personal property (machinery, equipment, vehicles, furniture) and real property (land, buildings, warehouses).1Office of the Law Revision Counsel. 26 USC 1231 – Property Used in the Trade or Business and Involuntary Conversions Business use is the dividing line. A commercial building you operate out of qualifies. A rental condo held purely as a personal investment does not fall under these rules, though other capital gains provisions may still apply.

The provision also reaches property lost through involuntary conversions: assets destroyed by fire or storm, stolen property, and land or buildings taken through eminent domain. Several things are specifically excluded:

  • Inventory held for sale to customers in the ordinary course of business.
  • Copyrights, literary or musical compositions, and artistic works when held by the person who created them or someone who received them as a gift from the creator.
  • Government publications received from the government rather than purchased at the public sale price.

The One-Year Holding Period

To qualify at all, you must hold the property for more than one year before selling or exchanging it.1Office of the Law Revision Counsel. 26 USC 1231 – Property Used in the Trade or Business and Involuntary Conversions The clock starts the day after you acquire the asset and runs through the date you dispose of it. Sell a piece of equipment at the eleven-month mark and the entire gain or loss is ordinary, with no Section 1231 benefit.

How Annual Netting Decides Capital or Ordinary Treatment

The signature feature of Section 1231 is the annual netting process. At the end of the tax year you add up all your Section 1231 gains and all your Section 1231 losses. Which side is larger determines everything.

If total gains exceed total losses, the net amount is treated as a long-term capital gain.1Office of the Law Revision Counsel. 26 USC 1231 – Property Used in the Trade or Business and Involuntary Conversions Long-term capital gains are taxed at 0%, 15%, or 20% depending on your taxable income and filing status, well below ordinary income rates that can reach 37%.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses

If total losses exceed total gains, the net amount is treated as an ordinary loss. This is where the real advantage shows up. Ordinary losses can offset any type of income (your salary, business profits, interest) without the $3,000 annual deduction cap that applies to net capital losses. A $50,000 net Section 1231 loss reduces your taxable income by the full $50,000 that year.

The Five-Year Lookback Rule

Congress built in a safeguard against taxpayers claiming ordinary losses in some years and capital gains in others. Under Section 1231(c), when you have a net Section 1231 gain for the current year, you must look back at your five most recent preceding tax years. If you claimed any net Section 1231 losses as ordinary deductions during that window and haven’t already recaptured them, your current-year gain is recharacterized as ordinary income up to the amount of those unrecaptured prior losses.1Office of the Law Revision Counsel. 26 USC 1231 – Property Used in the Trade or Business and Involuntary Conversions Anything beyond the recaptured amount keeps its long-term capital gain status.

This is where people get surprised. Say you deducted $30,000 in net Section 1231 losses as ordinary losses in 2024. In 2027 you sell a business building for a $100,000 net Section 1231 gain. The first $30,000 of that gain is taxed as ordinary income, and only the remaining $70,000 qualifies for capital gains rates. Form 4797 walks through this on lines 8 through 12.

Depreciation Recapture Comes First

Depreciation recapture happens before a gain ever reaches the Section 1231 netting. When you sell business property at a profit, the IRS first claws back some or all of the depreciation you deducted, taxing that portion at higher rates. Only the gain that survives recapture flows into the Section 1231 calculation.

Personal Property Under Section 1245

For equipment, machinery, vehicles, and other depreciable personal property, the recapture rule is aggressive. The entire gain, up to the total depreciation you deducted, is taxed as ordinary income.3Office of the Law Revision Counsel. 26 USC 1245 – Gain From Dispositions of Certain Depreciable Property In practice, most equipment sales produce ordinary income rather than capital gains, because equipment rarely sells for more than its original purchase price. If you bought a $100,000 machine, depreciated it by $60,000 (dropping your basis to $40,000), and sold it for $85,000, the entire $45,000 gain is ordinary income because it falls within the $60,000 of depreciation you claimed.

Only the slice of gain exceeding total depreciation, meaning you sold the asset for more than you originally paid, enters Section 1231 netting as a potential capital gain. With most business equipment, that scenario is rare.

Real Property Under Section 1250

Buildings and structural improvements get gentler treatment. The portion of gain attributable to straight-line depreciation you previously deducted, called “unrecaptured Section 1250 gain,” is taxed at a maximum rate of 25%.4Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed Any gain beyond the depreciation amount then flows into the Section 1231 netting and, if net gains exceed net losses for the year, qualifies for the 0%, 15%, or 20% long-term capital gains rates.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses

The practical impact is significant. Suppose you bought a commercial building for $500,000, claimed $120,000 in depreciation, and sold it for $700,000. Your adjusted basis is $380,000, giving you a $320,000 total gain. The first $120,000 (the depreciation) is taxed at up to 25%. The remaining $200,000 enters Section 1231 netting and, assuming net gains for the year, is taxed at capital gains rates.

Other Taxes That Can Still Apply

Net Investment Income Tax

Higher-income taxpayers face an additional 3.8% surtax on net investment income, and it can reach Section 1231 gains. The tax applies when your modified adjusted gross income exceeds $200,000 for single filers, $250,000 for married couples filing jointly, or $125,000 for married filing separately.5Internal Revenue Service. Topic No. 559, Net Investment Income Tax These thresholds are not indexed for inflation.

Whether your gain is subject to the surtax depends on your involvement in the business. Gains from a business where you materially participate are generally excluded. Gains from a passive activity, a business you invest in but don’t actively run, are included in net investment income and taxed at the extra 3.8% on top of whatever capital gains rate applies.

Self-Employment Tax

Section 1231 gains are excluded from self-employment tax, whether the gain ends up taxed as a capital gain or is recharacterized as ordinary income through the lookback rule.6eCFR. 26 CFR 1.1402(a)-6 – Gain or Loss From Disposition of Property The same exclusion runs the other way: Section 1231 losses don’t reduce your self-employment income either. Self-employment tax runs 15.3% up to the Social Security wage base, so this exclusion can meaningfully change the after-tax math on a big sale.

Deferring the Gain With a Like-Kind Exchange

If you’re selling business real estate and plan to buy replacement property, a Section 1031 like-kind exchange lets you defer recognizing the gain entirely, including both the Section 1231 gain and the depreciation recapture. Under this provision no gain or loss is recognized when you exchange real property held for business use or investment for other real property of like kind.7Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

Since the Tax Cuts and Jobs Act of 2017, like-kind exchanges are limited to real property. Equipment, vehicles, machinery, and other personal property no longer qualify.8Internal Revenue Service. Like-Kind Exchanges – Real Estate Tax Tips Selling a warehouse and buying another commercial building can qualify. Selling a fleet of trucks means owing tax on the gain that year. The exchange also has strict deadlines: 45 days to identify replacement property and 180 days to close. It has to be arranged before the sale, not after.

Reporting on Form 4797

All sales of business property are reported on IRS Form 4797.9Internal Revenue Service. Form 4797 – Sales of Business Property For each asset sold you’ll need the acquisition date and sale date, the gross sales price, the original cost plus improvements, and the total depreciation claimed from acquisition through sale.

Part I handles the Section 1231 netting itself. Line 7 produces your net Section 1231 gain or loss. Lines 8 through 12 run the five-year lookback recapture. Depreciable property sold at a gain first passes through Part III, where the Section 1245 and 1250 recapture amounts are calculated, and only the remaining gain flows back to Part I.9Internal Revenue Service. Form 4797 – Sales of Business Property

When the netting produces a net long-term capital gain, that amount transfers to Schedule D and then to Form 1040. Net ordinary losses stay on Form 4797 and flow directly to Form 1040 without going through Schedule D. The IRS cross-references figures against prior filings, and an accuracy-related penalty of 20% of any underpayment applies to negligent or substantially understated amounts.10Office of the Law Revision Counsel. 26 USC 6662 – Imposition of Accuracy-Related Penalty on Underpayments