IRS Reporting & Filing7 min readSeptember 18, 2026

How to Report Stock Sales on Form 8949 (Step-by-Step With Examples)

Learn how to report stock sales on Form 8949 step by step: boxes A-F, cost basis, wash sale codes, and how totals flow to Schedule D, with a worked example.

How to Report Stock Sales on Form 8949 (Step-by-Step With Examples)

What Form 8949 Does — and When Stock Sellers Need It

Sold shares this year? Then you almost certainly need Form 8949, Sales and Other Dispositions of Capital Assets, to report stock sales on your federal return. This is the IRS form where every individual stock sale gets listed line by line: what you sold, when you bought it, when you sold it, how much cash came in, and what you originally paid. The IRS uses those details to verify your capital gain or loss, and your brokerage already reports most of the same data through Form 1099-B.

Here is the flow in one sentence: your broker sends you a Form 1099-B for each account, you transfer those sales onto Form 8949, and the totals then move to Schedule D, where your short-term and long-term capital gains are netted and taxed. If your math on Form 8949 does not match what your broker reported to the IRS, the agency's automated matching system can flag your return. That is why getting the form right the first time matters, especially now that brokers report cost basis directly to the IRS for most modern stock purchases.

This guide walks through the whole process step by step: which box to check at the top of the form, what each column asks for, the adjustment codes that stock investors actually use, and a full worked example with three sales from one account. If you first want a refresher on how the tax itself is calculated, our plain-English overview of capital gains tax on stock sales covers rates, holding periods, and thresholds.

Laptop screen showing colorful stock market candlestick charts

Form 8949 vs. Schedule D: How the Two Forms Work Together

A lot of filers confuse these two forms, so let's separate them cleanly. Form 8949 is the transaction ledger. Each sale gets its own row with dates, proceeds, basis, and any adjustment codes. Schedule D is the summary and calculator. It takes the totals from Form 8949, splits them into short-term and long-term buckets, nets the gains against the losses, and applies the correct rates.

The two-part structure of Form 8949 mirrors the two holding-period buckets. Part I holds short-term sales — shares you held for one year or less, taxed at ordinary income rates. Part II holds long-term sales — shares held for more than one year, taxed at the preferential 0%, 15%, or 20% rates. The holding-period clock starts the day after your trade date, and a sale one day past twelve months flips from Part I to Part II. Our guide to long-term capital gains rates shows how much that timing can change your bill.

FormWhat it doesWho completes it
Form 1099-BBroker's report of each sale: proceeds, basis, wash-sale amounts, covered statusYour brokerage (sent to you and the IRS)
Form 8949Line-by-line list of every sale, with codes for adjustmentsYou (or your tax software)
Schedule DNets short-term and long-term totals and computes the taxYou (mostly pre-filled from Form 8949)

One more connection worth knowing: if your net investment income is high enough, a separate 3.8% levy applies on top of the capital gains tax. Our net investment income tax explainer covers the $200,000 and $250,000 MAGI thresholds. And before your totals ever reach Schedule D, the first decision on Form 8949 is which box to check — which is exactly where most filers hesitate.

Choosing the Right Box at the Top of Form 8949

Form 8949 asks you to check one box for each group of transactions, and the box tells the IRS how much of your data it can independently verify. The choice depends on two questions: did you receive a Form 1099-B for the sale, and does it show cost basis as reported to the IRS? Your 1099-B answers both. Look at box 12 on Form 1099-B — if it is checked, your broker told the IRS your basis; if box 1e shows an amount but box 12 is unchecked, basis was printed for you but not transmitted to the IRS.

Stocks acquired on or after January 1, 2011 are generally covered securities, meaning broker basis reporting is mandatory and they land in box A or box D. Older shares, plus some shares transferred between brokers, are usually noncovered — the broker may not show basis at all, which pushes you to box B or box E. Here is the full map for stock sellers:

PartBoxUse it whenFlows to Schedule D
Part I (short-term)A1099-B received, basis shown and reported to the IRS (covered)Line 1b
Part I (short-term)B1099-B received, basis not shown or not reported to the IRS (noncovered)Line 2
Part I (short-term)CNo 1099-B received at all (rare for stocks)Line 3
Part II (long-term)D1099-B received, basis shown and reported to the IRS (covered)Line 8b
Part II (long-term)E1099-B received, basis not shown or not reported to the IRS (noncovered)Line 9
Part II (long-term)FNo 1099-B received at all (rare for stocks)Line 10

