Form 8949 & Schedule D: How to Report Stock Sales on Your Tax Return

ShareXLinkedInRedditFacebookWhatsApp

September 11, 2026 · BriMindInvest Research Team · 11 min read · Tax Strategy

Every stock, ETF, or crypto sale you make in a taxable account has to show up on your tax return — and the IRS wants it on two specific forms: Form 8949 and Schedule D. Here's exactly how they work, how they connect, and how to avoid the mistakes that trigger IRS notices.

Form 8949 & Schedule D at a Glance

Form 8949 purpose
Line-by-line detail
Every individual sale
Schedule D purpose
Totals & summary
Rolls up to Form 1040
Short-term threshold
Held ≤ 1 year
Taxed as ordinary income
Long-term threshold
Held > 1 year
0 / 15 / 20% rates
Covered basis reported by
Your broker
Directly to the IRS
Noncovered basis reported by
You
IRS has no basis on file
Common adjustment code
W
Wash sale disallowed loss
2026 tax year filing deadline
April 15, 2027
For sales made in 2026

What Form 8949 and Schedule D Each Do

Form 8949 ("Sales and Other Dispositions of Capital Assets") is where every individual sale gets its own row: what you sold, when you bought it, when you sold it, what you received, what your cost basis was, and any adjustment needed. Think of it as the itemized receipt.

Schedule D ("Capital Gains and Losses") is the summary page. It totals up everything from your Form(s) 8949 — separately for short-term and long-term — nets your gains against your losses, applies the $3,000 ordinary-income offset if you have a net loss, and carries the final number to Form 1040. If you have zero adjustments across the board, Schedule D can sometimes pull totals directly from your 1099-B without an 8949 at all (see the FAQ below).

The flow, in one sentence

1099-B (what your broker reports) → Form 8949 (your itemized, corrected version of it) → Schedule D (the totals) → Form 1040 (your actual tax bill).

The Six Boxes — Which One Is Your Transaction?

Form 8949 has three parts for short-term sales (Part I, boxes A/B/C) and three for long-term (Part II, boxes D/E/F). You'll often need multiple copies of the form if your sales span more than one box.

The Six Boxes on Form 8949
BoxHolding periodBasis reported to IRS?Typical case
AShort-term (≤ 1 yr)Yes — coveredMost stock/ETF sales via a US broker
BShort-term (≤ 1 yr)No — noncoveredOld shares or transferred-in positions
CShort-term (≤ 1 yr)Not on a 1099-BCrypto, private stock, no 1099-B issued
DLong-term (> 1 yr)Yes — coveredMost stock/ETF sales via a US broker
ELong-term (> 1 yr)No — noncoveredOld shares or transferred-in positions
FLong-term (> 1 yr)Not on a 1099-BCrypto, private stock, no 1099-B issued

A Worked Example — Filling Out One Row

Say you bought 50 shares of a stock for $4,000 on March 3, 2025, and sold all 50 shares for $5,500 on November 12, 2026. Your broker reported this as a covered, long-term sale (Box D). Here's how it lands on Form 8949:

Worked Example — Form 8949 Row
ColumnWhat it meansThis example
(a) DescriptionWhat you sold50 sh. XYZ Corp
(b) Date acquiredPurchase date03/03/2025
(c) Date soldSale date11/12/2026
(d) ProceedsWhat you received$5,500
(e) Cost basisWhat you paid$4,000
(f)/(g) AdjustmentCode + amount, if anyNone needed
(h) Gain/loss(d) − (e) + (g)$1,500 gain

Since the position was held more than a year, this $1,500 gain flows into the long-term section of Schedule D and is taxed at 0%, 15%, or 20% depending on your total taxable income — not at your ordinary income rate.

FIFO vs. Specific Lot Identification — Which Row Actually Lands on Your 8949

When you sell only part of a position you built up over several purchases, the IRS lets you choose which shares you're selling — and that choice changes the numbers that go on your 8949. Most brokers default to FIFO (first-in, first-out) unless you actively select a different lot before the trade settles.

Say you bought Stock XYZ in three separate lots, and on 08/01/2026 you sell 100 shares at $80 each ($8,000 proceeds):

Lots available before the sale
LotPurchase dateSharesCost basis
Lot A01/10/202450$3,000 ($60/sh)
Lot B06/15/202550$4,500 ($90/sh)
Lot C02/01/2026100$10,500 ($105/sh)
Result under FIFO vs specific lot identification
MethodLots soldBasis usedGain on this saleHolding period
FIFO (broker default)Lot A (50 sh) + Lot B (50 sh)$3,000 + $4,500 = $7,500$500 gainLong-term (both lots held > 1 yr)
Specific ID — highest cost firstLot C (100 sh)$10,500$2,500 lossShort-term (Lot C held ~6 months)

