# How to report an opportunity zone investment: Form 8949 code Z and Form 8997, line by line

Source: https://fundtaxes.com/blog/how-to-report-opportunity-zone-investment
Published: 2026-10-10 · Updated: 2026-10-10 · Publisher: FundTaxes

> **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

1. **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.
2. **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.
3. **Carry the totals to Schedule D.** The deferral row offsets the gain, so only undeferred gain is taxed.
4. **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.

> Interactive worksheet: enter what you sold, the sale date, proceeds, basis, the QOF name, the investment date and the amount deferred to see the Form 8949 sale and code Z rows, the net gain, the Form 8997 Part II entry and a 180-day check. Use it at https://fundtaxes.com/blog/how-to-report-opportunity-zone-investment

## 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](https://fundtaxes.com/blog/opportunity-zone-2026-inclusion-form-8997) 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](https://fundtaxes.com/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

### How do I report a QOF deferral on Form 8949?

Report the sale normally, then add a separate row in the same part with code Z in column (f) and the deferred amount as a negative number in column (g). Schedule D then reflects only the undeferred gain.

### What is Form 8949 code Z?

Code Z is the adjustment code for electing to defer an eligible gain by investing it in a qualified opportunity fund.

### Do I file Form 8997 every year?

Yes, every year you hold an investment in a QOF, whether or not you deferred a new gain that year.

### How do I defer a §1231 gain reported on Form 4797?

Report the sale on Form 4797 as usual; the deferral itself goes on Form 8949 as a code Z row, and the result flows to Schedule D.

### Does TurboTax support opportunity zone deferrals?

Support has varied by version and year, and forum users have reported problems with code Z and Form 8997. Check the generated forms before filing, or use a preparer who files QOF returns.

## Sources

- [IRS: Instructions for Form 8949](https://www.irs.gov/instructions/i8949)
- [IRS: About Form 8997](https://www.irs.gov/forms-pubs/about-form-8997)
- [Treas. Reg. §1.1400Z2(a)-1, eligible gains and the 180-day period (Cornell LII)](https://www.law.cornell.edu/cfr/text/26/1.1400Z2(a)-1)
- [IRS: Invest in a Qualified Opportunity Fund](https://www.irs.gov/credits-deductions/businesses/invest-in-a-qualified-opportunity-fund)
- [Intuit Accountants Community: reporting deferred gain into a QOF from Form 4797](https://accountants.intuit.com/community/tax-talk/discussion/how-to-report-deferred-gain-going-into-qualified-opportunity/00/1831)

_FundTaxes guides are general information, not tax or legal advice._