There is a newer wrinkle worth knowing. The IRS has expanded Form 8949 with additional boxes — G, H, and I in Part I and J, K, and L in Part II — that mirror the same covered, noncovered, and no-form split for digital asset transactions reported on the new Form 1099-DA. Stock sellers will stay with boxes A through F, but if you also sold crypto through a broker, those sales now have their own landing spots. Our guide to crypto capital gains tax explains the 1099-DA rollout in detail. The IRS instructions for Form 8949 remain the authoritative source for edge cases.

Step-by-Step: Completing Each Column of Form 8949

Overhead view of tax documents, laptop and calculator on wooden desk

Step 1: Gather every Form 1099-B (and your own records)

Collect a 1099-B from each brokerage where you sold shares during the year. Brokers must send them by February 15, and the form lists proceeds in box 1d, cost or other basis in box 1e, any nondeductible wash-sale loss in box 1g, and the covered-status checkbox in box 12. For noncovered shares with a blank box 1e, pull your old trade confirmations or your broker's cost-basis tool — our walkthrough of cost basis methods shows how FIFO, specific identification, and average basis change the number you enter.

Step 2: Sort each sale by part and box

Split your sales into short-term and long-term using the trade dates, then group them by box using the table above. A sale held over twelve months belongs in Part II even if you held it for years, and a quick flip belongs in Part I no matter how large the loss. Keep each box's group on its own section of the form — totals are computed per box, not per account.

Step 3: Fill columns (a) through (e) for every sale

Column (a) is a plain-English description such as "100 sh. XYZ" — the share count and company name. Column (b) is your acquisition date and column (c) your sale date, both matching your broker's records. Column (d) is gross proceeds from box 1d of the 1099-B, and column (e) is your cost basis from box 1e or your own records. For noncovered shares, brokers often estimate basis, and an estimate is not the same as a correct number, so verify against what you actually paid.

Step 4: Apply adjustment codes in columns (f) and (g)

If a sale needs an explanation — a wash sale, an incorrect basis, selling expenses the broker omitted — you enter the matching letter code in column (f) and the dollar adjustment in column (g). Most sales need nothing here, and a blank adjustment row is perfectly normal. The codes that matter for stock investors are in the next section.

Step 5: Total each section and carry the numbers to Schedule D

Add up columns (d), (e), and (h) for each box group and enter the totals on the form's subtotal lines. Part I totals then move to Schedule D line 1b, 2, or 3 depending on whether you checked box A, B, or C, and Part II totals move to lines 8b, 9, or 10. Schedule D nets everything, and the bottom-line figure flows to line 7 of Form 1040. Filing season deadline for 2026 returns is April 15, 2027.

Adjustment Codes Stock Investors Actually Use

The official code list runs from A through X, but retail stock sellers rarely need more than four. Codes live in column (f), and the dollar effect goes in column (g) — negative numbers in parentheses reduce your gain or increase your loss, positive numbers do the reverse.

Person checking a wall calendar while holding a smartphone stock chart

CodeSituationWhat enters in column (g)
WWash sale — your loss was disallowed, in whole or part, because you bought substantially identical shares within 30 days before or after the saleThe nondeductible loss as a positive number; the disallowed amount then adds to the basis of the replacement shares
BThe basis your broker reported to the IRS is incorrectPositive or negative correction so column (h) shows the true gain or loss
ESelling expenses or option premiums not reflected on the 1099-BSelling expenses as a negative number
XAny other adjustment, with an attached explanation statementThe dollar effect of the adjustment

Wash sales dominate this list for active traders. Sell a stock at a loss and repurchase it inside the 61-day window that spans 30 days before and 30 days after the sale, and the IRS defers the loss instead of allowing it. Brokers flag these automatically and print the disallowed amount in box 1g of the 1099-B, which is why you should never casually overwrite a code W entry. If you harvest losses deliberately, our tax-loss harvesting guide shows how to stay clear of the rule while still cutting your tax bill. Note that most states start from your federal figures and tax capital gains as ordinary income, so a code W adjustment flows through to your state return too.

Worked Example: Three Stock Sales, One Account

Hands using a calculator beside a laptop showing a financial chart