Same sale, same 100 shares, a $3,000 swing between a $500 gain and a $2,500 loss — purely from which lot you tell your broker to sell. You must specify the lot before the trade settles (usually T+1); you can't retroactively pick a more favorable lot after the fact when you sit down to file. If you're selling appreciated stock and want to control the tax outcome, log the specific lot with your broker at the time of the trade, not at tax time.

Common Adjustment Codes (Column f)

Most sales need no adjustment at all — column (h) is simply proceeds minus basis. But these codes come up often enough to know:

Common Form 8949 Adjustment Codes
CodeMeaningEffect on gain/loss
WWash sale — loss disallowedAdds back the disallowed loss (positive adjustment)
BBasis reported to you was wrongCorrects the basis you actually paid
OMultiple codes apply to one transactionSee attached explanation statement
T1099-B shows type not matching this boxReclassifies short/long-term as needed
HHome sale — gain qualifies for exclusionExcludes some or all of the gain (see §121)

For the full list of adjustment codes (there are over a dozen for edge cases like Section 1256 contracts and installment sales), see the IRS Instructions for Form 8949 — link at the bottom of this guide.

Wash Sale Code W, Fully Worked

The FAQ above explains code W conceptually — here's exactly how the numbers move through your 8949 when it applies:

Wash sale worked example timeline
DateActionEffect
07/01/2026Buy 100 sh. XYZ for $10,000 ($100/sh)Original cost basis established
10/01/2026Sell all 100 sh. for $8,000 ($80/sh)$2,000 loss realized
10/20/2026Buy 100 sh. XYZ back for $8,300 ($83/sh)Within the 30-day window (before or after the sale) → wash sale triggered
What lands on the 8949 for the October 1 sale
  • Column (d) Proceeds: $8,000
  • Column (e) Cost basis: $10,000
  • Column (f) Code: W
  • Column (g) Adjustment: +$2,000 (the disallowed loss, entered as a positive number)
  • Column (h) Gain/loss: (d) − (e) + (g) = $8,000 − $10,000 + $2,000 = $0 — the loss is fully disallowed for this tax year.

The disallowed $2,000 doesn't vanish — it's added to the cost basis of the replacement shares bought on October 20, making their adjusted basis $8,300 + $2,000 = $10,300 instead of $8,300. The tax benefit is deferred until you eventually sell those replacement shares without repeating the wash sale, not eliminated. This is why a wash sale is best described as a timing rule, not a penalty.

The RSU/ESPP double-taxation trap on Form 8949

When restricted stock (RSUs) vest or ESPP shares purchase at a discount, your employer already adds that value to your W-2 as ordinary income and withholds tax on it. Your cost basis for those shares should include that already-taxed amount — but many 1099-Bs only report your out-of-pocket cost, not the W-2 income component, which overstates your gain unless you correct it.

