ESPP Calculator

Qualified and disqualifying sales: find the purchase price, the W-2 income, and the capital gain on ESPP shares.

Finance and MoneyUpdated 2026-10-173 min read
ESPP Calculator
The broker reports this on Form 3922.
Ordinary income (W-2)
...
Capital gain or loss...
Your purchase price...
Total gain...

What it does

An employee stock purchase plan lets you buy company stock at a discount through payroll deductions. The discount is the headline number, but the tax picture splits the gain into wages and capital gain, and the split depends on when you sell.

Sale timing defines the two paths. Hold at least 2 years from the offering date and 1 year from the purchase date and the sale is qualifying; sell earlier and it is disqualifying. The tool above runs both from the same numbers so you can compare side by side.

On a qualifying sale, the wage piece is capped at the discount per share. On a disqualifying sale, the bargain element on the purchase day becomes wages: the market value at purchase minus what you paid, capped by the actual gain. The rest is capital gain or loss either way.

Plans vary. Some use a lookback that sets the purchase price from the lower of the offering price or the price at the end of the offering period, and Form 3922 from your broker reports the exact numbers the IRS expects you to use.

How to use

  1. Pick the disposition: qualifying if you met both holding periods, disqualifying otherwise.
  2. Enter the offering price per share and the plan discount, usually 15%.
  3. Enter the market price on the purchase date from your broker statement.
  4. Enter the price you sold at and the number of shares.
  5. Read the purchase price, the ordinary income that lands on your W-2, and the capital gain.
  6. Flip the disposition selector to see how an early sale shifts income from capital gain to wages.

Formula

Purchase = offering x (1 - discount/100). Qualifying: ordinary income per share = min(sale - purchase, offering - purchase). Disqualifying: ordinary income per share = min(sale, market at purchase) - purchase, floored at 0. Capital gain = sale - purchase - ordinary piece.
offering
Offering or grant price per share at the start of the plan period.
discount
Plan discount as a percent, commonly 15%.
purchase
What you paid per share: offering x (1 - discount/100).
market
Market price per share on the purchase date.
sale
Price per share when you sell.
shares
Number of shares in the sale.

The qualifying wage piece is the smaller of the sale gain and the discount per share. The disqualifying piece is the purchase day bargain element, capped by the actual sale gain: sell at or below your purchase price and no wage income applies, only a capital loss. The tool assumes the simple 15% style discount and reports per-lot totals without broker fees. Tax withholding on the wage piece is not shown; the amount appears on your W-2 and payroll handles it.

Worked example

Example: $100 offering price at a 15% discount, sold at $120

Offering price $100, discount 15%, market price at purchase $105, sale price $120, 100 shares, qualifying disposition.

  1. Purchase price: 100 x (1 - 0.15) = $85.00 per share.
  2. Sale gain per share: 120 - 85 = $35.00.
  3. Discount per share: 100 - 85 = $15.00.
  4. Qualifying wage piece: the smaller of 35 x 100 = $3,500.00 and 15 x 100 = $1,500.00, so $1,500.00.
  5. Capital gain: (35 - 15) x 100 = $2,000.00, long term when held long enough.
  6. Total gain: 35 x 100 = $3,500.00. Tool shows $1,500.00, $2,000.00, $85.00 per share, and $3,500.00.

Reference table

The same 100 shares at a $85.00 purchase price under each sale type
Sale typeOrdinary incomeCapital gainNotes
Qualifying at $120$1,500.00$2,000.00Held 2 years from offering, 1 year from purchase
Disqualifying at $120$2,000.00$1,500.00Bargain element at purchase becomes wages
Disqualifying at $80$0.00-$500.00No wage income on a loss; the gap is a capital loss

Limits

  • Federal treatment only; state tax rules and payroll withholding sit outside this page.
  • Plans with a lookback use the lower of two prices, which shifts the purchase price and both pieces.
  • Commission, fees, currency effects, and share rounding are not included.
  • The tool reports the taxable split, not the cash flow timing of the sale or the tax you will owe at your bracket.

Common mistakes

  • Treating the whole sale gain as capital gain when part of it is wages on a disqualifying sale.
  • Selling one day before the 1 year mark and turning a qualifying sale into a disqualifying one.
  • Forgetting that disqualifying wage income comes from the purchase day market price, not the sale price.
  • Counting the 2 year test from the purchase date instead of the offering date.
  • Using the offering price where the purchase day market price is needed.

Try it yourself

Quick checks. Answers sit tucked under each question.

Offer $50, 15% discount, $60 sale, qualifying: what is ordinary income?

Purchase price $42.50. Ordinary income $750.00 (the $7.50 discount per share x 100), capital gain $1,000.00.

Same numbers, disqualifying, with a $55.00 market price at purchase?

Ordinary income $1,250.00 (($55.00 - $42.50) x 100), capital gain $500.00 (($60.00 - $55.00) x 100).

Offer $100, 15% discount, sold at $80, disqualifying: what is wages?

$0.00. The sale sits below your $85.00 purchase price, so the $500.00 gap is a capital loss, not income.

Questions

What is an ESPP?

An employee stock purchase plan lets workers buy company shares through payroll at a discount, often 15%, with the tax rules set by the IRS.

What makes a sale qualifying?

Holding at least 2 years from the offering date and 1 year from the purchase date. Meeting both caps the wage income at the discount.

How is disqualifying income calculated?

Ordinary income is the market price at purchase minus the price you paid, per share, capped by the actual sale gain. The rest is capital gain or loss.

Why is my W-2 higher than I expected?

The discount and any bargain element count as compensation, so payroll reports the amount in Box 1 even before you file your return.

Where do I find the exact numbers?

Form 3922 from your broker lists the offering price, the price paid, and the market value on the purchase date.

What if I sell at a loss?

You get no wage income; the shortfall below your purchase price is a capital loss, and its deductibility follows the usual capital loss rules.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.