Updated October 17, 2026. Quick answer: Code Z on Form 8949 is for electing to defer eligible gain by investing it in a qualified opportunity fund (QOF). The instructions say the deferral gets “its own row of Form 8949”, with code Z in column (f) and the deferred gain in column (g) as a negative number.
What code Z means
The Form 8949 instructions describe the code Z situation: “electing to postpone all or part of your gain under the rules explained in the Schedule D instructions for investments in QOFs”. Those Schedule D rules start with “If you have an eligible gain, you can invest that gain in a QOF and elect to defer part or all of the gain that you would otherwise include in income until you sell or exchange the investment in the QOF or December 31, 2026, whichever is earlier.” Later, when the deferred gain is recognized, you use code Y, explained on Form 8949 code Y.
Report the gain first, then the deferral
The deferral does not replace the original sale. The instructions say “If you elect to defer tax on an eligible gain by investing in a QOF , report the eligible gain on the form and in the manner otherwise instructed.” For an individual, “individual taxpayers would report gain from the sale of stock on Form 8949 and Schedule D (Form 1040).” One point trips people up: “If the gain is reported on Form 8949, do not make any adjustments for the deferral in column (g).”
The Schedule D instructions give the same two-part direction: “Report the eligible gain as you normally would on Schedule D.” “See the Form 8949 instructions for how to report the deferral.” The sale itself is the kind of row covered on the Form 1099-B proceeds and basis page.
What to enter on the code Z row
The deferral goes on its own row. “Report the deferral of the eligible gain on its own row of Form 8949 in Part I with box C or box I checked or Part II with box F or box L checked (depending on whether the gain being deferred is short term or long term).” Where there are several investments, “If you made multiple investments in different QOFs or in the same QOF on different dates, use a separate row for each investment.” “If you invested eligible gains of the same character (but from different transactions) on the same date into the same QOF , you can group those investments on the same row.”
The columns follow. “In column (a), enter only the employer identification number (EIN) of the QOF into which you invested.” “In column (b), enter the date you invested in the QOF .” “Leave columns (c), (d), and (e) blank.” “Enter code “Z” in column (f) and the amount of the deferred gain as a negative number (in parentheses) in column (g).” The box choices are explained in the box A to L guide.
As an illustration, not an IRS example: suppose $40,000 of eligible gain is invested in a QOF within the allowed period. The deferral row shows ($40,000) in column (g), a negative number in parentheses, with Z in column (f).
The investment window and the gain being deferred
The instructions allow a mix of gain types: “Your investment in a QOF can be used to defer only long-term gain, only short-term gain, or a combination of both short-term and long-term gain.” Tracing is not required, but timing is: “You do not need to trace or allocate the funds invested in a QOF to the specific gain being deferred, but the investment in the QOF must have occurred within the 180day period beginning on the date the deferred gain was realized.” On character, “The character of the eligible gain will survive the investment in the QOF .”
Gains from section 1231 property
The instructions give a separate route for gains from installment sales, like-kind exchanges and other section 1231 property. They say that taxpayers deferring those gains “must report the deferral election on Form 8949 in the tax year of the deferral.” “Each QOF investment of section 1231 gains will use two separate rows in Part II (long-term transactions) of Form 8949.” The first row is a description row using code O, covered on Form 8949 code O. The second row is the code Z row: “For the second row, in column (a), enter only the EIN of the QOF investment.”
Attachments and forms that go with it
If you file more than one Form 8949, “attach the Form(s) 8949 that lists code “Z” in column (f) first.” The instructions also say “you will need to complete a Form 8997 for each year you hold the investment and for the year you dispose of the investment.”
Setting up the row
Columns (f) and (g) work as a pair. “In order to explain any adjustment to gain (or loss) in column (g), enter the appropriate code(s) in column (f).” The dollar side is described this way: “Enter in this column any necessary adjustments to gain (or loss). Enter negative amounts in parentheses.” Most rows need neither: “For most transactions, you don’t need to complete columns (f) and (g) and can leave them blank.”
If a row needs more than one code, the instructions say “Don’t separate the codes by a space or comma.” They also give the rule for the dollar amount: “If you entered more than one code in column (f) on the same row, enter the net adjustment in column (g).”
Where it goes next
Column (h) is where the adjustment lands. The instructions say “First, subtract the cost or other basis in column (e) from the proceeds (sales price) in column (d). Then take into account any adjustments in column (g). Enter the gain (or loss) in column (h).”
The row then flows to the summary. “The total of the amounts in column (h) of line 2 of all your Forms 8949 should equal the amount you get by combining columns (d), (e), and (g) on the corresponding line of Schedule D (Form 1040).” The Schedule D page explains the lines that total comes from, and the Form 8949 instructions page covers the form as a whole.
Edition and line numbers
This page reads the 2025 Form 8949 and its 2025 instructions, along with the 2025 Instructions for Schedule D (Form 1040) (and Publication 550 for 2025 returns where it is cited), the current files irs.gov served on 2026-10-17. They are the forms for the tax year 2025 return, filed in 2026. Check the tax year printed on the form you are filling in and use the column letters and codes on that year’s form, because a different year’s form can letter its columns or word its codes differently.
Common mistakes
- Reducing the original gain in column (g). The instructions say “do not make any adjustments for the deferral in column (g)” on the row that reports the sale; the deferral has its own row.
- Filling in the sale columns on the deferral row. The instructions say “Leave columns (c), (d), and (e) blank.”
- Entering the deferred gain as a positive number. For code Z the instructions say “the amount of the deferred gain as a negative number (in parentheses) in column (g).”
Related: Form 8949 code Y, Form 1099-B proceeds and basis, Capital gains tax calculator, Form 8949 instructions, and Schedule D.
Find the right next step for your situation
About how much do you have invested? Pick the range that fits; your next step appears immediately below.
Talk to an advisor about deferring capital gains
For U.S. investors with $250,000 or more in investable assets. WiserAdvisor is an independent service matching you with 2 to 3 vetted advisers. Its form asks for your ZIP code and answers to a few questions; a match is not guaranteed.
Free to request, with no obligation to hire. By submitting, you consent to calls, texts and emails from WiserAdvisor and up to three advisers. Advisers pay for introductions.
Clear Money Guide may earn a referral payment for a qualifying completed form. An introduction is not a Clear Money Guide recommendation.
Opens on WiserAdvisor’s site in a new tab.
Get a free guide to capital gains planning
Price the destination before you decide. The matching service below introduces you to advisers who pay to meet you.
Before you start, what actually happens. The form is run by Kapitalwise, our advisor-matching partner. Kapitalwise sends your details to advisers who pay for the introduction, so expect calls and texts. Clear Money Guide may earn a referral payment for a qualifying submitted form, whether or not you ever hire anyone. This is free to you and there is no obligation to hire anyone.
The Kapitalwise form opens here; you stay on this page.
What happens when you press the button
It asks about nine questions: age, investable assets, location; then your name, email and phone number, and verifies the phone by text. Nothing loads and nothing reaches Kapitalwise until you press the button.
Prefer flat-fee or hourly pricing instead? Compare ranges here.
Answer againSources
- Instructions for Form 8949 (2025): https://www.irs.gov/pub/irs-pdf/i8949.pdf
- Instructions for Schedule D (Form 1040) (2025): https://www.irs.gov/pub/irs-pdf/i1040sd.pdf
Read from the IRS documents linked above on October 17, 2026. General information, not tax advice. Your own facts decide the outcome, and a preparer, the account provider or the IRS is the right place to confirm anything consequential.