This ESPP tax calculator breaks down the tax when you sell employee stock purchase plan shares, splitting your profit into ordinary income and capital gain — and showing how that split changes between a qualifying and a disqualifying disposition. The 15% discount that makes an ESPP so attractive is also a tax trap if you mis-report your cost basis. Enter your grant price, purchase price, sale price, and shares to see exactly what's taxed and how, and how holding longer can move income into lower long-term rates.
A qualified employee stock purchase plan (under Internal Revenue Code Section 423) lets you buy your employer's stock at a discount — commonly up to 15% off — through payroll deductions. Many plans add a lookback: the discount applies to the lower of the price at the start of the offering period or the price on the purchase date. That combination can produce an effective discount well beyond 15%, which is why ESPPs are often called one of the best employee benefits available. But the discount you pocket is income, and the tax rules around it are where people stumble.
Whether your sale is "qualifying" hinges on two clocks:
Meet both and you have a qualifying disposition — favorable tax. Sell before either clock runs out and it's a disqualifying disposition, which taxes more of your gain at ordinary rates.
If you sell early, the bargain you got at purchase is treated as compensation. Your ordinary income equals the fair market value on the purchase date minus the price you actually paid (your discount at purchase). This amount is usually added to your W-2. Anything you make above the purchase-date FMV is capital gain (short- or long-term depending on how long you held). The trade-off: you cash out sooner and reduce stock-price risk, but more of the profit is taxed at your higher ordinary rate.
Hold long enough and the tax math improves. Your ordinary income becomes the lesser of: (a) the discount measured at the grant date, or (b) your total gain on the sale. The remaining gain is long-term capital gain, taxed at the lower 0%/15%/20% rates. For a stock that rose substantially, this shifts a big chunk of profit from ordinary to capital-gain treatment — the core reward for holding through the qualifying period.
This is the single most common ESPP mistake. The ordinary income you report (the discount) is added to your cost basis. But brokers frequently report only the actual purchase price on Form 1099-B — not the adjusted basis. If you simply copy the broker's number onto your return, you'll pay tax on the discount twice: once as ordinary income on your W-2 and again as inflated capital gain. The fix is to adjust your basis upward by the ordinary income on Form 8949 (using the figures from your Form 3922). The calculator shows the adjusted basis you should report.
Grant price $20, purchase-date price $25, 15% discount, sold at $40, 500 shares, qualifying disposition.
| Step | Per share |
|---|---|
| Purchase price (15% off the $20 lookback) | $17.00 |
| Total gain ($40 − $17) | $23.00 |
| Discount at grant ($20 × 15%) | $3.00 → ordinary income |
| Long-term capital gain ($23 − $3) | $20.00 |
Across 500 shares: $1,500 ordinary income and $10,000 long-term capital gain — with most of the profit enjoying the lower capital-gains rate. A disqualifying sale would instead push $4,000 (the $25 − $17 purchase discount × 500) into ordinary income.
An immediate sale converts your discount into a near-guaranteed profit and eliminates the risk of holding a concentrated position in your employer's stock — a meaningful risk if your salary and savings both ride on one company. Holding for the qualifying period can lower your tax rate on part of the gain, but only if the stock holds up. Financial planners often suggest selling promptly to bank the discount and diversify, accepting the slightly higher tax as the price of removing single-stock risk. Your tax bracket and risk tolerance decide.
For a qualified Section 423 ESPP, the discount income is not subject to Social Security or Medicare (FICA) tax — unlike many other forms of equity compensation. It is, however, subject to income tax and shows up on your W-2 in the year of a disqualifying disposition (or is reported by you for a qualifying one). Your employer issues Form 3922 at purchase, which carries the grant price, purchase price, and FMV figures you need for these calculations.
The tool computes your purchase price from the lookback (lower of grant or purchase-date price) and discount, then splits your total gain. For a disqualifying disposition it sets ordinary income to the purchase-date discount; for a qualifying disposition it sets ordinary income to the lesser of the grant-date discount or your total gain, with the rest as long-term capital gain. It also reports the adjusted cost basis to enter on Form 8949 so you don't get taxed twice. All logic follows the Section 423 rules for 2026.
The single feature that turns a good ESPP into a great one is the lookback provision. Without a lookback, a 15% discount on a $25 stock saves you $3.75 a share — nice, but modest. With a lookback, the 15% discount applies to the lower of the price at the start of the offering period or the price on the purchase date. If the stock was $20 when the offering began and $25 at purchase, your price is 15% off the $20 figure — $17 — even though the stock is now worth $25. That's an effective discount of 32%, not 15%, the instant you buy. In a rising market over a six-month offering, lookback ESPPs can routinely deliver effective discounts well north of 20%, which is why financial planners often call a lookback ESPP one of the highest-return, lowest-risk uses of payroll dollars available to employees. The calculator above already applies the lookback by using the lower of your grant and purchase prices as the discount base.
Qualified Section 423 plans cap how much stock you can buy: you may accrue the right to purchase no more than $25,000 of stock per calendar year, measured by the fair market value at the grant date (not the discounted price you pay). This limit applies across all offerings in a year and is why even enthusiastic participants can't pour unlimited money into an ESPP. Importantly, because the cap is measured at the grant-date value, a lookback discount lets you actually purchase more than $25,000 of current value with your $25,000 of grant-value capacity. Plan your payroll contributions so you use the full annual room without overshooting it, since contributions beyond the limit are typically refunded without the discount — wasted opportunity. If you join mid-year or the stock moves sharply, check how your plan administrator applies the cap to avoid surprises at purchase.
Reporting trips up even careful filers, so here's the sequence. At purchase, your employer issues Form 3922, which carries the grant-date price, purchase-date price, and the price you paid — keep it, because you'll need those numbers for years. When you sell, your broker sends Form 1099-B, which often reports only your actual purchase price as the cost basis. You report the sale on Form 8949 and Schedule D, and this is where you must adjust the basis upward by the ordinary-income portion (the discount already taxed on your W-2 or reported by you), using code "B" to flag the adjustment. Skip that step and you'll pay capital-gains tax on the discount a second time. For a disqualifying disposition, also confirm the ordinary income actually appeared on your W-2 (Box 1); if your employer didn't include it, you report it as wages. Running the numbers through the calculator first gives you the adjusted basis and the ordinary/capital split to check your forms against before you file.
A sale of ESPP shares held more than 2 years from the offering date and more than 1 year from the purchase date, which gets favorable tax treatment, only the lesser of the grant-date discount or your gain is ordinary income.
Disqualifying: the discount at purchase (FMV on purchase date minus price paid). Qualifying: the lesser of the grant-date discount or your total gain; the remainder is capital gain.
It shouldn't be, but it often is by mistake. The discount taxed as ordinary income is added to your basis; since brokers report only the purchase price, you must adjust basis upward on Form 8949 to avoid double tax.
A qualified Section 423 plan can offer up to 15% off, and a lookback can make the effective discount larger by applying it to the lower of the offering-date or purchase-date price.
Selling now locks in the discount and removes single-stock risk but taxes more as ordinary income; holding can shift gain to long-term rates but adds price risk. It depends on your bracket and risk tolerance.
For a qualified Section 423 ESPP, the discount income is not subject to Social Security or Medicare tax, though it is subject to income tax and reported on your W-2.