How to report an opportunity zone investment: Form 8949 code Z and Form 8997, line by line
Updated 8 min readBy the FundTaxes team
In the year you invest, report the sale normally, then add a separate Form 8949 line for the deferral: code Z in column (f) and the deferred gain as a negative adjustment in column (g). Attach Form 8997, listing the QOF and the deferred gain in Part II, and keep filing Form 8997 every year you hold the investment.
Key takeaways
- The deferral is its own Form 8949 row, in the same part (short-term or long-term) as the gain it defers.
- Gains reported on Form 4797 (§1231) still get their deferral row on Form 8949.
- Form 8997 goes with your return every year you own a QOF interest, even in years with no new deferral.
- Consumer tax software has historically handled code Z unevenly; check the forms before you file.
The year of the gain
- Report the sale as you normally would: on Form 8949 for stock, crypto and most capital assets, or on Form 4797 for §1231 property. The full gain appears.
- Add a deferral row on Form 8949, in the same part as the gain (Part I short-term, Part II long-term). Enter code Z in column (f) and the amount you invested, up to the gain, as a negative number in column (g). Identify the QOF and the date you invested as the Form 8949 instructions direct.
- Carry the totals to Schedule D. The deferral row offsets the gain, so only undeferred gain is taxed.
- Attach Form 8997. Part II lists each QOF investment made this year: the fund’s name and EIN, the investment date, and the deferred gain, with whether it is short-term or long-term.
Every year after
File Form 8997 with your return for every year you hold a QOF interest. Part I shows what you held on January 1, Part III what you disposed of or included during the year, and Part IV what you hold at year end. The fund does not file Form 8997 for you; the K-1 or 1099 it sends you is not enough on its own.
The year the deferral ends
For OZ 1.0 investments that year is 2026: the remaining gain is included on December 31, 2026, reported on Form 8949 and Schedule D and shown in Part III of Form 8997. The 2026 inclusion guide walks through the amount. For OZ 2.0 investments it is five years after you invest, or an earlier sale.
Tax software
Forum threads in the TurboTax and Intuit professional communities show the same problems year after year: code Z not offered for a gain that came from Form 4797, Form 8997 totals not matching, and overrides that block e-filing. Before you file:
- open the actual Form 8949 and check the code Z row is there, in the right part, with a negative adjustment;
- check that Schedule D shows the net gain, not the full gain;
- check Form 8997 is attached and Part II matches your investment;
- if the software cannot produce the forms, have a preparer who handles QOF returns file it. Find an OZ CPA.
Common mistakes
- Deferring more than the gain, or deferring gain that is ordinary income (such as §1245 recapture).
- Investing after the 180th day from the start date you claim.
- Forgetting Form 8997 in years with no new deferral.
- Reporting a K-1 gain’s deferral when the partnership already made the deferral election at the entity level.
Frequently asked questions
General information as of October 10, 2026, not tax, legal or investment advice. Rules change and may not fit your facts; confirm with a qualified adviser before you act.
Sources
Reviewed October 10, 2026 against the Internal Revenue Code, Treasury regulations and IRS guidance. Machine-readable version: Markdown.
Run the tests on your own fund
FundTaxes works out the 90% test, each QOZB’s tests and every investor’s inclusion, and fills the Form 8996 and 8997 worksheets. From $49 per fund per month. The Fund plan starts with a 14-day free trial: a card is required and nothing is charged for 14 days. Business compliance is free during launch, with no card.
More guides
What is a qualified opportunity fund? QOF rules, benefits and the 180-day clock
Updated Oct 10, 2026, 9 min read
Can you start your own opportunity zone fund? Single-asset QOFs, LLCs and the traps
Updated Oct 10, 2026, 9 min read
Opportunity Zones 2.0: every change from the One Big Beautiful Bill Act, and the 2027 map
Updated Nov 15, 2026, 10 min read