Key takeaways
- Gross §1231 gain is eligible for Opportunity Zone deferral, unreduced by §1231 losses from other sales.
- The 180-day investment period for a §1231 gain begins on the date of the sale, not at year-end.
- Depreciation recapture treated as ordinary income under §1245 or §1250 is not eligible gain.
- Unrecaptured §1250 gain on real estate (taxed at up to 25%) is part of the §1231 gain and can be deferred.
- Landowners selling farmland or business land to data center developers usually have §1231 or capital gain they can defer, subject to the related-party rules.
What is a Section 1231 gain?
A §1231 gain is gain on the sale of depreciable property or real property used in a trade or business and held more than one year, such as a rental building, business land, or equipment.1
Section 1231 is a hybrid. At year-end, a taxpayer nets all §1231 gains and losses: a net gain is treated as long-term capital gain, and a net loss is ordinary. A lookback rule then recharacterizes net §1231 gain as ordinary income to the extent of net §1231 losses deducted in the prior five years. Separately, depreciation recapture under §1245 (equipment) and §1250 (certain real property) is carved out first and taxed as ordinary income.2
Fig. 1Three kinds of gain on a business asset sale
Eligible
Capital gain
- Stock, investment land, collectibles
- Short-term or long-term
- 180 days from the sale date
Eligible (gross)
Section 1231 gain
- Business real estate, land and equipment held over one year
- Includes unrecaptured §1250 gain on buildings
- Gross gain, not netted with §1231 losses
- 180 days from each sale date
Not eligible
Ordinary recapture
- §1245 recapture on equipment
- §1250 ordinary recapture on real property
- Taxed as ordinary income in the year of sale
Can Section 1231 gains be invested in an Opportunity Zone fund?
Yes. Under the regulations, the gross amount of eligible §1231 gain, unreduced by §1231 losses, can be invested in a Qualified Opportunity Fund (QOF), and the 180-day period begins on the date of each sale.1,3
A QOF is a corporation or partnership that holds at least 90% of its assets in Opportunity Zone property.4 The regulations treat §1231 gain sale by sale, which removes the year-end timing problem: you do not have to wait until December to know whether you have a net gain. The eligible amount is limited to the §1231 gain that exceeds any amount treated as ordinary income under §1245 or §1250.2,5
| Question | Rule | Source |
|---|---|---|
| How much is eligible? | Gross §1231 gain from each sale, not reduced by §1231 losses | Treas. Reg. §1.1400Z2(a)-1 |
| When does the 180-day period start? | Date of the sale or exchange | Treas. Reg. §1.1400Z2(a)-1 |
| Is depreciation recapture eligible? | No, to the extent treated as ordinary income under §1245 or §1250 | Treas. Reg. §1.1400Z2(a)-1 |
| Must the buyer be unrelated? | Yes, with a 20% related-party threshold | IRC §1400Z-2(e)(2) |
| Which benefits apply? | Five-year deferral, 10% or 30% step-up and 10-year exclusion, for amounts invested after December 31, 2026 | IRC §1400Z-2 |
The regulation is at 26 CFR 1.1400Z2(a)-1.6 The statute requires that eligible gain come from a sale or exchange with an unrelated person, using the tests of §267(b) and §707(b)(1) with 20% in place of 50%.7 For amounts invested after December 31, 2026, the deferred gain is included on the earlier of a disposition or the fifth anniversary of the investment.8 See which gains qualify.
Worked examples: how much of a business asset gain can you defer?
Subtract ordinary recapture from the total gain; what remains is §1231 gain you can defer, including any unrecaptured §1250 gain on a building.
Example 1: a rental or industrial building
A building (excluding land) bought for $2,000,000 and depreciated straight-line by $500,000 is sold for $3,000,000. Adjusted basis is $1,500,000, so total gain is $1,500,000. Real property depreciated straight-line generally has no §1250 ordinary recapture, so the entire $1,500,000 is §1231 gain. Of that, $500,000 is unrecaptured §1250 gain (taxed at up to 25%) and $1,000,000 is taxed at long-term capital gain rates. All $1,500,000 is eligible to invest.
Example 2: equipment
Equipment bought for $500,000 and depreciated by $300,000 has an adjusted basis of $200,000. Sold for $600,000, the gain is $400,000. The first $300,000 (the depreciation taken) is §1245 recapture, ordinary income, and not eligible. The remaining $100,000 is §1231 gain and can be deferred. If the same equipment sold for $400,000, the entire $200,000 gain would be recapture and nothing could be deferred.
Fig. 2Equipment sale: from total gain to eligible gain
Illustrative- Sale price600,000
- Adjusted basis-200,000
- §1245 recapture (ordinary, not eligible)-300,000
- Eligible §1231 gain: $100,000100,000
$
Example 3: a business asset sale with mixed assets
Selling an operating business as an asset sale produces a mix: gain on goodwill (generally capital gain), gain on real estate and equipment (§1231 plus any recapture), and ordinary income on inventory and receivables. Each piece is tested separately. The purchase price allocation therefore drives how much of the sale can go into a QOF. See Opportunity Zones for business owners selling a company.
How does deferring a 1231 gain interact with Section 1231 netting?
A deferred §1231 gain is not recognized in the year of sale, so it stays out of that year's §1231 netting; the deferred amount keeps its tax attributes and is recognized when included.1,3
That has two practical effects. First, if you have §1231 losses in the same year, they are netted without the deferred gain, which can leave a net §1231 loss that is deductible as ordinary. Second, the five-year lookback rule may recharacterize later net §1231 gains as ordinary to the extent of net §1231 losses taken in the prior five years. How a deferred §1231 gain is netted in the inclusion year, including under the lookback rule, is technical; model it with your tax adviser before choosing how much to defer.
Rates are those in effect for the inclusion year. For amounts invested after December 31, 2026, inclusion is on the fifth anniversary at the latest, after a 10% basis step-up, or 30% in a Qualified Rural Opportunity Fund.9 See the five-year deferral.
What about 1231 gains from partnerships, S corporations or installment sales?
Pass-through owners can defer their share of an entity's §1231 gain with the same three start-date choices as other pass-through gains, and installment sellers can invest as payments arrive.3,10
- If a partnership or S corporation does not invest the gain itself, each owner can defer its share. The 180-day period starts by default on the last day of the entity's tax year, or by election on the entity's sale date or the entity's return due date without extensions (March 15 for a calendar-year partnership).10
- Real estate partnerships often sell buildings mid-year. A partner who wants to invest quickly can use the sale date; one who needs the K-1 first can use the due date window.
- For an installment sale, the 180-day period can run from each payment received or from year-end, so each payment can be invested separately.5
How do you report a deferred 1231 gain?
Report the sale on Form 4797 as usual and make the deferral election on Form 8949 with the return for the year of the sale, then track the investment on Form 8997 each year.11,12
The deferral line on Form 8949 shows the QOF's EIN, the date of the investment and the deferred amount as a negative adjustment.11 Keep the closing statement, the depreciation schedule that supports the recapture calculation, and the QOF's confirmation of the investment date. See Form 8996 and Form 8997.
What does this mean for landowners selling to data center developers?
Farmland, ranchland and business land sold for a data center campus usually produces §1231 gain (land used in a business) or capital gain (land held for investment), and both can be deferred in a QOF within 180 days of the sale.1
Land is not depreciable, so a land sale has no §1245 or §1250 recapture; farm buildings and equipment sold with the land may. Large campuses can produce very large gains for landowners because developers seek big sites near transmission. Two cautions: plan the QOF investment before closing so the 180 days are not lost to diligence, and watch the related-party rules if the landowner will also invest in the fund that buys the land. The gain must come from a sale to an unrelated person, and a QOZB must buy its property from an unrelated party, each tested at a 20% ownership threshold.7,13 See Opportunity Zones for landowners and related-party rules.
Common questions
Can I defer a Section 1231 gain if I also had Section 1231 losses this year?
Yes. The gross §1231 gain is eligible, unreduced by §1231 losses. The losses are netted separately in the year of sale.
When does the 180-day clock start for a Section 1231 gain?
On the date of the sale or exchange that produced the gain, not at the end of the tax year.
Can I defer depreciation recapture in an Opportunity Zone fund?
No. Gain treated as ordinary income under §1245 or §1250 is not eligible. Unrecaptured §1250 gain on real estate, which is part of §1231 gain, can be deferred.
Is gain on selling farmland to a data center developer eligible?
Generally yes, as §1231 gain if the land was used in a farming business for more than a year, or as capital gain if held for investment, provided the buyer is unrelated.
Does a deferred 1231 gain get the 10% step-up?
Yes. For amounts invested after December 31, 2026, a five-year hold increases basis by 10% of the deferred gain, or 30% in a Qualified Rural Opportunity Fund.
Sources
Every numbered note in this guide links to the source below.
- 1.EY Tax News, “Final regulations on Opportunity Zones retain same approach as proposed regulations, with a few big changes,” 2020. taxnews.ey.com
- 2.RSM US, “Final QOZ regulations include favorable interpretations,” 2019. rsmus.com
- 3.Steptoe, “Final Opportunity Zone Regulations Provide Some Much-Needed Clarity,” 2020. steptoe.com
- 4.Internal Revenue Service, “About Form 8996, Qualified Opportunity Fund,” n.d. irs.gov
- 5.Holland & Hart, “Taxpayer-Favorable Final Opportunity Zone Regulations Issued,” 2019. hollandhart.com
- 6.Legal Information Institute, Cornell Law School, “26 CFR 1.1400Z2(a)-1, Deferring tax on capital gains by investing in opportunity zones,” n.d. law.cornell.edu
- 7.Office of the Law Revision Counsel, U.S. House of Representatives, “26 U.S.C. Subchapter Z: Opportunity Zones (§§1400Z-1 and 1400Z-2),” 2025. uscode.house.gov
- 8.Internal Revenue Service, “Notice 2026-40, Transitional Guidance on Qualified Opportunity Zones,” 2026. irs.gov
- 9.Seyfarth Shaw, “7 Key Changes to the Qualified Opportunity Zone Incentive Under the One Big Beautiful Bill Act,” 2025. seyfarth.com
- 10.Goulston & Storrs, “Qualified Opportunity Zones: Final Regulations Provide Clarity,” 2020. goulstonstorrs.com
- 11.Novogradac, “Interpreting and Completing OZ-Related Tax Forms,” n.d. novoco.com
- 12.Internal Revenue Service, “Form 8997, Initial and Annual Statement of Qualified Opportunity Fund (QOF) Investments,” 2024. irs.gov
- 13.eCFR, “26 CFR 1.1400Z2(d)-1, Qualified opportunity funds and qualified opportunity zone businesses,” 2026. ecfr.gov
OZ Data Centers
Building or investing in an Opportunity Zone data center?
We sponsor the deals, manage the funds and run the operating businesses. Tell us about your capital, your land or your project.
This website is for general information only. It is not an offer to sell, or a solicitation of an offer to buy, any security. Any offering will be made only through confidential offering documents, to eligible investors, where permitted by law. Opportunity Zone tax benefits depend on each investor's circumstances and on rules that can change; consult your own tax and legal advisers.