Updated March 12, 2026H1B TaxFile Editorial

File your H-1B return — $49.99

Start free

Form 8949: Reporting Stock and Investment Sales

Every stock sale — RSU, ESPP, brokerage trade, or Indian equity — must be reported on Form 8949 before flowing to Schedule D. The form is straightforward once you understand the three checkbox categories and the adjustment codes that fix incorrect broker reporting.

IRS computers match your 1099-B to your Form 8949

  • The IRS receives a copy of every 1099-B your broker issues. If your Form 8949 does not match — or if you omit a sale entirely — expect a CP2000 notice proposing additional tax
  • Without the correct adjustment codes, the IRS will use the broker-reported basis, which for RSU and ESPP sales is often $0 or too low, inflating your taxable gain
  • Unreported sales can trigger a 20% accuracy-related penalty under IRC Section 6662 on top of the additional tax owed

What Is Form 8949?

Form 8949 — "Sales and Other Dispositions of Capital Assets" — is the IRS form where you list every individual sale of stocks, bonds, mutual funds, cryptocurrency, and other capital assets. Each sale gets its own row showing the date acquired, date sold, proceeds, cost basis, any adjustments, and the resulting gain or loss.

The totals from Form 8949 are carried to Schedule D, which computes your net capital gain or loss for the year. You cannot skip Form 8949 and go straight to Schedule D — the IRS requires the detailed transaction-level reporting.

The Three Checkbox Categories

Form 8949 is split into two parts: Part I for short-term sales (held one year or less) and Part II for long-term sales (held more than one year). Within each part, you check one of three boxes based on how the sale was reported to the IRS:

BoxWhen to UseSchedule D Line
A (short) / D (long)Basis was reported to the IRS on 1099-B and no adjustment is needed. The 1099-B shows the correct basis.Line 1a / Line 8a
B (short) / E (long)Basis was reported to the IRS on 1099-B but it is incorrect and you need to make an adjustment. This is the most common box for RSU and ESPP sales.Line 2 / Line 9
C (short) / F (long)Basis was not reported to the IRS. Common for shares acquired before 2011, certain foreign stock sales, and some employer equity plans.Line 3 / Line 10

For H-1B holders, most RSU and ESPP sales fall under Box B/E — the broker reported a basis to the IRS, but it is wrong (typically $0 or missing the compensation component). You need the adjustment columns to fix it.

Adjustment Codes

When the broker-reported basis is incorrect, you use columns (f) and (g) on Form 8949 to tell the IRS what went wrong and by how much. Column (f) takes one or more letter codes, and column (g) takes the dollar adjustment.

CodeMeaningCommon H-1B Use Case
BBasis reported to the IRS is incorrectRSU sale with $0 basis; ESPP sale missing the compensation component in basis
WWash sale — loss disallowed under IRC Section 1091Sold company stock at a loss and RSUs vested within 30 days
OOther adjustment (specify)Market discount, accrued interest, or other miscellaneous adjustments
Multiple (e.g., BW)Both basis incorrect and wash sale appliesRSU sold at a loss with $0 basis AND replacement shares acquired within 30 days

Reporting RSU Sales on Form 8949

Here is a step-by-step example. You received 50 RSUs that vested when the stock was $200/share. You sell all 50 shares at $220/share. The broker reports $0 cost basis on 1099-B.

  1. Column (a): Description — "50 shares XYZ Corp"
  2. Column (b): Date acquired — the vesting date
  3. Column (c): Date sold — the sale date
  4. Column (d): Proceeds — $11,000 (50 × $220)
  5. Column (e): Cost basis as reported on 1099-B — $0
  6. Column (f): Adjustment code — "B"
  7. Column (g): Adjustment amount — −$10,000 (negative, because you are increasing the basis by $10,000, which reduces the gain)
  8. Column (h): Gain — $11,000 − $0 + (−$10,000) = $1,000

Without the adjustment, the IRS would see an $11,000 gain instead of $1,000. See the full RSU cost basis correction guide for more detail.

Reporting ESPP Sales on Form 8949

ESPP sales follow the same structure but the basis adjustment depends on whether the sale is a qualifying or disqualifying disposition. The broker-reported basis is typically the purchase price (discounted price you paid) without the ordinary income component added.

