How is an ESPP taxed?

Last updated August 2026

Short answer

An ESPP splits into two pieces at sale. The discount you received is generally taxed as ordinary income, and anything above that is a capital gain. How much lands in each bucket depends on whether your sale is qualifying, meaning at least two years from the offering date and one year from purchase, or disqualifying, meaning sooner.

An ESPP is usually the best-value benefit an employer offers and has the most confusing tax treatment of any of them. The confusion is worth pushing through, because the discount is close to free money.

How the plan works before any tax

You contribute through payroll over an offering period. At the end, the plan buys shares for you at a discount, commonly 15%, off the market price.

Many plans add a lookback, buying at a discount to the lower of the price at the start or the end of the period. In a rising market that can be worth far more than the headline discount.

Nothing is taxed when you contribute, and nothing is taxed at purchase in a qualified plan. The tax arrives when you sell.

The two clocks

A sale is qualifying if it happens at least two years after the offering date and at least one year after the purchase date. Both must be satisfied.

Anything sooner is disqualifying. Nothing is disallowed, and it is not a penalty; it simply changes how the proceeds are split between ordinary income and capital gain.

Because the offering date can be six months before the purchase date, the two-year clock is usually the binding one.

Disqualifying sale: the common case

The discount measured at purchase is taxed as ordinary income, and it is generally added to your W-2.

Everything above the purchase-date market price is a capital gain, short-term if you sold within a year of purchase, long-term if not.

Selling immediately at purchase is the simplest version: essentially all of the benefit is ordinary income, you capture the discount, and you take no price risk.

Qualifying sale: the more favourable split

The ordinary income portion becomes the lesser of the actual gain, or the discount measured against the price at the offering date.

Everything else is a long-term capital gain, taxed at the preferential rate.

So holding long enough converts part of what would have been ordinary income into capital gain. If the shares fell, the ordinary income component can be smaller than the headline discount, and the whole thing may even be a loss.

Cost basis, and the same trap as RSUs

Your basis is what you paid, plus any amount already taxed as ordinary income. Brokers frequently report only what you paid, omitting the compensation element.

Filing that unchanged means paying ordinary income tax on the discount through your W-2 and capital gains tax on the same amount again.

Plan statements show the figures needed to correct it. This is the most common ESPP filing error and it always favours the IRS.

Try it in Walnut

Walnut reads your connected brokerage positions, so accumulated employer stock shows up alongside everything else rather than sitting in a plan portal you rarely open.

Is the discount worth the risk

A 15% discount with a lookback, sold immediately, is a large return on money that was only committed for a few months, and it carries no market risk if you sell at purchase.

Holding for the qualifying period converts part of the benefit to capital gain treatment, but it also means holding concentrated employer stock through whatever happens to the price. The tax saving can easily be smaller than the price move.

Neither choice is wrong. The point is that holding for tax reasons is a market bet, and it should be made deliberately.

What to check

Whether your plan has a lookback, which changes the value of the discount substantially.

Your offering and purchase dates, so you know which clock you are on and when a qualifying sale becomes possible.

The basis your broker will report, and whether it needs adjusting for the compensation element.

Sources

Equity compensation is covered in IRS Publication 525. Cost basis and 1099-B reporting are in IRS Publication 550. Walnut is informational and is not an investment adviser. This guide is educational and not personalized tax or investment advice; anything with a tax consequence is worth confirming with a tax professional.

FAQ

How is an ESPP taxed?

+

The discount is generally taxed as ordinary income and anything above it as a capital gain. The split depends on whether the sale is qualifying, at least two years from the offering date and one year from purchase, or disqualifying, meaning sooner than that.

What is a qualifying versus disqualifying ESPP sale?

+

Qualifying means at least two years after the offering date and one year after purchase; both clocks must be met. Disqualifying means sooner. A disqualifying sale taxes the full purchase-date discount as ordinary income; a qualifying sale can move more of the benefit into long-term capital gain.

Should I sell ESPP shares immediately?

+

Selling at purchase locks in the discount with no market risk, and most of the benefit is ordinary income. Holding for the qualifying period improves the tax split but means carrying concentrated employer stock, where a price move can easily exceed the tax saving.

Why is my ESPP cost basis wrong?

+

Brokers often report only the discounted price you paid, omitting the discount already taxed as ordinary income through your W-2. Filing it unchanged means being taxed twice on the same amount. Your plan statements have the figures needed to adjust it.

Related guides

    How is an ESPP taxed? - Walnut AI Investing App