QOZ Gain Deferral: How It Works
Defer capital gains tax by investing in a Qualified Opportunity Fund. Learn the 180-day rule, code Z reporting, the Dec 31 2026 end date, and 2027 changes.

How QOZ Gain Deferral Works
Sold a rental home, a business stake, or a winning stock? A big capital gains bill may now be due. A Qualified Opportunity Zone, or QOZ, can push the bill back by years. The idea is simple. You put the exact gain into a Qualified Opportunity Fund (QOF) within 180 days. Then you claim the deferral on your tax return.
The tax is not forgiven. It comes due when you sell the fund investment. If you never sell, it comes due on December 31, 2026. That 2026 date matters right now. The original deferral program ends this year. A new permanent version starts on January 1, 2027. That update came from the One Big Beautiful Bill Act changes.
This guide walks through the whole process with real numbers. You will see which gains qualify and how the 180-day clock runs. You will also learn how to report it with code Z on Form 8949. Every rule below follows IRS opportunity zone guidance.
What a Qualified Opportunity Zone and Fund Are
A Qualified Opportunity Zone is a low-income census tract. A state nominates the tract, and the U.S. Treasury certifies it. The program came from the Tax Cuts and Jobs Act of December 2017. Today, zones cover parts of all 50 states. They also cover the District of Columbia and five U.S. territories.
A Qualified Opportunity Fund is what you invest through. It can be a partnership or a corporation. It certifies itself by filing Form 8996 with its federal return. After that, 90 percent of its assets must sit in zone property.
You do not need to live or work inside a zone. You invest an eligible gain in a certified fund. Then you make the deferral choice. The fund then handles the zone investments on the ground. Those projects range from apartment buildings to small business expansion.
The Three Tax Benefits at a Glance
The program stacks three separate benefits. First comes deferral. You delay tax on the gain you roll into the fund. Second is a possible basis cut. It trims the deferred gain after a five-year or seven-year hold. Third is the big one. Hold the fund for ten years and make the election. Every dollar of fund growth then becomes tax-free.
Timing changes the math here. The table below shows the difference. It compares a 2026 investment with a later one.
| Benefit | Gain invested in 2026 | Gain invested in 2027 or later |
|---|---|---|
| Tax deferral | Until December 31, 2026, or the date you sell | Until you sell the fund |
| Basis cut at 5 years | Not reachable, the deferral ends first | 10 percent of the deferred gain, 30 percent in rural funds |
| 10-year exclusion | Yes, full fair-market step-up on fund growth | Yes, and the election window now runs 30 years |
One row deserves a second look. A 2026 deferral buys only a short wait. The deferred gain becomes taxable on your 2026 return. The 2027 rules restore real runway for long holds.
Which Gains Qualify for Deferral
Not every dollar of profit makes the cut. The IRS applies three tests to each gain. It must be a capital gain or net Section 1231 gain. It must come from a sale or exchange with an unrelated party. It must land on your return before January 1, 2027.
Many common sales pass all three tests. Stocks, bonds, mutual funds, business interests, and even crypto can qualify. Gains passed to you on a Schedule K-1 count as well. Installment sale payments also work, and each payment starts its own fresh 180-day clock.
Some gains never qualify. A sale to a related party is out from the start. That covers a spouse, a sibling, or a company you control. Want to defer only part of a large gain? That works fine, and you elect on the portion you actually invest. Our guide to reporting stock sales on Form 8949 shows how that row works.
How the 180-Day Investment Window Runs
The clock starts on the day the gain would land on your return. Sell stock on October 12, 2026, and your window closes around April 10, 2027. Yes, you can fund the investment in early 2027. You can still defer a 2026 gain that way. The election rides on your 2026 return either way.
Owners of partnership or S corporation interests get a choice of start dates. You can begin the clock on the entity's sale date. You can also use the last day of the entity's tax year. A third option is the day your K-1 arrives. Capital gain dividends from REITs and funds work the same way. You can pick the payout date or year-end.
The cash must buy an equity stake in the fund, not a loan to it. A partial investment simply means partial deferral. You also do not need to trace specific dollars to a specific sale. The amount invested just has to match the gain you elect to defer.
How to Elect the Deferral on Your Return
The election rides on your annual tax return. Pick the return where the gain tax would normally land. For a 2026 sale, that is the return you file in 2027. Five steps cover the whole process.
- Confirm the gain is eligible and mark day 180 on a calendar.
- Choose a certified fund and review its current Form 8996.
- Invest cash for an equity stake and record the fund's EIN.
- Add one Form 8949 row with code Z to elect the deferral.
- Attach Form 8997, the initial statement of your fund investments.
The code Z row is short but easy to get wrong. The Form 8949 instructions spell out every column. This table sums them up.
| Form 8949 column | What to enter on the code Z row |
|---|---|
| Column (a) | The EIN of the Qualified Opportunity Fund |
| Column (b) | The date you invested in the fund |
| Columns (c), (d), and (e) | Leave all three blank |
| Column (f) | The letter Z |
| Column (g) | The deferred gain as a negative number in parentheses |
Your original sale stays on its own normal row with no deferral adjustment. Long-term deferrals belong in Part II. Short-term ones go in Part I. Multiple investments get separate rows. One row goes to each date and each fund.
Worked Example: Deferring a $60,000 Stock Gain
Maya sells 400 shares on October 12, 2026, for $110,000. Her basis is $50,000, so she faces a $60,000 long-term gain. Her 180-day window runs to about April 10, 2027. She moves within weeks.
On December 5, 2026, Maya invests the full $60,000 in a certified fund. She files her 2026 return in spring 2027. Two Form 8949 rows appear on it. The sale row shows the usual proceeds, basis, and gain in Part II. A second row shows the fund's EIN and the December 5 date. It carries code Z and ($60,000) in column (g).
The old program ends on December 31, 2026. So her deferred gain becomes taxable on that same 2026 return. She reports it with code Y as a positive amount. The gain keeps its long-term character. The trade still pays off. Maya now holds a fund share she can keep for ten years. An election at sale makes all future fund growth tax-free.
When the Deferred Gain Comes Due
Under the 2026 rules, the calendar does most of the deciding. The deferred gain is included in income on the earlier of two dates. One is December 31, 2026. The other is an inclusion event. Those events include selling your fund interest. A fund liquidation counts too. So does gifting the investment. Even payouts above your basis can trigger it.
The taxable amount depends on two things. One is what your fund stake is worth at the event. The other is your basis adjustments. The gain keeps its original character. A deferred long-term gain stays long-term. Report the inclusion with code Y on Form 8949. Then update Form 8997 for the year.
One small group still earns a discount this year. Gains deferred during 2021 reach their five-year mark on December 31, 2026. That locks in the 10 percent basis cut. The cut trims what gets taxed on the 2026 return. Gains deferred in 2022 or later get no such cut. Their deferral always ends first. Facing a tight tax year? The 0 percent capital gains bracket may soak up part of the inclusion.
What Changes in 2027 Under the Permanent Program
The One Big Beautiful Bill Act changed that for good. Congress signed it in July 2025. Section 70421 makes Opportunity Zones permanent. It also sets up rolling ten-year designations. New zone maps take effect on January 1, 2027, with new maps every five years. Rural areas finally get a clear definition too.
The new rules apply to money invested in funds after December 31, 2026. Deferral no longer dies on a fixed date. It now runs until you sell the fund. A basis cut returns as well. Hold the fund for five years and 10 percent of the deferred gain disappears. A qualified rural fund cuts 30 percent. The ten-year fair-market step-up survives. The election window now stretches to 30 years.
Reporting duties grow on both sides. Funds file annual information returns under new Section 6039K. Investors keep sending in Form 8997 each year. The full statute is public on govinfo.gov if you want the section as written.
Common Mistakes That Cost the Deferral
The most expensive error is missing the 180-day deadline. Mark the sale date first. Then mark day 180 on a real calendar. The IRS offers no grace period for forgetting. The fund's paperwork cannot fix a late deposit either.
Another frequent failure is investing the wrong way. The gain must buy equity in a certified fund. It cannot fund a loan, and it cannot buy a building inside the zone directly. Buying QOZ real estate yourself triggers zero deferral. A related-party sale never qualifies.
People also mistake deferral for forgiveness. A 2026 deferral only shifts the tax onto your 2026 return, filed in 2027. Plan the cash for it now. Skipping Form 8997 is another silent error. That form tracks each fund investment every year. Finally, large cash payouts from the fund can act as inclusion events. Read the fund's paperwork before you count on the cash flow.
QOZ Deferral Compared With a 1031 Exchange
Both tools delay capital gains tax, but they solve different problems. A 1031 exchange applies only to real property held for business or investment. The replacement must be like-kind real estate. There is no cap on the deferred gain. There is no December deadline either.
A QOZ deferral works on almost any eligible capital gain. That includes stocks, business interests, and crypto. The two can even work together. You could complete a 1031 exchange on the real estate part. Leftover gains can then go into a fund. Only the QOZ route adds the ten-year exclusion. Want the baseline numbers first? Our stock capital gains calculator shows the tax due before either strategy starts.
The Bottom Line on QOZ Gain Deferral
Deferral is a timing play, not a magic eraser. In 2026, you trade a short delay for a shot at the ten-year exclusion. That exclusion is where the real money sits. The steps are short. Invest the gain inside 180 days, file the code Z row, and attach Form 8997. Then plan for the December 31, 2026 inclusion on your 2026 return.
From 2027, the permanent program brings longer deferral and a basis cut at year five. The ten-year exclusion stays in place under both regimes. Either way, the math starts with your exact gain. Run the sale through our capital gains tax calculator before you commit. Then keep every fund document with your tax records.
Wasim Akram
Wasim researches and writes every article on TaxGainsCalc, covering capital gains tax for everyday investors. Every figure is checked against primary IRS sources before it goes live.