Use adjustment code "B" and increase the basis by the ordinary income amount recognized on the sale. The ordinary income for a disqualifying disposition is the full spread between purchase-date FMV and purchase price. For a qualifying disposition, it is capped at the offering-date discount. See the ESPP Section 423 guide for the complete calculation.

Lot Identification Methods

When you sell shares from multiple vesting or purchase dates, you need to identify which specific lots you sold. The method affects your cost basis and holding period:

  • FIFO (First In, First Out): The default method. The oldest shares are sold first. For RSUs, this means shares from the earliest vesting date are sold first.
  • Specific Identification: You choose which lots to sell. This lets you optimize for long-term vs short-term treatment or select lots with higher basis to minimize gains. You must identify the specific shares at the time of sale (not after).
  • Average Basis: Only available for mutual fund shares and certain dividend reinvestment plans. Not available for individual stocks, RSUs, or ESPP shares.

Why It Matters for H-1B Holders

Form 8949 is the single most error-prone form for H-1B holders with equity compensation. The reasons are structural:

  • Broker data is systematically wrong. For RSU sales, the 1099-B basis is often $0. For ESPP sales, it excludes the compensation component. The IRS knows the data is often wrong — that is why the adjustment columns exist — but they will not fix it for you.
  • Multiple transaction types on one form. RSU sales, ESPP sales, stock option exercises, index fund sales, and crypto — all go on the same Form 8949 but each has different basis rules.
  • High volume of transactions. Quarterly RSU vesting with sell-to-cover produces at least 4 taxable events per year before any discretionary trading.
  • Indian investments require manual entry. Sales of Indian stocks do not generate a US 1099-B. You must manually report these on Form 8949 with the INR amounts converted to USD.

Common Mistakes

  1. Using the wrong checkbox category. If the broker reported the basis to the IRS (check your 1099-B — look for the "basis reported to IRS" indicator), you need Box B/E when making an adjustment, not Box C/F. Using the wrong box causes a mismatch in the IRS matching system.
  2. Omitting the adjustment code. Entering the correct basis in column (e) instead of using columns (f) and (g) creates a discrepancy with what the IRS has on file. Always enter the broker-reported basis in (e) and the correction in (f)/(g).
  3. Forgetting sell-to-cover transactions. When RSUs vest and shares are sold to cover withholding, each is a reportable transaction. Brokers issue 1099-Bs for these. If you do not report them on Form 8949, the IRS sees unreported sales.
  4. Not reporting wash sales. If your broker flags a wash sale on the 1099-B, you must report it with code W on Form 8949. But brokers only track wash sales within a single account — if you triggered a wash sale across multiple accounts (e.g., selling in one brokerage and buying in another), you must self-report it.
  5. Skipping Indian stock sales. As a US tax resident, capital gains from selling stocks on NSE/BSE must be reported. No 1099-B is issued by Indian brokers, so you need Box C/F (basis not reported to IRS).

How Our Platform Handles This

H1B TaxFile automates Form 8949 generation with all the nuances H-1B holders face:

  • Import your 1099-B data and the platform auto-detects which transactions need basis corrections, selecting the correct checkbox category (A/B/C or D/E/F) for each.
  • RSU sales get automatic code B adjustments using the vesting-date FMV from your equity portal data.
  • ESPP sales are analyzed for qualifying vs disqualifying disposition status, and the correct ordinary income and basis adjustment are calculated.
  • Wash sales across multiple lots and accounts are detected and reported with code W.
  • All Form 8949 totals flow automatically to the correct lines on Schedule D, separated by short-term and long-term.

Frequently Asked Questions

Skip the complexity. We handle all of this for you.

H1B TaxFile supports every form in this guide — FATCA, PFIC, FTC, RSU basis correction, and 22 more H-1B-specific features. Flat price, no surprises.

No credit card to start Printable PDF in 15 minutes 22 H-1B-specific features
File your return — $49.99

H1B TaxFile Team

Written by the H1B TaxFile editorial team — tax professionals and software engineers who specialize in U.S. federal tax filing for H-1B visa holders, F-1 students, and nonresident aliens.

Reviewed by a licensed CPA with international tax experience.

Disclaimer: This guide is for educational purposes only and does not constitute tax or legal advice. Tax laws are complex and change frequently. Consult a qualified tax professional for advice specific to your situation.

Recommended Reading