He Sold His Company for a $20 Million Gain and Owed $4.76 Million. Then He Moved the Gain Into an Opportunity Zone
This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.
A founder in his early 60s sold his software company in the fall of 2026 and booked a $20 million long-term capital gain. For this example, say he and his wife file jointly. At the top federal rates, they would owe about $4.76 million. Section 1400Z-2 offers a different path. If they invest the gain in a qualified opportunity fund (QOF), they can push the tax back five years and reduce the taxable amount by 10%. If they hold the investment for at least 10 years, the fund’s growth can be exempt from federal capital gains tax.
What the Law Actually Says
The core rule says gross income “shall not include so much of such gain as does not exceed the aggregate amount invested by the taxpayer in a qualified opportunity fund during the 180-day period beginning on the date of such sale or exchange”[1] (26 U.S.C. § 1400Z-2(a)(1)(A)). Simply put, you only need to invest the amount of the gain, not the full sale price. If that money goes into a QOF within 180 days, the gain comes off this year’s return. A QOF is a corporation or partnership that holds at least 90%[1] of its assets in qualified opportunity zone property (§ 1400Z-2(d)(1)).
Congress rewrote the section in Public Law 119-21, signed July 4, 2025[1]. For amounts invested after December 31, 2026[1], the deferred gain is taxed in the year that includes the earlier of two dates: the day you sell the fund investment, or “the date which is 5 years after the date the investment in the qualified opportunity fund was made.” If you hold for five years, your basis rises by 10% of the deferred gain. Basis is the amount treated as your cost when figuring taxable gain. That increase is 30%[1] for a qualified rural opportunity fund. After 10 years, you can elect to set your basis equal to the investment’s fair market value when you sell. If you hold longer than 30 years[1], basis is set to the value at the 30-year mark instead.
Who Qualifies and Which Version Applies
- Unrelated buyer: The gain must come from a sale to an unrelated person. For this rule, a buyer counts as related at a 20%[1] ownership link (§ 1400Z-2(e)(2)).
- Equity only: Under Treasury regulations, an eligible interest is an equity stake in a QOF, such as stock or a partnership interest, and “excludes any debt instrument” (26 CFR 1.1400Z2(a)-1(b)(12)). The investment qualifies only after you make the deferral election and notify the IRS on time (§ 1.1400Z2(a)-1(b)(34)).
- Investment date: Money invested on or before December 31, 2026 falls under the original law. Under that version, the deferred gain is taxed in the year that includes the earlier of a sale or December 31, 2026[1] (§ 1400Z-2(b)(1)(B)). The amended rules cover only amounts invested after December 31, 2026[1].
A Worked Example: The $20 Million Founder
Hypothetical: The couple files jointly and has a $20 million long-term gain from a sale in the fall of 2026. They invest that amount in a QOF in early 2027, within the 180-day window. To keep the math simple, the example uses 2026 rates for every year and taxes the whole gain at the top rates.
- No deferral: For 2026, joint filers pay the 20% rate on capital gains above $613,700 of taxable income. The 3.8% net investment income tax applies above $250,000 of modified adjusted gross income. Together, those rates produce about $4,760,000 of tax on the 2026 return.
- Deferral election: The $20 million comes off 2026 income. The couple’s starting basis in the fund is zero.
- Five-year mark (early 2032): Basis rises by $2,000,000, which is 10% of the deferred gain. Assuming the fund is still worth at least $20 million, the taxable amount is $18,000,000. At the same combined rate, the tax is $4,284,000. That comes to $476,000 less than in step 1, and it is paid five years later.
- Year 10 or later: Say the stake is worth $30 million when they sell. With the basis election, the $10 million of growth is free of federal capital gains tax. At these rates, that growth would otherwise cost $2,380,000.
If the fund is worth less than the deferred gain at the five-year mark, the law taxes the lower value instead (§ 1400Z-2(b)(2)(A)(i)).
Where Sellers Get Tripped Up
- Investing in December 2026: Under the original version, gain deferred by a 2026 investment is taxed for the year that includes December 31, 2026[1]. A December investment therefore defers little or nothing and does not start the new five-year clock.
- Counting from the wrong date: The 180 days start on the date of the sale. They do not start on the day the money arrives.
- Tax due without cash from the fund: The five-year tax comes due whether or not the fund has paid out anything. You may need to cover a seven-figure bill from other assets.
- Fund failures: Under existing regulations, losing QOF status (decertification) triggers tax on the deferred gain (§ 1.1400Z2(b)-1(c)(15)). Proposed regulations published September 11, 2026 would add voluntary decertification procedures and new reporting requirements. As of that date, those rules remain proposed. State tax treatment can also differ from federal, so check your state’s guidance.
How It Fits With the Rest of the Plan
Section 1202: If the founder’s shares qualify for the qualified small business stock exclusion, that exclusion may wipe out part of the gain first. In that case, only the remaining taxable gain needs to go into a fund.
Mixed funds: If you put more into the fund than your gain, the law splits it into two separate investments. Only the portion that represents the gain gets the tax benefits (§ 1400Z-2(e)(1)).
Net investment income tax: Deferral also changes which year’s income picks up the gain. That shifts exposure to the 3.8% tax and to other costs that depend on income.
What to Check in Your Own Case
This rule tends to fit sellers with large gains who won’t need the money for a decade and can pay the five-year tax from other assets. The fit is poor if you need cash before then or can’t judge how the fund’s real estate or business will perform. Ask a tax advisor: does my investment date fall before or after January 1, 2027, and which version of Section 1400Z-2 applies to it?
- The sale date on your closing statement, which starts the 180-day clock.
- The investment date on the fund’s subscription documents.
- The fund’s self-certification and its records showing it met the 90% asset test.
- Whether the fund qualifies as a rural fund, which gets the larger 30% basis increase.
- Your state revenue department’s guidance on whether the state follows the federal deferral.
Contact [email protected] for any questions or corrections.








