How to Report ESPP on Your Tax Return: Form 8949 and Cost Basis

To report an ESPP sale on your federal tax return, you need three documents working together: your W-2 (which usually already contains the ordinary income piece), Form 1099-B from your broker, and Form 3922 from your employer. You report the sale on Form 8949, carry the totals to Schedule D, and — this is the step nearly everyone misses — adjust the cost basis your broker reported so the discount you already paid tax on as wages doesn’t get taxed a second time as a capital gain.

How much of your profit is ordinary income versus capital gain depends on how long you held the shares. That single question decides most of the math, so start there.

Qualifying vs. Disqualifying Dispositions

A qualifying disposition happens when you hold the stock more than two years after the offering date and more than one year after the purchase date. Both clocks must run out. Miss either one, even by a day, and the entire sale becomes a disqualifying disposition.1Office of the Law Revision Counsel. 26 USC 423 – Employee Stock Purchase Plans

Qualifying dispositions push most of your profit into long-term capital gains territory, taxed at 0%, 15%, or 20% depending on your total taxable income.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses Disqualifying dispositions push more of your profit into ordinary income, taxed at the same rates as your paycheck, up to 37% for top earners.3Internal Revenue Service. Federal Income Tax Rates and Brackets

Check your plan documents for the exact offering date and purchase date. Many participants mix up the offering date (when the enrollment window opened) with the purchase date (when the shares were actually bought). They’re almost always different, and getting them wrong can lead you to classify a disqualifying sale as qualifying, which underreports ordinary income and invites an IRS notice.

How Ordinary Income Is Calculated

For a qualifying disposition, the ordinary income you report is the lesser of two numbers: the discount built into the option price at the grant date, or the actual profit from the sale. If the stock dropped and you made less than the original discount, you only owe ordinary income tax on what you actually gained.4Internal Revenue Service. Stocks (Options, Splits, Traders) 5 Anything above that ordinary income amount is a long-term capital gain.

For a disqualifying disposition, the ordinary income piece equals the full spread between the discounted price you paid and the fair market value on the purchase date. That’s the “bargain element,” and it’s taxed as compensation regardless of what happened to the stock price afterward.1Office of the Law Revision Counsel. 26 USC 423 – Employee Stock Purchase Plans Any further gain or loss between the purchase-date value and the sale price is a capital gain or loss, short-term if you held the shares one year or less, long-term if more.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses

One quirk catches people off guard. If the stock dropped below your purchase price before you sold, a disqualifying disposition can produce zero ordinary income because there’s no bargain element left. The whole result is a capital loss. It’s the one scenario where a disqualifying disposition can help you.

The Three Documents You Need

Each form does something different, and you can’t finish the return without all three.

Form 3922 comes from your employer or the plan administrator after each purchase. It shows the fair market value on the offering date, the fair market value on the purchase date, and the price you actually paid per share. These are the inputs for calculating ordinary income and your starting cost basis.5Internal Revenue Service. About Form 3922, Transfer of Stock Acquired Through an Employee Stock Purchase Plan Under Section 423(c)

Form 1099-B comes from your brokerage after you sell. It reports the gross proceeds and a cost basis. The cost basis it shows is almost always wrong for ESPP shares, and fixing it is the next section.6Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions

Form W-2 from your employer generally includes the ordinary income from the ESPP sale in Box 1 alongside your regular wages. Employers aren’t required to do this, and whether they do often depends on whether they got timely information about your sale.4Internal Revenue Service. Stocks (Options, Splits, Traders) 5

Verify your W-2 before doing anything else. If your employer did not include the ESPP ordinary income, you report it yourself on Schedule 1 (Form 1040), Line 8k. Skipping this means the IRS never sees that income, which sets up a notice later.4Internal Revenue Service. Stocks (Options, Splits, Traders) 5 If the income is already on your W-2 and you report it again on Schedule 1, you’ve doubled the tax on that amount.

Adjusting Cost Basis on Form 8949

This is where most ESPP filers make their most expensive mistake. The cost basis your broker reports on Form 1099-B typically reflects only the cash you paid — the discounted purchase price. It does not include the ordinary income you already reported (or that your employer added to your W-2). Copy the broker’s basis straight onto your return and the IRS taxes the discount twice: once as ordinary income, again as a capital gain.

To fix this, calculate an adjusted cost basis by adding the ordinary income component to your actual purchase price. If you paid $17 per share and reported $3 per share as ordinary income, your adjusted basis is $20 per share. That’s the number that should drive the capital gain or loss.