Worked example: 100 RSU shares vesting at $50/share
  • Fair market value at vesting: 100 × $50 = $5,000, already added to your W-2 as ordinary income and taxed.
  • True cost basis for the 8949: $5,000 (not $0 — you already paid tax on this amount as income).
  • If your 1099-B shows basis as $0 (common, since the broker often doesn't track the W-2 component) and you sell for $5,500: reporting the broker's $0 basis produces a $5,500 taxable gain — but the correct basis of $5,000 produces only a $500 gain.
  • Fix it on the 8949 with adjustment code B (basis reported to you was wrong) in column (f), correcting the $5,000 already-taxed amount in column (g) — otherwise you pay tax on the same $5,000 twice.

ESPP shares work the same way but add a second wrinkle — whether the disposition is qualifying or disqualifying changes how much of the discount counts as ordinary income vs. capital gain. See our ESPP Tax Strategy guide for the full qualifying-vs-disqualifying breakdown.

Do You Need to Fill This Out by Hand?

For most investors, no. Every major consumer tax software (TurboTax, H&R Block, TaxAct, FreeTaxUSA) can import your 1099-B directly from most brokers via API or by uploading the broker's own CSV/PDF export, and will auto-generate the Form 8949 attachment and Schedule D totals from that import — you review the flagged adjustments rather than typing each row.

  • Clean, covered transactions with no adjustments: the import handles them completely — spot-check a handful of rows against your broker statement rather than re-entering everything.
  • Wash sales your broker already flagged in Box 1g: these typically import with code W pre-applied — verify the adjustment amount rather than re-deriving it.
  • Cross-account wash sales, RSU/ESPP basis corrections, and noncovered lots from a transferred-in account: no software can catch these automatically — these are exactly the manual checks worth spending your time on, per the sections above.
  • More than a few hundred transactions or complex adjustments across multiple brokers: consider having a CPA review the aggregated 8949 attachment before filing, even if the software generated it.
Reporting crypto sales — the basis burden is still on you

The IRS treats crypto as property: every sale, swap, or purchase made with crypto is a taxable event reported on Form 8949, exactly like a stock sale. New broker-level Form 1099-DA reporting for crypto exchanges is phasing in starting with the 2025 tax year, but initially reports proceeds only — most exchanges do not yet report your cost basis to the IRS. That means you should keep your own transaction records (or use a crypto tax-lot tool) and expect to report these sales in Box C or F ("not reported on a 1099-B") until basis reporting catches up.

Mistakes That Trigger an IRS Notice

  • Forgetting to report a sale at all — the IRS already has your 1099-B from the broker and will send a CP2000 notice if a reported sale doesn't show up on your return, even if it was a loss you 'didn't need to report.'
  • Using the wrong cost basis on noncovered securities — old shares transferred between brokers often lose their basis record in transit; verify against your original purchase confirmation.
  • Missing a wash sale flagged by your broker in Box 1g of the 1099-B but not carried over correctly to your 8949.
  • Reporting short-term gains as long-term (or vice versa) because the holding period was miscounted — the clock starts the day AFTER you bought, not the purchase day itself.
  • Not aggregating properly — if you have 40 sales in the same box with no adjustments, you don't need 40 separate rows; a single 'Various' summary line is allowed and cleaner.
  • Forgetting employer stock (RSUs, ESPP, ISOs) has its own basis wrinkle — the amount already taxed as ordinary income on your W-2 needs to be added to your cost basis, or you'll pay tax on it twice.
Sponsored
Save 20% at E-file.com
The budget-friendly alternative to TurboTax and H&R Block
  • ✓Priced well below TurboTax and H&R Block for comparable federal + state returns
  • ✓Flat, published pricing shown up front — no per-form upsells sprung on you at checkout
  • ✓IRS-authorized e-file provider, so your return goes straight to the IRS with confirmation
  • ✓Accuracy guarantee plus free customer support included at every tier
We may earn a commission if you sign up through this link.
Save 20% at E-file.com →

Bottom Line

Form 8949 and Schedule D aren't optional paperwork — they're how the IRS reconciles what your broker told them against what you report, and mismatches are one of the most common triggers for automated notices. The good news: for the vast majority of investors with covered, unadjusted transactions, tax software (or a downloadable 8949 attachment from your broker) does the heavy lifting automatically.

The places that actually require your attention are the exceptions: noncovered basis you have to supply yourself, wash sales that cross accounts your broker can't see, employer stock basis adjustments, and crypto sales without broker-reported basis. Get those right and the rest of the form is arithmetic.

Frequently Asked Questions

More tax-smart investing guides

Tax-Loss Harvesting GuideTax-Efficient Investing GuideNIIT: The 3.8% Surtax ExplainedESPP Tax Strategy Guide
Disclaimer: This article is for educational purposes only and does not constitute tax advice. Tax forms, thresholds, and rules change — consult a qualified CPA or tax advisor, or IRS Instructions for Form 8949, before filing your return.
Free Financial Calculators
Put the numbers to work — try our free tools.
View all tools →
CAGR CalculatorCompound InterestDCA CalculatorDividend & DRIPInflation CalculatorInvestment ReturnPosition SizeRetirement Calculator
ShareXLinkedInRedditFacebookWhatsApp

Read Next

Know Your Realized Gains Before You File

Connect your real brokerage account and our Portfolio Analysis tool tracks every realized short- and long-term gain, flags wash sales, and estimates your tax bill — free for 14 days, no credit card required.

Built-in realized gains tracker in Portfolio Analysis
Start Free TrialSign In

14-day free trial · No credit card required · Cancel anytime

Not ready to sign up? Get one free email a week instead.

Data sources & disclosures: Financial data and metrics cited in this article are sourced from company SEC filings, earnings releases, and investor relations materials. Market prices and fundamental data are provided by financial market data providers. Market size estimates and industry projections are sourced from industry research and analyst reports. Figures reflect information available at the time of writing and may have changed. AI scores and price targets are proprietary estimates — see our Methodology. This article is for informational and educational purposes only and does not constitute financial advice or a recommendation to buy or sell any security. Investing involves risk, including the possible loss of principal. Please read our full Disclaimer and consult a licensed financial adviser before making investment decisions.