You're filling out Form 8949. There's a letter in column (f) on one of the rows — or there's supposed to be — and you need to know what it means. This is the lookup table, not a dissertation.
Every Form 8949 code is a single letter (or a short combination) that tells the IRS why you're adjusting the raw math on that transaction row. The IRS publishes the full list in the Form 8949 instructions. Below is every code, in one place, with the real-world scenario that usually triggers it.
Form 8949 Codes: Complete Reference Table
Tired of reading?
Upload your 1099-B PDF and get CSV/TXF in 30 seconds. Free preview, $4.99 to download.
| Code | What it means | When you use it | Amount in column (g) |
|---|---|---|---|
| B | Broker-reported cost basis is incorrect | RSU or ESPP sale where basis is too low; broker transfer with lost basis | Signed — negative if broker reported basis too low, positive if too high |
| W | Wash sale — loss disallowed | You sold at a loss and bought a substantially identical security within 30 days before or after | Positive — the amount of loss disallowed |
| T | Holding period (short/long-term) reported by broker is wrong | Broker classified a position as short-term when you actually held it more than a year (or vice versa) | Zero (code alone corrects classification) |
| N | You're a nominee — someone else owned the asset | 1099-B issued to you but another person held the economic interest (joint or custodial accounts) | Adjustment reflects the portion belonging to the other party |
| H | Sale of your main home — exclude qualifying gain | Section 121 primary residence sale up to $250k single / $500k married | Negative — the excluded portion of the gain |
| D | Accrued market discount on a debt instrument | Bond sold with accrued market discount | Negative — the accrued discount portion |
| Q | Qualified Small Business Stock exclusion (Section 1202) | Held QSBS more than 5 years and excluding gain | Negative — the excluded gain |
| X | Qualified Opportunity Fund gain deferral | You rolled the gain into a QOF within 180 days | Negative — the deferred gain |
| R | Rollover gain on an empowerment zone asset | Empowerment zone asset rollover | Negative — the deferred gain |
| L | Nondeductible loss (related party, personal use) | Sale to a related party, sale of personal-use property at a loss | Positive — the disallowed loss |
| E | Selling expenses or option premium not reflected | Commissions, fees, or option premium not included in basis or proceeds | Signed — increases loss (negative) or reduces gain |
| S | Ordinary loss on Section 1244 small business stock | Losses on qualified small business stock treated as ordinary | See Form 4797 instructions |
| C | Collectibles (28% rate gain) | Art, coins, precious metals, and similar | Zero (the code triggers the 28% rate) |
| O | Any other adjustment requiring explanation | Catch-all when no other code fits — must include a statement | Signed — whatever the correction requires |
| M | Multiple transactions summarized on one row | You're reporting totals instead of individual rows | Zero (or net adjustment if any) |
You can combine codes when more than one applies. The IRS accepts multi-letter codes like BW (wrong basis plus wash sale), TO (wrong holding period plus other adjustment), or EL (selling expenses plus nondeductible loss). Enter them together in column (f) with a single net amount in column (g).
The Codes You'll Actually Hit
Most people only encounter two or three codes. Here's the short version of what drives the common ones:
Code W (Wash Sale) — you sold a security at a loss and bought a substantially identical one within 61 days (30 days before or after). Your broker usually pre-populates this on the 1099-B. The disallowed loss amount goes in column (g) as a positive number. For the mechanics and how it gets restored later, see understanding wash sales on a 1099-B.
Code B (Basis Wrong) — the basis the broker reported to the IRS isn't your true basis. This is the RSU and ESPP code. Brokers are prohibited from including W-2 compensation income in the reported basis, so your true basis is usually higher than what's on the 1099-B. Column (g) is negative (lower gain) in the typical case. See the RSU cost basis wrong fix and the ESPP cost basis double-counted fix for step-by-step handling.
Code T (Wrong Term) — the broker classified the sale as short-term when it was actually long-term (or vice versa). Rare, but happens after broker transfers where the acquisition date was lost.
Code N (Nominee) — you received a 1099-B but part of the economic interest belonged to someone else (joint account, custodial account for a minor, shared inheritance). You report the full amount and use code N to back out what belongs to the other party.
Code H (Home Sale) — sold your main home and are excluding gain under Section 121. The excluded portion goes as a negative number in column (g).
Code L (Nondeductible Loss) — losses on sales to related parties and losses on personal-use property are not deductible. Code L backs them out with a positive adjustment in column (g).
Validate Your Codes Automatically
Getting codes wrong is one of the most common reasons the IRS sends a CP2000 — either a wash-sale row missing code W, or a basis adjustment without code B. Our free Form 8949 CSV validator checks for exactly this: paste your CSV and it flags rows with wash sale disallowed amounts missing code W, basis adjustments without code B, and other common mismatches. No signup, runs in your browser, CSV never leaves your machine.
If you want the full treatment of every code — including the signed-amount rules, multi-letter combinations, and walkthroughs of each adjustment — see the complete Form 8949 adjustment codes reference.
What Codes Go Where
Column (f) takes the letter. Column (g) takes the dollar amount. The sign of the amount matters: a positive number in (g) increases the gain (or decreases the loss), a negative number decreases the gain (or increases the loss). The code in (f) explains the why; the number in (g) does the actual math.
If column (f) is blank, column (g) should be blank or zero. You don't enter an adjustment amount without a code — the IRS computer will flag it.
Worked Examples
The fastest way to internalize the codes is to see the math on real-shaped transactions. Here are four common ones — copy the column (g) sign convention exactly.
Example 1 — RSU sale with code B (basis adjustment).
- Proceeds: $10,000, broker-reported basis: $0, holding period: short
- Your true basis from the broker supplement (FMV at vest): $9,500
- Code in column (f): B
- Column (g): −$9,500 (negative — reduces the inflated $10,000 gain)
- Reported gain: $500
This is the canonical RSU correction. Without code B you'd pay capital gains tax on $10,000 of income that was already taxed as W-2 compensation. See the RSU cost basis wrong fix for the step-by-step including where to find the right number.
Example 2 — Wash sale with code W (loss disallowed).
- Proceeds: $5,000, basis: $5,500, raw loss: −$500
- $300 of the loss is disallowed under IRC §1091 (you bought the same security within 30 days)
- Code in column (f): W
- Column (g): +$300 (positive — reduces the loss from $500 to $200)
- Reported loss: $200
The disallowed $300 doesn't disappear; it adds to your replacement lot's basis and recovers when you eventually sell that lot in a non-wash way.
Example 3 — Combined RSU basis + wash sale, code BW.
- Proceeds: $8,000, broker-reported basis: $0
- True basis: $9,000 (creates a $1,000 raw loss after correction)
- $400 of that loss is a wash sale
- Code in column (f): BW
- Column (g): −$8,600 (the net of −$9,000 from B and +$400 from W)
- Reported loss: $600
When two adjustments hit the same row, you concatenate the letters and net the amounts. Order in column (f) doesn't matter — BW and WB are equivalent.
Example 4 — Nondeductible loss to a related party, code L.
- Proceeds: $4,000, basis: $5,000, raw loss: −$1,000
- Sold to a sibling — IRC §267 disallows the loss
- Code in column (f): L
- Column (g): +$1,000 (positive — eliminates the entire loss)
- Reported loss: $0
Code L is the most common reason a "real" loss on your records doesn't show up on Schedule D. Personal-use property (your car at a loss) follows the same treatment.
FAQ
What is column (f) on Form 8949?
Column (f) is where you enter a code — a single letter (or short combination of letters) — explaining why the gain or loss on that row is different from what the raw proceeds minus cost basis would calculate. The code tells the IRS how to interpret the adjustment amount in column (g).
What does code W mean on Form 8949?
Code W means "wash sale loss disallowed." You sold a security at a loss and bought a substantially identical one within 30 days before or after the sale, which triggers IRC §1091 and disallows the loss. The disallowed amount goes in column (g) as a positive number. Brokers usually pre-populate this on the 1099-B.
What does code B mean on Form 8949?
Code B means the cost basis your broker reported to the IRS is incorrect. Most RSU and ESPP sales require code B because brokers cannot include W-2 compensation income in the reported basis. The correction goes in column (g) as a signed number — negative to reduce an overstated gain, positive to reduce an overstated loss.
What does code T mean on Form 8949?
Code T means the broker-reported holding period (short-term vs long-term) is wrong. Enter T in column (f) with no amount in column (g) — the code alone corrects the classification. Most common after a broker transfer where the original acquisition date was lost.
What does code N mean on Form 8949?
Code N means you are a nominee — the 1099-B was issued to you, but someone else owned part of the economic interest (typical in joint or custodial accounts). Report the full amount and use code N with a column (g) adjustment for the portion belonging to the other party.
What does code H mean on Form 8949?
Code H is the primary-residence gain exclusion under IRC §121 — up to $250,000 single or $500,000 married filing jointly on the sale of your main home. Enter H in column (f) and the excluded gain in column (g) as a negative number.
What does code D mean on Form 8949?
Code D covers accrued market discount on a debt instrument — the portion of the gain that is treated as ordinary interest income rather than capital gain. Enter D in column (f) and the accrued discount in column (g) as a negative number so it does not double-count with the 1099-INT entry.
What does code Q mean on Form 8949?
Code Q is the Qualified Small Business Stock exclusion under IRC §1202. If you held QSBS more than five years, you can exclude up to 100% of the gain depending on acquisition date. Enter Q in column (f) and the excluded gain in column (g) as a negative number.
What does code E mean on Form 8949?
Code E means selling expenses or option premium not already reflected in proceeds or basis — commissions, fees, or option premium that the broker left out. Column (g) is signed: negative to reduce gain or increase loss, positive in the rare opposite case.
What does code L mean on Form 8949?
Code L is a nondeductible loss — most often a sale to a related party under IRC §267 or a loss on personal-use property (your car, primary residence sold at a loss). Enter L in column (f) and the disallowed loss in column (g) as a positive number to back it out.
What does code O mean on Form 8949?
Code O is the catch-all "other adjustment" — use it when no other code fits and attach a statement explaining the adjustment. Column (g) is signed based on whether the correction increases or decreases the gain. Common for one-off corrections like worthless-security writedowns not captured elsewhere.
Can you combine Form 8949 codes?
Yes. The IRS accepts multi-letter combinations like BW, TO, or EL when more than one adjustment applies to the same row. Enter all applicable letters in column (f) with a single net amount in column (g). Order doesn't matter.
Where do I find the IRS list of Form 8949 codes?
The official list is in the Form 8949 instructions on the IRS website, under the "Column (f)" heading. This post summarizes every code from that list with a shorter explanation and common use case.
Bottom Line
Form 8949 codes are a small vocabulary — 15 single letters plus combinations — and most people only ever use two or three of them. Get them right and your column (g) adjustments flow cleanly to Schedule D. Get them wrong and the IRS computer will notice within 18 months and send you a CP2000.
If you're converting a 1099-B PDF and want the codes applied correctly on export, upload your PDF here — we detect wash sales, basis corrections, and missed codes, and write them to the CSV or TXF so your tax software imports them exactly the way the IRS expects.
For how Form 8949 rows roll up into Schedule D totals and then onto Form 1040, see Form 8949 and Schedule D: what your 1099-B data means.
By Jakob Johnson
Writes guides on 1099-B tax filing, broker import issues, and Form 8949 / Schedule D reporting for 1099-B Converter.