On Form 8949, enter the broker’s reported basis in Column (e), then use Column (f) to enter code “B,” which tells the IRS the basis on the 1099-B is incorrect. In Column (g), enter the adjustment amount — the difference between the correct basis and the broker’s number.7Internal Revenue Service. Instructions for Form 8949 The totals from Form 8949 flow onto Schedule D, where your capital gains and losses are summarized.

The IRS runs automated matching between what your broker reported on the 1099-B and what you put on your return. When the numbers don’t match and there’s no adjustment code explaining why, the system flags the discrepancy and generates a CP2000 notice proposing more tax.8Internal Revenue Service. Understanding Your CP2000 Series Notice A CP2000 isn’t an audit, but it does require a written response, and ignoring it produces an automatic assessment. Using code “B” with the right adjustment amount in Column (g) heads this off.

Selling Only Part of Your Holdings

If you’ve participated in multiple purchase periods, you may hold shares bought at different prices on different dates. When you sell only some of them, which specific lot you sell changes both the ordinary income and whether the gain is long-term or short-term. Most brokers default to first-in, first-out, which sells your oldest shares first. That usually helps, because the oldest shares are the ones most likely to have cleared the qualifying disposition holding periods. You can also use specific identification and tell your broker exactly which lot to sell — for instance, a lot with a higher purchase price to minimize the gain. You have to identify the specific shares before the trade settles, not after.

Reporting a Loss and the Wash Sale Trap

When ESPP shares drop below your adjusted basis, selling them creates a capital loss that offsets other capital gains dollar for dollar. If losses exceed gains for the year, you can deduct up to $3,000 of the remaining net loss against ordinary income ($1,500 if married filing separately), and any leftover carries forward indefinitely.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses Use your adjusted basis, not the broker’s number. If your employer already reported $3 per share as ordinary income on your W-2, your basis is higher than the cash price you paid and your capital loss is larger than the 1099-B suggests.

Watch for wash sales. If you sell ESPP shares at a loss and the plan buys new shares within 30 days before or after the sale, the wash sale rule disallows the loss. ESPP purchases happen on a fixed schedule, so you often can’t control whether a plan purchase falls inside that 61-day window. The disallowed loss isn’t gone; it gets added to the basis of the replacement shares and shows up when you sell those. On Form 8949, report the disallowed loss with code “W” in Column (f) and the nondeductible amount as a positive number in Column (g).9Internal Revenue Service. Instructions for Form 8949 If you’re trying to harvest a loss, check the plan’s purchase schedule first; you may need to withdraw from the current offering period to keep the deduction.

Higher-Income Surtax

Above regular capital gains tax, a 3.8% Net Investment Income Tax applies if your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).10Internal Revenue Service. Net Investment Income Tax Capital gains from ESPP sales count as net investment income for this purpose.11Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax These thresholds aren’t indexed for inflation. The surtax hits the lesser of your net investment income or the amount your modified AGI exceeds the threshold, so a large ESPP sale can trigger it even when your regular salary sits comfortably below.

Estimated Tax on a Large Sale

Your paycheck withholding usually doesn’t account for a large mid-year capital gain. If the sale pushes your total tax liability more than $1,000 above your withholding and credits, you may owe an underpayment penalty at filing.12Internal Revenue Service. Form 1040-ES, Estimated Tax for Individuals (2026)

Two safe harbors avoid the penalty: pay at least 90% of your 2026 tax through withholding and estimated payments, or pay at least 100% of your 2025 tax (110% if your 2025 AGI exceeded $150,000).12Internal Revenue Service. Form 1040-ES, Estimated Tax for Individuals (2026) For a sale late in the year, the annualized income installment method lets you concentrate payments in the quarter the income was actually received rather than spreading them evenly.

The 2026 estimated tax deadlines are April 15, June 15, September 15, and January 15, 2027. You can skip the January payment if you file your 2026 return and pay the full balance by February 1, 2027.12Internal Revenue Service. Form 1040-ES, Estimated Tax for Individuals (2026) Another option: ask your employer to increase federal withholding on your remaining paychecks. Extra withholding is treated as paid evenly throughout the year, which can patch a shortfall from an earlier quarter without a penalty.

Keep the Paperwork

Hold on to every Form 3922, Form 1099-B, purchase confirmation, and basis worksheet for at least three years after you file the return that reports the sale.13Internal Revenue Service. How Long Should I Keep Records? For shares you still hold, keep every purchase period’s records until you eventually sell. Reconstructing basis years later without the 3922s is painful and often expensive.