Under a qualified employee stock purchase plan governed by Section 423 of the Internal Revenue Code, employee stock purchase plan taxes work in two stages: nothing is owed when your payroll deductions convert into discounted shares, and the tax bill arrives only when you sell. How much you owe then depends on how long you held the shares, whether your sale counts as a qualifying or disqualifying disposition, and whether you correctly adjust the cost basis your broker reports.
No Tax at Purchase
The defining tax feature of a qualified ESPP is deferral. When your accumulated payroll deductions buy shares at up to a 15 percent discount on the purchase date, you recognize no income, even though you just acquired stock worth more than you paid.1Office of the Law Revision Counsel. 26 USC 423 Employee Stock Purchase Plans The tax event is the sale, not the purchase. That single rule is what gives ESPPs their planning value, because it hands you control over the timing and character of the income.
Non-qualified plans work differently. They can offer larger discounts and skip the Section 423 rules, but the discount is taxed as ordinary income in the year the shares are purchased whether you sell or not. Everything below assumes a qualified Section 423 plan. If your employer’s plan is non-qualified, the sale-side rules still apply to any additional appreciation, but the discount itself has already been taxed.
Qualifying vs. Disqualifying Dispositions
The IRS splits ESPP sales into two categories with materially different tax treatment.
A qualifying disposition requires holding the shares for at least two years from the beginning of the offering period and at least one year from the purchase date.2Internal Revenue Service. Stocks (Options, Splits, Traders) 5 Meet both, and the ordinary income you recognize equals the lesser of your actual gain or the discount that was applied to the stock price at the beginning of the offering period. Everything above that amount is a long-term capital gain. If you sold at a loss, you recognize zero ordinary income and report the loss as a capital loss.
A worked example makes the split concrete. Your offering period starts when the stock is at $40. With a 15 percent discount and a look-back provision, you pay $34 per share. You hold long enough to qualify and sell at $55. The ordinary income portion is $6 per share, which is 15 percent of the $40 grant-date price. The remaining $15 per share ($55 minus $40) is a long-term capital gain. Because the top ordinary income rate is 37 percent and the top long-term capital gains rate is 20 percent, the character split is where the planning money lives.3Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Sell before meeting both holding periods and you trigger a disqualifying disposition. Ordinary income now equals the full spread between the stock’s fair market value on the purchase date and the price you actually paid, reported on your W-2 by your employer.2Internal Revenue Service. Stocks (Options, Splits, Traders) 5 Any additional profit above that fair market value is a capital gain, short-term or long-term depending on how long you held after the purchase date. A disqualifying disposition isn’t always the wrong choice: locking in a gain on a stock you expect to fall can be worth converting some capital gain into ordinary income, but you should know what the conversion costs you before you sell.
Adjusting Your Cost Basis so You Aren’t Taxed Twice
This is where most participants overpay. When your broker issues Form 1099-B after the sale, the cost basis in Box 1e typically shows only what you paid for the stock. It doesn’t reflect the ordinary income already reported on your W-2. Enter that 1099-B number straight into your return and the discount gets taxed twice: once as compensation on the W-2, and again as capital gain on Schedule D.
The fix is to build an adjusted cost basis. Take your original purchase price and add the ordinary income amount that appears on your W-2 for the sale. That sum is your true basis. Subtract it from the sale proceeds to get your actual capital gain or loss, then report the adjustment on Form 8949 using column (g) for the adjustment code and amount.4Internal Revenue Service. Instructions for Form 8949
Your employer is required to file Form 3922 with the IRS and give you a copy for each transfer of stock acquired through the ESPP.5Internal Revenue Service. About Form 3922, Transfer of Stock Acquired Through an Employee Stock Purchase Plan It lists the grant-date price, the purchase-date price, the price you paid, and the exercise date, which is everything you need to compute the ordinary income and the adjusted basis. Keep it with your 1099-B and W-2 at tax time. Some brokers include a supplemental sheet with the adjusted basis pre-calculated. That sheet isn’t sent to the IRS, so the burden of getting it onto Form 8949 correctly is yours.
Watch for a Wash Sale When Payroll Deductions Keep Buying
Sell ESPP shares at a loss and the wash sale rule can quietly cancel your deduction. The rule disallows a loss when you sell a security at a loss and acquire a substantially identical security within a 61-day window running from 30 days before the sale through 30 days after.6Fidelity. Wash-Sale Rules An automatic ESPP purchase during that window counts as acquiring the same stock.
The loss doesn’t vanish. It gets added to the basis of the newly purchased shares and reduces your taxable gain when those shares are eventually sold. But if you were harvesting the loss to offset gains in the current year, the deferral defeats the point. Before selling at a loss, check the next scheduled ESPP purchase date and either time the sale outside the 30-day window or accept that the loss will be pushed forward.
The 3.8 Percent Net Investment Income Tax
High earners face an additional 3.8 percent Net Investment Income Tax on capital gains from ESPP sales. It applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly.7Internal Revenue Service. Net Investment Income Tax Those thresholds are not indexed for inflation, so more households cross them each year.
Stacked with the 20 percent top long-term capital gains rate and state income taxes, the effective rate on ESPP gains for high earners can approach 30 percent or more depending on where you live. Include this when you’re deciding between holding for the qualifying disposition and selling early.
Withholding Gaps to Plan Around
One quirk catches sellers off guard. On a disqualifying disposition, the ordinary income lands on your W-2, but your employer isn’t required to withhold Social Security or Medicare taxes on it, and income tax withholding at the point of sale doesn’t fall on the employer either. The result is a larger April balance than the W-2 alone would suggest, especially after a substantial sale. Making an estimated tax payment in the quarter you sell keeps the shortfall from becoming an underpayment penalty.