What Is an ESPP: Discount, Taxes, and Cost Basis

An employee stock purchase plan, or ESPP, is a benefit that lets you buy your employer’s stock at a discount through automatic payroll deductions. Plans that qualify under Section 423 of the Internal Revenue Code can offer up to a 15% discount off the market price, and you owe no tax on that discount until you eventually sell the shares. What you actually keep after taxes depends on how long you hold the stock after buying it.

How the Discount Works

A qualified ESPP runs on a schedule. The offering date starts the offering period. Inside that window are one or more purchase periods, during which money is pulled from your paycheck after taxes. On the purchase date at the end of each period, the plan uses your accumulated cash to buy shares at the discounted price.

The statute requires the purchase price to be at least 85% of the stock’s fair market value on either the offering date or the purchase date. Most plans go further and add a look-back provision: the price is 85% of whichever price was lower, the offering date or the purchase date. If the stock rises during the offering period, you buy at 85% of the older, cheaper price. If it falls, you buy at 85% of the current price. Federal law caps the offering period at 27 months when a look-back is used.1Office of the Law Revision Counsel. 26 USC 423 – Employee Stock Purchase Plans

The look-back is where most of the value lives. On a stock that moves meaningfully during the offering period, buying at 85% of the lower price can produce a return well above the headline 15%.

Who Can Participate and How Much You Can Buy

Section 423 plans must generally be offered to all employees, but the law lets companies exclude a few groups: employees with less than two years of service, people who typically work 20 hours a week or less, seasonal employees working five months or less per year, and highly compensated employees.1Office of the Law Revision Counsel. 26 USC 423 – Employee Stock Purchase Plans Most companies set shorter service requirements than the two-year ceiling, so check your plan document for the specific rules.

There’s also an ownership limit. If you already own 5% or more of your company’s stock (counting shares you could acquire through outstanding options), you can’t participate.1Office of the Law Revision Counsel. 26 USC 423 – Employee Stock Purchase Plans

Contributions typically run from 1% to 15% of pay, taken after taxes. On top of whatever your plan allows, federal law caps your purchases at $25,000 worth of stock per calendar year across all of your employer’s ESPPs.2Internal Revenue Service. Internal Revenue Bulletin 2009-49 The IRS measures that $25,000 using the stock price on the offering date, not the discounted price you actually pay. If shares were worth $50 on your offering date, you can buy up to 500 shares that year ($25,000 ÷ $50), even though you’ll pay less than $50 each after the discount.

How Purchases Happen and How to Back Out

Once you enroll, your chosen percentage comes out of each paycheck and sits with the plan until the purchase date. On that date, the plan automatically buys shares at the discounted price and deposits them in your brokerage account. Most plans buy only whole shares; leftover cash is either carried to the next period or refunded.

You’re not locked in. Most plans let you withdraw during the offering period and get your accumulated contributions back. Shares already purchased in an earlier period of the same offering stay in your account. If you leave the company before the next purchase date, the plan refunds your unspent contributions, since it can’t buy shares after your employment ends. If you’re planning to leave, pay attention to whether your last day falls before or after the next purchase, because a purchase while you’re still employed can be worth keeping.

Taxes When You Sell: Qualifying vs. Disqualifying

How your ESPP shares are taxed depends entirely on when you sell. A qualifying disposition means you sold at least two years after the offering date and at least one year after the purchase date.1Office of the Law Revision Counsel. 26 USC 423 – Employee Stock Purchase Plans Miss either deadline and it’s a disqualifying disposition.

Qualifying Disposition

In a qualifying disposition, only part of your profit is taxed as ordinary income. That ordinary income is the lesser of two numbers: the discount based on the offering-date price (typically 15% of the offering-date fair market value), or your actual gain on the sale. The rest of the gain is taxed at long-term capital gains rates. Qualified ESPP income is not subject to Social Security or Medicare taxes.