Suppose you made three sales in one brokerage account during 2026. All three arrived on a single 1099-B with box 12 checked, meaning basis was reported to the IRS for every lot. Here is what Form 8949 captures:

SharesBoughtSoldProceeds (d)Basis (e)Code (f)Adjustment (g)Gain or loss (h)
100 sh. XYZMar 10, 2023Apr 7, 2026$6,420$4,150——$2,270
40 sh. ABCNov 22, 2025Jan 15, 2026$2,880$3,020——($140)
60 sh. DEFJan 5, 2026Feb 9, 2026$1,740$1,920W$180$0

The XYZ sale sat for over three years, so it goes to Part II, box D, and its $2,270 gain carries to Schedule D line 8b. The ABC sale lasted under two months, so it lands in Part I, box A with a $140 loss on Schedule D line 1b. The DEF sale is the interesting one: you sold at a $180 loss on February 9 but bought the same stock again on February 20, inside the 30-day window. The broker already applied the wash sale rule, so the 1099-B shows code W, the $180 loss enters as a positive adjustment in column (g), and the allowed loss becomes zero. That $180 is not gone — it quietly increases the basis of your February 20 shares, deferring the deduction until you finally exit the position.

The after-tax picture depends on your other income. If your taxable income stays within the 0% long-term bracket — roughly $49,450 of AGI for single filers or $98,900 for joint filers in 2026, subject to the IRS's final inflation figures — the XYZ gain may owe nothing federally. The ABC short-term loss offsets it dollar for dollar, while short-term gains in the other direction would be taxed at your ordinary rate. Run your own numbers through our stock capital gains calculator before you sell, not after.

When You Can Skip Form 8949 Entirely

There is a legitimate shortcut, and the IRS formalized it as Exception 1 in the Schedule D instructions. You can report your totals directly on Schedule D line 1 or line 8, with no Form 8949 attached, when three conditions all hold: the sale was reported on a 1099-B showing that basis was reported to the IRS, you have no adjustment codes to apply, and you have nothing to correct. Filers who qualify often describe it as summary reporting, and it produces a cleaner return with less transcription risk.

Two caveats keep most people on Form 8949 anyway. Tax software typically generates the form automatically even when the exception applies, because itemized rows create a cleaner audit trail, and there is no penalty for filing Form 8949 when you could have summarized. Second, the exception evaporates the moment a wash sale, a basis correction, or a noncovered share enters the picture. A separate Exception 2 lets you aggregate long lists of noncovered, same-description transactions onto one row with code M, which saves space for inherited legacy positions. If any of this feels uncertain, attaching the full Form 8949 is always the safe route — the IRS instructions spell out both exceptions in detail.

Mistakes That Trigger IRS Math Error Notices

The IRS matches your Form 8949 against the 1099-B copies your brokers filed, and mismatches generate automated notices — usually CP2000 letters arriving many months later. Most of these come from a short list of preventable errors. Entering estimated basis for noncovered shares without checking it against your purchase records is the classic one, because the broker's guess becomes your number if you do not correct it with a code B adjustment.

Forgetting to copy wash-sale adjustments from box 1g onto your form is another frequent mistake, as is deleting a code W entry because the loss "disappeared" — deferred is not forgiven, and the adjustment is precisely how the IRS expects it handled. Flipping the holding period by a single day, using the settlement date instead of the trade date, mixes Part I sales into Part II and understates your tax. Selling the same stock in multiple lots but reporting only one row for the whole position also mismatches your broker's lot-level report. Finally, remember that the federal form is only half the job: your state return generally inherits these numbers and taxes the gains as ordinary income, so a clean federal Form 8949 keeps your state tax reporting painless as well.

Report Your Sales, Then Plan the Tax

Form 8949 rewards fifteen minutes of care: right box, right dates, right basis, and wash-sale codes left exactly as your broker reported them. Get those four things correct and the rest of the return — Schedule D, Form 1040 line 7, even the NIIT calculation — falls into place mechanically. Get them wrong and the mismatch letters start months later, long after the money from your sales has moved on.

If you are mapping out a bigger selling plan, pair this guide with our overview of short-term capital gains tax to see what a quick sale really costs, and with the stock capital gains calculator to model scenarios before you place the trade. Tax rules shift every year, so confirm current figures against the IRS instructions for Form 8949 and your broker's 1099-B before you file.