The short answer
Only the gain has to go in. Section 1400Z-2(a)(1) defers as much of an eligible gain as you invest in a qualified opportunity fund during the 180 days that start on the sale date, so the part of the price that was your basis stays yours to spend without tax. You can invest more than the gain, but the extra dollars are a separate, non-qualifying investment with none of the deferral or ten-year benefits. That is the reverse of a 1031 exchange, where full deferral means reinvesting the whole net sale price, not the gain.
At a glance
| What must be invested | The eligible gain, up to the full gain; never the sale price |
|---|---|
| Window | 180 days, starting on the day the gain would be recognized |
| Partial investment | Defers only the part invested; the rest is taxed in the year of sale |
| Dollars beyond the gain | A separate non-qualifying investment with no deferral and no ten-year election |
| Tracing | Not required; the cash can come from any source |
| Which gain counts | Capital gain and qualified 1231 gain; ordinary recapture does not |
| 1031 contrast | Full deferral needs the whole net price reinvested in real property |
| Reporting | Form 8949 with code Z, plus Form 8997 every year you hold the fund |
The statute measures the deferral by the gain you invest, so the sale price never enters the test
Section 1400Z-2(a)(1)(A) excludes from gross income '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.' The cap is the gain. Nothing in the rule refers to the amount realized, the equity you walked away with or the debt you paid off.
The IRS opportunity zone FAQs put it the same way in Q13: if you invest only part of an eligible gain, you defer only the part you invested. The rest of the gain is reported in the year of sale like any other gain.
The dollars do not have to be the sale proceeds themselves. The Instructions for Form 8949 say you do not need to trace or allocate the funds invested in a fund to the specific gain being deferred, as long as the investment falls inside the 180-day period. Cash from savings works as well as cash from the closing.
Your basis, the part of the price that was never gain, is simply returned capital. It was not going to be taxed, so there is nothing to defer and no reason for it to go into the fund.
Investing more than the gain is allowed, but the extra dollars carry none of the tax benefits
When only part of an investment represents deferred gain, section 1400Z-2(e)(1) splits it into two investments: one holding the amounts covered by the deferral election and one holding everything else. The deferral, the five-year basis increase and the ten-year election apply only to the first.
The IRS calls the second piece a non-qualifying investment, and a person holding both kinds in the same fund holds a mixed-funds investment, as Q29 of the opportunity zone FAQs explains. At a sale after ten years, Q25 limits the fair market value basis election to the qualifying portion, so appreciation on the extra dollars is taxed in the normal way.
There can still be reasons to put in more, such as meeting a fund minimum or wanting more exposure to the project. Just size it knowing that only the gain-funded slice gets the ten-year exclusion.
A hypothetical $2,000,000 rental sale needs $800,000 in the fund, not $2,000,000
Take a hypothetical rental sold for $2,000,000 after selling costs, with an adjusted basis of $1,200,000. The gain is $800,000: $300,000 of it is straight-line building depreciation, which is unrecaptured section 1250 gain, and $500,000 is appreciation. Both layers sit inside the section 1231 gain and are eligible, because the regulation excludes only amounts treated as ordinary income.
Investing $800,000 in a qualified opportunity fund within 180 days defers the whole gain. The other $1,200,000 is returned basis and can be spent, saved or put into anything else, tax-free.
Now suppose the property carried a $900,000 mortgage that was paid off at closing, so only $1,100,000 of cash reached the seller. The gain is still $800,000, and the full deferral still needs $800,000 invested. Because tracing is not required, the seller could invest $800,000 of the $1,100,000, or combine closing cash with other savings.
A full 1031 exchange of the same sale would need replacement real property costing at least $2,000,000, with the whole $1,100,000 of equity reinvested and the retired debt replaced by new debt or added cash. Every figure above is a round hypothetical; confirm your own with your CPA before you act.
The gain you invest keeps its character and comes back into income on a fixed schedule
Deferral is not forgiveness. Under Reg. Section 1.1400Z2(a)-1(c)(1) the gain carries the same attributes when it is later included, so a long-term gain stays long-term and unrecaptured section 1250 gain keeps its 25% ceiling.
When it comes back depends on when you invested. Money invested on or before December 31, 2026 is included in the tax year that contains that date; money invested after it is included at the earlier of a sale or five years from the investment date, with a 10%% basis increase at year five. The comparison is set out in deferral length for 2026 versus 2027 investments.
Ordinary income is the one part of a property gain that cannot go in at all. If a cost segregation study or equipment produced section 1245 recapture, that slice is taxed now; the split is explained in putting depreciation recapture into a fund.
Choose between the fund and an exchange by deciding what you want your basis to do
The fund lets you keep your basis in cash and still defer the gain. An exchange keeps all of the equity in real estate and defers the gain, including the ordinary recapture layers, for as long as you keep exchanging. Section 1031 applies only to real property, and a fund interest is not real property, so exchange proceeds cannot buy one; see 1031 funds into an opportunity zone fund.
The two can be combined. A seller can exchange most of the equity into a Delaware Statutory Trust and put the gain portion of any cash boot into a fund, and the trade-offs between deferring, excluding and paying are laid out in 1031 versus opportunity zone versus paying the tax.
A fund carries real risk. It is illiquid for years, often concentrated in one project and can lose value; the statute limits the gain later included to the investment's fair market value if that is lower, but that is no protection for the capital itself. Our opportunity zone page describes how we approach fund access.
Related questions
Do I have to invest the actual dollars from my closing?
No. The Form 8949 instructions say you do not need to trace the money invested to the gain being deferred; what matters is that the cash goes in during the 180-day window in exchange for an equity interest in the fund.
Can I invest only part of my gain?
Yes. You elect to defer only the amount you invest, and the rest of the gain is taxed in the year of sale, as Q13 of the IRS opportunity zone FAQs states.
What if my gain is larger than the cash I received?
That happens when a mortgage is paid off at closing. You still need to invest the gain itself to defer all of it, and you may use other cash to do so.
Is depreciation recapture part of the gain I invest?
Unrecaptured section 1250 gain is capital gain and can be invested; ordinary recapture under section 1245 cannot. See depreciation recapture into a fund for the split.
How do I report the investment?
Report the sale as usual, then add a separate Form 8949 row with the fund's EIN, the investment date, code Z and the deferred amount as a negative number, and file Form 8997 each year you hold the interest.
Sources
Checked against these publications on September 30, 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.
- 26 U.S.C. Section 1400Z-2, special rules for capital gains invested in opportunity zones
- Treas. Reg. Section 1.1400Z2(a)-1, deferring tax on capital gains
- IRS, Opportunity zones frequently asked questions
- IRS, Instructions for Form 8949 (2025)
- IRS, Form 8997, initial and annual statement of QOF investments
- 26 U.S.C. Section 1031, exchange of real property
