To avoid double tax on an ESPP sale, increase the cost basis your broker reported by the amount of ordinary income your employer already added to your W-2, and record that correction on Form 8949 when you file. Without this adjustment, the discount portion of your purchase gets taxed once as wages and a second time as capital gain.
Why the Double Tax Happens
Two documents describe the same shares differently, and the gap between them is where the extra tax lives.
Your employer reports the ESPP discount as ordinary income in Box 1 of your W-2, lumped in with your regular wages. For a disqualifying disposition, that happens in the year you sell; for a qualifying disposition, it happens the same way but the amount is smaller.1Internal Revenue Service. Publication 525 – Taxable and Nontaxable Income You pay income tax on it through payroll like any other wages.
Your brokerage, meanwhile, sends you a Form 1099-B that reports the sale using only the discounted price you actually paid as the cost basis in Box 1e. The 1099-B does not know about the income already on your W-2.2Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets
Copy the 1099-B numbers straight onto your return and the IRS sees a capital gain that includes the discount you were already taxed on as wages. The fix is a basis adjustment. The IRS states it directly in Publication 525: “Increase your basis in the stock by the amount of this ordinary income.”1Internal Revenue Service. Publication 525 – Taxable and Nontaxable Income
Documents You Need
Three documents hold the numbers for the correction.
- Form W-2. The ESPP ordinary income sits inside Box 1 with your salary. There is no separate line for it, so compare Box 1 against your expected salary or check your final pay stub of the year to isolate the ESPP portion.1Internal Revenue Service. Publication 525 – Taxable and Nontaxable Income
- Form 3922. Your employer or plan administrator files this for each ESPP transfer. It gives you the grant date, purchase date, fair market value on both dates, price paid per share, and number of shares.3Internal Revenue Service. About Form 3922 – Transfer of Stock Acquired Through an Employee Stock Purchase Plan
- Form 1099-B. Sent by your brokerage after you sell. Box 1e usually reflects only what you paid, not the ordinary income component.2Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets
If Form 3922 is missing, your brokerage’s supplemental tax document often carries the same numbers. What you need is the fair market value per share on the grant date, the fair market value per share on the purchase date, and the price you paid per share.
Figuring the Ordinary Income
How much income your employer added to your W-2 depends on whether the sale is a qualifying or disqualifying disposition. That answer sets the size of the basis adjustment.
Disqualifying Dispositions
A sale is disqualifying if you did not hold the shares more than two years from the offering (grant) date and more than one year from the purchase date.4Office of the Law Revision Counsel. 26 U.S. Code 423 – Employee Stock Purchase Plans The full spread between the fair market value on the purchase date and the price you paid is ordinary income, and your employer reports it on your W-2.1Internal Revenue Service. Publication 525 – Taxable and Nontaxable Income
Qualifying Dispositions
If you satisfied both holding periods, the ordinary income is the lesser of two amounts: the discount your plan offered at the grant date (often 15% of the grant-date fair market value), or the actual gain on the sale. The rest of the profit is long-term capital gain.4Office of the Law Revision Counsel. 26 U.S. Code 423 – Employee Stock Purchase Plans The ordinary income figure is smaller in a qualifying disposition, but you still need the basis adjustment. Whatever your employer put on your W-2 has to be added to your basis, or you pay tax on it twice.
Calculating the Adjusted Basis
Take what you actually paid for the shares and add the ordinary income that appeared on your W-2. That total is your correct cost basis.
An example. Your ESPP grant-date fair market value was $40 per share. By the purchase date the stock had climbed to $50. With a 15% discount and a lookback provision, you paid 85% of $40, or $34 per share. You bought 100 shares and sold all of them at $55 per share in a disqualifying disposition.
- Ordinary income per share: $50 minus $34 = $16
- Total ordinary income on W-2: $16 × 100 = $1,600
- 1099-B reported basis: $34 × 100 = $3,400
- Adjusted cost basis: $3,400 + $1,600 = $5,000
- Sale proceeds: $55 × 100 = $5,500
- Correct capital gain: $5,500 − $5,000 = $500
Skip the adjustment and your return shows a $2,100 gain ($5,500 minus $3,400), even though $1,600 of that was already taxed as wages. The adjustment removes the overlap and leaves capital gains tax on the $500 of post-purchase appreciation, which is the only real gain.
Entering the Adjustment on Form 8949
Form 8949 is where the correction happens. The IRS instructions say to enter the basis exactly as your broker reported it, then fix it in the adjustment column rather than overwriting the original figure.2Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets
Using the numbers above:
- Column (d), Proceeds: $5,500.
- Column (e), Cost basis: $3,400, matching the 1099-B even though you know it is low.
- Column (f), Adjustment code: B. This code tells the IRS the broker-reported basis is incorrect.2Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets
- Column (g), Adjustment amount: ($1,600), entered as a negative in parentheses so the gain is reduced.2Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets
- Column (h), Gain or loss: $5,500 − $3,400 + (−$1,600) = $500.
Use Part I of Form 8949 for shares held one year or less, and Part II for shares held longer than a year. Qualifying dispositions always land in Part II because the holding period rules require more than a year. The totals flow to Schedule D.2Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets
If You File With Tax Software
Every major tax program can produce the correct result, but only if you tell it the sale came from an ESPP. In TurboTax, after you import or enter your 1099-B, the software prompts you for the Form 3922 details and computes the adjusted basis from those inputs. Fidelity and E*Trade offer imports that carry ESPP data forward, but verify the final basis figure against your own records. Other packages follow the same pattern: import the 1099-B, flag the sale as ESPP, then enter the purchase details.
If you just accept the imported 1099-B and click through, the software has no way to know the basis is wrong. That is where most double-tax mistakes happen.
Wash Sales on ESPP Losses
ESPP purchases happen on a schedule, and that schedule can trigger the wash sale rule. If you sell shares at a loss and your plan buys new shares of the same stock within 30 days before or after the sale, the loss is disallowed.5Office of the Law Revision Counsel. 26 U.S. Code 1091 – Loss From Wash Sales of Stock or Securities Plans with monthly purchases or overlapping offering periods make this easy to miss.
The disallowed loss is added to the basis of the newly purchased shares, so the tax benefit is deferred rather than lost. On Form 8949, report the wash sale with Code W in column (f) and enter the disallowed loss as a positive number in column (g).2Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets To actually claim a loss, time the sale so it falls outside any 30-day window around your plan’s next purchase, which may mean pausing your enrollment.
Fixing a Prior Return
If you already filed without adjusting the basis, file Form 1040-X to correct it.6Internal Revenue Service. File an Amended Return Attach a corrected Form 8949 and Schedule D showing the adjusted basis, along with a complete amended Form 1040.7Internal Revenue Service. Instructions for Form 1040-X (Rev. December 2025)
The deadline is three years from the date you filed the original return or two years from the date you paid the tax, whichever is later. If you filed before the April deadline, the three-year clock runs from that April deadline.6Internal Revenue Service. File an Amended Return Form 1040-X can be filed electronically for the current year and two prior tax periods; older years require a paper filing.8Internal Revenue Service. About Form 1040-X – Amended U.S. Individual Income Tax Return
If the amendment produces a refund, the IRS pays interest on the overpayment at a rate that adjusts quarterly.9Internal Revenue Service. Internal Revenue Bulletin 2026-08 For a sale of any real size, the recovered tax plus interest is worth the paperwork.