ESPP Explained: How an Employee Stock Purchase Plan Works and When to Sell
An ESPP lets you buy your employer's stock at up to a 15% discount. Learn how the lookback works, how qualifying vs disqualifying sales are taxed, and how to plan when to sell.
An employee stock purchase plan (ESPP) is one of the few workplace benefits that can hand you a discount on a liquid, publicly traded asset. It is also one of the easiest to misuse, because the tax rules are confusing and the stock is tied to the same company that pays your salary.
This guide covers how an ESPP works, how the lookback changes the math, how the two sale types are taxed, and how to build a sell plan you can follow without watching the stock all day.
How an ESPP Works
Most ESPPs run in repeating offering periods, commonly six months, with a purchase at the end of each one.
- You enroll and choose a percentage of your paycheck to contribute, after tax.
- Money accumulates in a plan account during the offering period.
- On the purchase date, the plan uses your balance to buy company shares at a discounted price.
- The shares are yours. You can usually sell immediately or hold them.
In a US plan that qualifies under Section 423 of the tax code, the discount can be up to 15% of the stock price. There is also a cap of $25,000 per calendar year of stock, measured at the share price when the offering began, not what the shares are worth later. Plan details vary by company, so check your plan document for the exact percentages, dates and limits.
The Lookback Provision
Many plans include a lookback. Instead of discounting the price on the purchase date, the plan uses the lower of two prices:
- the stock price on the first day of the offering period, or
- the stock price on the purchase date.
Then it applies the discount to that lower number.
Here is a simple hypothetical, not a real company. Say the stock is $100 when the period starts and $130 on the purchase date, with a 15% discount.
| Item | Amount |
|---|---|
| Price at start of period | $100.00 |
| Price on purchase date | $130.00 |
| Lower of the two | $100.00 |
| Your purchase price (15% off) | $85.00 |
| Value of each share on purchase date | $130.00 |
| Immediate gain per share | $45.00 (about 53% over what you paid) |
Without a lookback, you would pay $110.50 and the built-in gain would be $19.50 per share. If the stock falls during the period, the lookback uses the lower purchase-date price, so you still get the discount, just on the lower number. This asymmetry is why plans with a lookback are especially valuable when a stock is rising.
How ESPP Shares Are Taxed
Taxes are where people get tripped up. For a qualified US plan there is no tax when you buy. Tax comes when you sell, and it depends on how long you held.
Disqualifying disposition
You sell before meeting the holding periods. The discount you received is taxed as ordinary income (the difference between the market price on the purchase date and what you paid). Any further gain or loss after that is a short-term or long-term capital gain or loss, depending on how long you held after purchase.
Selling the same day you buy is the most common example. You keep the discount, pay ordinary-income rates on it, and have little to no market risk.
Qualifying disposition
You sell at least two years after the offering period began and at least one year after the purchase date. Ordinary income is then limited to the smaller of two amounts: your actual gain, or the discount measured at the start of the offering period. Everything above that is a long-term capital gain, which is usually taxed at a lower rate.
Two practical warnings:
- Watch your cost basis. Your broker's 1099-B often shows only what you paid. The ordinary-income piece is reported on your W-2 or plan statements, and if you ignore the adjustment you can pay tax on the same dollars twice.
- A qualifying sale is not always better. Waiting for lower tax rates means holding company stock for up to two years. A drop in price can wipe out more than the tax savings.
This is general education, not tax advice. Ask a tax professional about your own plan.
Sell Immediately or Hold?
There is no single answer, but a few facts help.
The case for selling right away. The discount is a nearly risk-free gain once you own the shares at the market price. You also already depend on this company for your paycheck, and often for stock grants or a 401(k) match. Holding more of it concentrates the same risk in a second place. If your job and your portfolio both suffer on the same bad day, a diversified portfolio would have helped.
The case for holding. If you believe in the company and can tolerate the risk, holding for a qualifying disposition can reduce taxes. Holding is a separate investing decision from the discount, and it should be judged like any stock you would buy at the current price.
A useful test: if you would not buy this stock today with cash at the market price, you probably should not hold it just because you got a discount on it.
Build a Sell Plan Before the Purchase Date
Decisions made in the moment tend to be emotional. Write down your plan before shares land in your account.
- Decide your default. Sell all, sell a fixed percentage, or hold a set number of shares.
- Set a maximum concentration. For example, no more than a small slice of your investable assets in employer stock.
- Pick price levels. Choose a price where you will take profit and a price where you will reassess.
- Mind blackout windows. Insiders and many employees cannot trade around earnings. Know your company's trading calendar so you are not locked out when you want to sell.
- Reinvest the proceeds. Move the cash to a diversified plan, such as the one in our portfolio rebalancing guide.
Using Alerts for Your ESPP Stock
Once you have a plan, alerts keep you from having to monitor it manually. On Stock Alarm Pro you can set alerts on your employer's ticker for:
- Your purchase price, so you know when a position is underwater.
- A target price where you planned to sell some shares.
- A drop of a set percentage that tells you to reread the news and your plan.
- Earnings dates, since big moves around reports are common.
If you are unsure what level to choose, the stock screener can help you compare your company with its peers, and our guide to stop-loss orders explains how to decide where a loss is large enough to act.
Key Takeaways
- An ESPP buys your employer's stock at a discount of up to 15% with after-tax payroll deductions.
- A lookback can make the effective discount far larger when the stock rises during the offering period.
- Sell before the holding periods and the discount is ordinary income. Sell after and part of the gain can be long-term capital gain.
- Selling quickly locks in the discount and reduces concentration. Holding is a separate bet on the company.
- Decide your rules in advance and set alerts so price moves prompt action instead of panic.
Stock Alarm on your phone
Set price alerts and follow the stocks you track in the Stock Alarm app for iPhone and Android.
Want alerts like these? Get started free.
Join 295,000+ traders using Stock Alarm to stay ahead of the market.
See it work — free
Track markets, screen stocks, and set price alerts with Stock Alarm Pro. Explore the live markets free — no account needed. Trusted by 295,000+ investors.
S&P 500 Screener
Filter by metrics, fundamentals
Price Alerts
Never miss a move
35+ Global Markets
Stocks, crypto, futures
AI Analysis
Ask questions, get answers
Related Articles

Dividend Yield Explained: How to Calculate It and When a High Yield Is a Warning
Dividend yield is annual dividends divided by share price. Learn the formula, see real yields for KO, XOM, VZ, JNJ, AAPL and MSFT, and why a very high yield can signal trouble.

ETF Expense Ratio Explained: What a Fund Fee Really Costs You
An ETF expense ratio is the yearly fee a fund takes out of your money. See how 0.03% vs 0.75% compounds over 30 years, what a good ratio looks like, and what to check besides fees.

Margin of Safety Explained: Benjamin Graham's Rule for Not Overpaying
Margin of safety is buying a stock well below your estimate of its value so you can be wrong and still do fine. Learn Graham's original tests, how Buffett adapted them, and how to screen and set alerts for it.