The short answer
Only the part that is capital gain. The value taxed when restricted shares vest or a nonstatutory option is exercised is compensation under section 83 and appears as wages, and Reg. section 1.1400Z2(a)-1(b)(11) admits only capital gain and qualified 1231 gain. What a fund can take is the gain when you later sell the shares above a basis that already includes the wage amount. For incentive stock options sold after the two-year and one-year holding periods, the whole gain is capital gain; a disqualifying sale splits into wages and capital gain. The 180 days run from the trade date of the sale.
At a glance
| Wage portion | Value taxed at vesting, exercise or a disqualifying sale; never eligible |
|---|---|
| Eligible portion | Sale price minus basis, where basis includes the amount taxed as wages |
| Holding period | Starts when the shares are vested or the option is exercised; short-term gain still qualifies |
| Incentive options | Held two years from grant and one year from exercise: entire gain is capital |
| Disqualifying sale | Wages up to the spread at exercise; only the excess is capital gain |
| Discounted ESPP shares | A compensation slice applies even after the holding period is met |
| Clock | 180 days from the trade date of the share sale |
The amount taxed as pay is compensation, and compensation is never eligible gain
Section 83(a) includes in gross income the fair market value of property transferred in connection with services, less anything you paid, in the first year your rights are transferable or no longer subject to a substantial risk of forfeiture. Publication 525 applies this to restricted property and to nonstatutory options without a readily determinable value, which produce income at exercise equal to the value received over the price paid.
That income is pay. Your employer reports it as wages, and it is ordinary income however long you then hold the shares. The regulation's definition of eligible gain takes only gain treated as capital gain or qualified 1231 gain, so the wage amount cannot be invested and deferred, whether you hold the shares or sell them the same day.
Restricted stock units work the same way once the shares are delivered: their value at that point is compensation, typically with shares withheld to cover tax. The deferral question arises only on what the shares do after that.
The gain after vesting or exercise is capital gain, and that part qualifies
Publication 525 says your basis in stock acquired under a nonstatutory option is the amount you paid plus any amount included in income on grant or exercise, and the same logic applies to restricted property you included as compensation. Selling above that basis produces capital gain, long-term if held more than a year.
That gain is eligible gain like any other stock gain, provided the buyer is not a related person. A sale on a public exchange is not to a related person; a company buyback or private tender offer is to the company, which is related to you only if you own more than 20% of it after attribution, as a sale to a family member or business partner explains.
Short-term gain counts too, and it returns as short-term gain when the deferral ends. Stock and crypto gains in a fund covers the trade-date rule, and the Form 8949 instructions cover the separate code Z row that reports the deferral.
Incentive options and discounted ESPP shares depend on how long you held them
Section 422(a) gives incentive stock option shares their special treatment only if you do not dispose of them within two years of the grant or within one year of the transfer to you. Publication 525 says that if you meet the holding period, your whole gain on sale is capital gain, with basis equal to what you paid, so the entire gain is eligible.
If you sell earlier, the gain is wages up to the amount by which the stock's value at exercise exceeded the option price, and only the rest is capital gain; Publication 525's own example splits a $500 gain into $200 of wages and $300 of capital gain. The alternative minimum tax adjustment at exercise is a separate matter that a fund does not touch.
For employee stock purchase plan shares bought at a discount, Publication 525 requires compensation income even after the holding period is met, equal to the lesser of the discount at grant or the gain on disposal. Only gain above that compensation is capital gain and eligible.
Hypothetical: $500,000 of RSU wages, $400,000 of eligible gain
Round, hypothetical figures. On March 1, 2026, 10,000 restricted stock units settle into shares worth $50 each. You report $500,000 of wages for 2026 and your basis is $500,000. On March 15, 2027 you sell all 10,000 shares at $90, a $400,000 long-term capital gain.
The $500,000 stayed on your 2026 return and nothing can move it. The $400,000 is eligible: invest it in a qualified opportunity fund by September 10, 2027, counting March 15 as day one, and it leaves your 2027 return, returning under the five-year rule in section 1400Z-2(b) as rewritten by Public Law 119-21.
The fund interest is private and illiquid and can lose value, and a concentrated position in your employer's shares is often why people sell in the first place; putting the gain into one fund replaces one concentration with another. You need only invest the gain you choose to defer, so size it with your CPA and your planner together.
What the fund cannot fix, and where to look instead
Vesting income lands in the year the shares vest, often with little cash after withholding. A qualified opportunity fund does nothing for that year, and neither does a bonus depreciation fund for most employees, because its loss is passive and cannot offset wages; depreciation for high-income earners sets out why.
Losses on other positions do not shrink the gain you may defer, which helps if the employer stock rose while the rest of the portfolio fell; whether stock losses reduce the eligible gain shows how to split the election. If the sale is one piece of a larger plan to diversify, stock and crypto gains covers the full path from sale to fund.
Timing matters on the sale side too. If you are deciding between selling in late 2026 and early 2027, the deferral period differs by investment date, as the deferral length for 2026 versus 2027 explains, and your 180 days can straddle the change.
Related questions
Can I defer the income shown on my W-2 from RSU vesting?
No. It is compensation, not gain from a sale, so it is outside eligible gain entirely. Only later appreciation realized on a sale of the shares can be deferred.
Does an 83(b) election change what I can defer?
It moves the compensation to the year of transfer, at the value then, and Publication 525 says later appreciation is generally not compensation. More of the eventual sale is capital gain, and that gain is eligible.
I sold shares to cover taxes the day they vested. Is there anything to defer?
Usually very little. The sale price is close to the basis set by the wage amount, so the gain, if any, is small and short-term.
My company was acquired for cash. Is my gain eligible?
The part that is capital gain on shares you already owned is eligible, provided you are not related to the buyer. Cash paid to cancel unvested awards or options is generally compensation; confirm the split on your Form W-2 and Form 1099-B.
My shares sell monthly under a trading plan. How do the windows work?
Each sale starts its own 180-day window on its trade date. One fund investment made while several windows are open can cover the gains from all of those sales, and each deferral gets its own code Z row.
Sources
Checked against these publications on October 8, 2026. Rules and figures change; confirm the current version with your CPA or attorney before you act. This page is general information, not tax or legal advice.
- Reg. section 1.1400Z2(a)-1, Deferring tax on capital gains by investing in opportunity zones
- 26 U.S. Code section 1400Z-2, Special rules for capital gains invested in opportunity zones
- Public Law 119-21, section 70421 (opportunity zone amendments)
- 26 U.S. Code section 83, Property transferred in connection with performance of services
- 26 U.S. Code section 422, Incentive stock options
- IRS, Publication 525, Taxable and Nontaxable Income
- IRS, Instructions for Form 8949
