If you sold a stock this year and are staring at a fat capital gains bill, here is a rule buried in the tax code that most brokers never mention: you can roll that gain into real estate or a business in a designated low-income neighborhood, defer the tax you owe today, and if you hold the new investment long enough, the IRS erases the tax on the new gain entirely. It is called a Qualified Opportunity Zone (QOZ) investment, and it is one of the most generous capital gains loopholes still on the books in 2026.
The Actual Rule
Here is the deal. Sell an appreciated asset (stock, crypto, a business, a rental), take the capital gain, and within 180 days plow that gain into a Qualified Opportunity Fund (QOF). The fund puts the money into property or an operating business inside a federally designated Opportunity Zone, which are census tracts the Treasury flagged as economically distressed. Do it right and two things happen: the original tax bill on your stock gain is deferred, and any appreciation on the QOF investment itself becomes 100% tax-free once you have held it for at least 10 years.
Look It Up Yourself
The strategy is codified in 26 U.S. Code §1400Z-2, created by the Tax Cuts and Jobs Act of 2017 and made permanent (with revised rolling zone designations) by the One, Big, Beautiful Bill signed in 2025. The IRS spells out the mechanics in Form 8949, Form 8997, and Form 8996, which QOFs must file to self-certify. Opportunity Zone tracts are listed by the CDFI Fund at the Treasury Department.
Who It’s For, Who It’s Not
This is a tool for anyone sitting on a realized capital gain, short-term or long-term, from almost any asset. That matters right now because corporate profits hit $4,426.5 billion in 2026 Q1, up 12.8% year-over-year, and a lot of investors are carrying huge embedded gains in tech and financial names.
Who it is not for: people trying to shelter ordinary income (wages, IRA withdrawals, Social Security). Only the capital gain portion of a sale qualifies. And you cannot use it inside a retirement account. Also, if you need the money in five years, walk away. The tax break requires patience most investors do not have.
How to Actually Use It
- Realize the gain. Sell the stock, crypto, or property. Note the exact settlement date. Your 180-day clock starts there (partnership K-1 gains get some flexibility on the start date).
- Pick or form a QOF. You can invest in a third-party fund or self-certify your own LLC as a QOF using Form 8996. Only the gain has to go in, not the entire sale proceeds.
- Deploy into the zone. The QOF must hold at least 90% of its assets in QOZ property, either real estate that gets “substantially improved” or an operating business with the bulk of its activity inside the tract.
- File Form 8949 and Form 8997 with your tax return to elect deferral and track the investment year over year.
- Hold for 10 years. Then sell and elect the basis step-up to fair market value. The appreciation on the QOF stake owes zero federal capital gains tax.
What To Know
The 180-day window is unforgiving. Miss it by a day and the entire deferral is gone. The deferred original gain does not vanish either. It is only postponed, and you owe tax on it at a triggering event (a sale of the QOF stake, or a statutory recognition date set in the code). The tax-free treatment only applies to the new appreciation inside the fund, not the old gain you rolled in.
Two more traps. QOFs are illiquid, often 10-year lockups with no secondary market. And the “substantial improvement” test on real estate requires doubling the building’s basis (excluding land) within 30 months, which is why raw land plays and passive buy-and-holds get disqualified. Vet the sponsor hard. A bad operator can turn a tax win into a capital loss that dwarfs the savings.
Contact [email protected] for any questions or corrections.