The look-back makes this favorable. Suppose the stock was $40 on the offering date and $80 on the purchase date. You bought at $34 (85% of $40). You later sell at $100 in a qualifying disposition. Your ordinary income is $6 per share (15% of the $40 offering-date price), not the $46 difference between what you paid and the purchase-date value. The remaining $60 per share is a long-term capital gain. If the stock has fallen below the offering-date price, your ordinary income is limited to your actual gain, and a sale at a loss produces zero ordinary income and a capital loss.

Disqualifying Disposition

Sell before meeting both holding periods and the entire spread between the purchase-date fair market value and your discounted price is taxed as ordinary income.1Office of the Law Revision Counsel. 26 USC 423 – Employee Stock Purchase Plans Your employer reports this on your W-2 for the year of the sale. Any gain above the purchase-date fair market value is a capital gain, short-term or long-term depending on how long you held after the purchase date. If the stock has dropped below the purchase-date fair market value, you still owe ordinary income on the full discount but can claim a capital loss on the decline.

Quick example. You bought at $34 when the purchase-date value was $40. Three months later you sell at $37. Your ordinary income is $6 per share ($40 − $34). Your adjusted basis becomes $40, so you have a $3 per-share short-term capital loss. The ordinary income and the capital loss offset only partially, since they’re taxed at different rates.

Don’t Pay Tax Twice: Adjusting Your Cost Basis

This is where most participants overpay on their tax return. When your broker sends Form 1099-B after a sale, the cost basis on that form generally does not include the ordinary income you recognized from the discount. Enter the 1099-B numbers straight into your tax software and you’ll pay tax on the discount twice: once as ordinary income on your W-2 and again as part of an inflated capital gain on Schedule D.

The fix is to add the ordinary income amount to your purchase price to get an adjusted cost basis. Your real capital gain or loss is the sale price minus that adjusted basis. When filing, report the 1099-B basis as shown, then enter an adjustment on Form 8949 to correct it. The 1099-B instructions tell brokers not to include the compensation element in the reported basis, so the IRS expects this adjustment.3Internal Revenue Service. About Form 3922, Transfer of Stock Acquired Through an Employee Stock Purchase Plan

Your employer must give you Form 3922 for each ESPP purchase where you paid less than 100% of fair market value.4Internal Revenue Service. Form 3922 – Transfer of Stock Acquired Through an Employee Stock Purchase Plan Under Section 423(c) It shows the offering-date fair market value, the purchase-date fair market value, the price you paid, and the transfer date. Keep every Form 3922 while you own the shares and for at least three years after you sell them. Without it, rebuilding the correct basis later is painful.

If Your Plan Isn’t a Section 423 Plan

Not every employer stock purchase plan qualifies under Section 423. A non-qualified ESPP skips the statutory requirements, which costs you the tax deferral. The discount is taxed as ordinary income at purchase, not at sale, and your employer withholds income tax, Social Security, and Medicare from it on your paycheck. Because you’ve already paid tax on the discount, your basis equals the full purchase-date fair market value, and when you later sell you only owe capital gains tax on any appreciation above that. There are no qualifying or disqualifying holding periods.

Check your plan document or prospectus to see which type you have. The after-tax value can differ substantially, especially in a higher tax bracket where a qualifying disposition under a 423 plan can shift most of your gain to long-term capital gains rates.

Watch for Wash Sales

If you sell ESPP shares at a loss and your plan makes another automatic purchase within 30 days before or after that sale, the IRS treats it as a wash sale. The loss is disallowed and added instead to the basis of the newly purchased shares. You don’t lose the deduction forever, but you can’t claim it until you sell the replacement shares without triggering another wash sale.

Plans with frequent purchase dates make this easy to stumble into. If your ESPP buys monthly or reinvests dividends automatically, almost any loss sale will fall within 30 days of another purchase. Before selling at a loss, check your plan’s next purchase date. If it’s inside the window, consider withdrawing from the current offering period before you sell, or wait until the purchase settles and 31 days have passed.