The ESPP discount looks free — but the tax comes off at sale
An employee stock purchase plan lets you buy your employer's shares at a discount — usually 15%, the most most plans offer — and the discount looks like free money: you put in $3,000, you get shares worth more than $3,000, and you sell them for more still. The part most people miss is the tax rule that makes the ESPP different from a normal share purchase: the discount is taxed as ordinary income at sale, even in a qualifying disposition. A qualifying disposition means you held the shares for two years from the grant date and one year from the purchase date — and even then, the discount is ordinary income. Only the gain above the lookback price gets the capital-gains rate. The formula is simple: lookback price = the lower of the grant-date price and the purchase-date price; purchase price = lookback × (1 − discount); shares bought = contribution / purchase price; value at sale = shares × sell price; total gain = value at sale − contribution; value at purchase = shares × purchase-date price; instant gain = value at purchase − contribution; discount income = (lookback − purchase price) × shares = contribution × discount / (1 − discount); capital gain = (sell price − lookback) × shares; tax = discount income × ordinary rate + capital gain × capital-gains rate; net after tax = value at sale − tax; net profit = net − contribution; return = net profit / contribution. On the defaults — $3,000 contribution, $40 at grant, $45 at purchase, 15% discount, $50 sell price, 22% ordinary tax, 15% capital-gains rate — the lookback is $40.00, the purchase price is $34.00, the shares are 88.2353, the value at sale is $4,411.76, the total gain is $1,411.76, the value at purchase is $3,970.59, the instant gain is $970.59, the discount income is $529.41, the capital gain is $882.35, the tax is $248.82, the net after tax is $4,162.94, the net profit is $1,162.94, and the return is 38.76%.
| Scenario | Shares | Value at sale | Gain | Tax | Net after tax | Profit |
|---|
| Default | 88.2353 | $4,411.76 | $1,411.76 | $248.82 | $4,162.94 | $1,162.94 |
| Contribution $1,500 | 44.1176 | $2,205.88 | $705.88 | $124.41 | $2,081.47 | $581.47 |
| Contribution $6,000 | 176.4706 | $8,823.53 | $2,823.53 | $497.65 | $8,325.88 | $2,325.88 |
| FMV at grant $30 | 117.6471 | $5,882.35 | $2,882.35 | $469.41 | $5,412.94 | $2,412.94 |
| FMV at purchase $38 | 92.8793 | $4,643.96 | $1,643.96 | $283.65 | $4,360.31 | $1,360.31 |
| Discount 10% | 83.3333 | $4,166.67 | $1,166.67 | $198.33 | $3,968.33 | $968.33 |
| Sell price $40 | 88.2353 | $3,529.41 | $529.41 | $116.47 | $3,412.94 | $412.94 |
| Sell price $60 | 88.2353 | $5,294.12 | $2,294.12 | $381.18 | $4,912.94 | $1,912.94 |
| Ordinary tax rate 37% | 88.2353 | $4,411.76 | $1,411.76 | $328.24 | $4,083.53 | $1,083.53 |
| Capital-gains rate 0% | 88.2353 | $4,411.76 | $1,411.76 | $116.47 | $4,295.29 | $1,295.29 |
At the defaults — contribution $3,000, grant price $40, purchase price $45, discount 15%, sell price $50, ordinary tax 22%, capital-gains rate 15% — the lookback price is $40.00, the purchase price is $34.00, the shares bought are 88.2353, the value at sale is $4,411.76, the total gain is $1,411.76, the value at purchase is $3,970.59, the instant gain is $970.59, the discount income is $529.41, the capital gain is $882.35, the tax is $248.82, the net after tax is $4,162.94, the net profit is $1,162.94, and the return on the contribution is 38.76%. Check the identities: lookback = min(grant, purchase); purchase price = lookback × (1 − discount); shares = contribution / purchase price; value = shares × sell price; gain = value − contribution; discount income = contribution × discount / (1 − discount) — it depends only on the contribution and the discount, not on the share prices, which is why the grant-$30 and purchase-$38 branches below keep the same $529.41 discount income; capital gain = (sell price − lookback) × shares; tax = discount income × ordinary rate + capital gain × capital-gains rate; net = value − tax; profit = net − contribution. Rounding convention: totals are computed from unrounded values, so rounded parts may differ by a cent from their rounded sum.
The worked example, line by line
Setup: contribution $3,000, grant price $40, purchase price $45, discount 15%, sell price $50, ordinary tax 22%, capital-gains rate 15%.
Line 1 — the lookback price. min($40, $45) = $40.00 — the lower of the two prices, so the discount applies to the cheaper one.
Line 2 — the purchase price. $40.00 × (1 − 0.15) = $34.00.
Line 3 — the shares bought. $3,000 / $34.00 = 88.2353 shares.
Line 4 — the value at sale. 88.2353 × $50 = $4,411.76.
Line 5 — the total gain. $4,411.76 − $3,000 = $1,411.76.
Line 6 — the value at purchase. 88.2353 × $45 = $3,970.59 — and the instant gain, selling at the purchase-date price, is $3,970.59 − $3,000 = $970.59.
Line 7 — the discount income. ($40.00 − $34.00) × 88.2353 = $529.41 — or $3,000 × 0.15 / 0.85, the same number, because the discount income depends only on the contribution and the discount.
Line 8 — the capital gain. ($50 − $40.00) × 88.2353 = $882.35.
Line 9 — the tax. $529.41 × 22% + $882.35 × 15% = $116.47 + $132.35 = $248.82.
Line 10 — the net after tax. $4,411.76 − $248.82 = $4,162.94.
Line 11 — the net profit and the return. $4,162.94 − $3,000 = $1,162.94; $1,162.94 / $3,000 = 38.76%.
Reverse: the contribution for a $5,000 net after tax is $3,603.22 (exact 3603.2217); at $3,603.22 the net is $5,000.00, at $3,603.21 it is $4,999.98 — $3,603.22 is the nearest. The sell price for a $2,000 net profit is $61.16 (exact 61.1608); at $61.16 the profit is $1,999.94, at $61.17 it is $2,000.69 — $61.16 is the nearest. The discount for a $1,500 net profit is 22.46% (exact 22.4609%); at 22.46% the profit is $1,499.95, at 22.47% it is $1,500.45 — 22.46% is the nearest. The sell price for after-tax break-even is $34.49 (exact 34.4941); at $34.49 the net is $2,999.69, at $34.50 it is $3,000.44 — $34.49 is the nearest. The contribution for a $1,000 net profit is $2,579.67 (exact 2579.6662); at $2,579.67 the profit is $1,000.00 (unrounded $1,000.0015), at $2,579.66 the unrounded profit is $999.9976, which also rounds to $1,000.00 — the exact value decides, and $2,579.67 is the nearest cent to the exact 2579.6662.
Every branch, checked
Contribution $1,500: shares 44.1176, value $2,205.88, gain $705.88, tax $124.41, net $2,081.47, profit $581.47. Half the contribution, half the money — the ESPP scales exactly with the contribution.
Contribution $6,000: shares 176.4706, value $8,823.53, gain $2,823.53, tax $497.65, net $8,325.88, profit $2,325.88. Double the contribution, double the profit — the return is the same 38.76%.
FMV at grant $30: shares 117.6471, value $5,882.35, gain $2,882.35, tax $469.41, net $5,412.94, profit $2,412.94. A lower grant price means a lower lookback, a lower purchase price, and more shares — and the discount income stays $529.41, because it depends only on the contribution and the discount.
FMV at purchase $38: shares 92.8793, value $4,643.96, gain $1,643.96, tax $283.65, net $4,360.31, profit $1,360.31. A lower purchase price also lowers the lookback and buys more shares — and again the discount income stays $529.41.
Discount 10%: shares 83.3333, value $4,166.67, gain $1,166.67, tax $198.33, net $3,968.33, profit $968.33. Five points less discount costs $194.61 of net profit — the discount is the whole engine of the return.
Sell price $40: shares 88.2353, value $3,529.41, gain $529.41, tax $116.47, net $3,412.94, profit $412.94. Selling at the lookback price leaves only the discount as gain — and the tax is only on the discount, because the capital gain is $0.00.
Sell price $60: shares 88.2353, value $5,294.12, gain $2,294.12, tax $381.18, net $4,912.94, profit $1,912.94. Ten dollars more on the sell price adds $750.00 of net profit — the capital gain grows, and so does the tax on it.
Ordinary tax rate 37%: shares 88.2353, value $4,411.76, gain $1,411.76, tax $328.24, net $4,083.53, profit $1,083.53. Fifteen points more ordinary tax costs only $79.41 of net — because only the $529.41 discount income is taxed at the ordinary rate, and the $882.35 capital gain is still taxed at 15%.
Capital-gains rate 0%: shares 88.2353, value $4,411.76, gain $1,411.76, tax $116.47, net $4,295.29, profit $1,295.29. With no capital-gains tax the only tax is on the discount income — $529.41 × 22% = $116.47.
Reverse — the other way round: the contribution for a $5,000 net after tax is $3,603.22 (exact 3603.2217); the sell price for a $2,000 net profit is $61.16 (exact 61.1608); the discount for a $1,500 net profit is 22.46% (exact 22.4609%); the sell price for after-tax break-even is $34.49 (exact 34.4941); the contribution for a $1,000 net profit is $2,579.67 (exact 2579.6662).
What the defaults assume
The model assumes a qualifying disposition — held two years from the grant date and one year from the purchase date — and it assumes the discount is taxed as ordinary income and the gain above the lookback as a capital gain. It assumes one flat ordinary rate and one flat capital-gains rate, and it assumes you sell all the shares at one price. It leaves out state tax, Social Security and Medicare, the offering-period limits on how much you can contribute, and what happens if you sell early: a disqualifying disposition taxes MORE of the gain as ordinary income, so the net is lower than this calculator shows. With a $0 contribution, everything is $0.00. With a 0% discount, the purchase price is $40.00, the shares are 75.0000, the value is $3,750.00, the gain is $750.00, the discount income is $0.00, the capital gain is $750.00, the tax is $112.50, the net is $3,637.50, and the profit is $637.50. Selling at the $34.00 purchase price gives a value of $3,000.00 and a gain of $0.00 — but the discount income is still $529.41, the capital gain is −$529.41, the tax is $37.06, the net is $2,962.94, and the profit is −$37.06: selling at the purchase price still loses $37.06 after tax, because the discount is taxed even when the shares went nowhere. Rounding convention: totals are computed from unrounded values, so rounded parts may differ by a cent from their rounded sum; the reverses are nearest-value solutions, and the exact unrounded figures (3603.2217, 61.1608, 22.4609%, 34.4941, 2579.6662) are stated wherever the rounded figures appear.
Output · formula · meaning
| Output | Formula | What it means |
| Lookback price | min(grant, purchase) | $40.00. |
| Purchase price | lookback × (1 − discount) | $34.00. |
| Shares bought | contribution / purchase price | 88.2353. |
| Value at sale | shares × sell price | $4,411.76. |
| Total gain | value at sale − contribution | $1,411.76. |
| Value at purchase | shares × purchase-date price | $3,970.59. |
| Instant gain | value at purchase − contribution | $970.59. |
| Discount income | (lookback − purchase price) × shares | $529.41. |
| Capital gain | (sell price − lookback) × shares | $882.35. |
| Tax | discount income × ordinary rate + capital gain × capital-gains rate | $248.82. |
| Net after tax | value at sale − tax | $4,162.94. |
| Net profit | net after tax − contribution | $1,162.94. |
| Return on contribution | net profit / contribution | 38.76%. |
| Contribution for a $5,000 net | $5,000 / (net / contribution) | $3,603.2217 → $3,603.22. |
| Sell price for a $2,000 profit | solve profit = $2,000 | $61.1608 → $61.16. |
| Discount for a $1,500 profit | solve profit = $1,500 | 22.4609% → 22.46%. |
| Sell price for break-even | solve net = contribution | $34.4941 → $34.49. |
| Contribution for a $1,000 profit | $1,000 / (net / contribution − 1) | $2,579.6662 → $2,579.67. |
| Contribution $1,500 | same model | Shares 44.1176, value $2,205.88, gain $705.88, tax $124.41, net $2,081.47, profit $581.47. |
| Contribution $6,000 | same model | Shares 176.4706, value $8,823.53, gain $2,823.53, tax $497.65, net $8,325.88, profit $2,325.88. |
| FMV at grant $30 | same model | Shares 117.6471, value $5,882.35, gain $2,882.35, tax $469.41, net $5,412.94, profit $2,412.94. |
| FMV at purchase $38 | same model | Shares 92.8793, value $4,643.96, gain $1,643.96, tax $283.65, net $4,360.31, profit $1,360.31. |
| Discount 10% | same model | Shares 83.3333, value $4,166.67, gain $1,166.67, tax $198.33, net $3,968.33, profit $968.33. |
| Sell price $40 | same model | Shares 88.2353, value $3,529.41, gain $529.41, tax $116.47, net $3,412.94, profit $412.94. |
| Sell price $60 | same model | Shares 88.2353, value $5,294.12, gain $2,294.12, tax $381.18, net $4,912.94, profit $1,912.94. |
| Ordinary tax rate 37% | same model | Shares 88.2353, value $4,411.76, gain $1,411.76, tax $328.24, net $4,083.53, profit $1,083.53. |
| Capital-gains rate 0% | same model | Shares 88.2353, value $4,411.76, gain $1,411.76, tax $116.47, net $4,295.29, profit $1,295.29. |
Who uses this
- The employee deciding whether to join the ESPP: they learn a $3,000 contribution at a 15% discount is worth $4,162.94 after tax — a 38.76% return — so they know the plan is worth joining, and they check the 10% discount branch ($3,968.33) before assuming every plan pays the same.
- The employee about to sell: they learn the tax is $248.82 on a $1,411.76 gain — $116.47 of it on the discount at 22% — so they know what the sale really leaves, and they check the sell-at-$34 edge (−$37.06) before selling at the purchase price and expecting to break even.
- The employee planning a bigger contribution: they learn $3,603.22 of contribution is what a $5,000 net after tax takes (exact 3603.2217) — so they know how much to put in, and they check the $6,000 branch ($8,325.88 net) before maxing out the plan.
- The employee comparing the ESPP with RSUs: they learn the ESPP discount is taxed as ordinary income even in a qualifying disposition, the same way RSUs are taxed at vest — so they know both kinds of equity pay ordinary tax on the discount, and they check the RSU calculator ($39,000.00 net on a $50,000 grant at 22%) before deciding which one is worth more.
Accuracy & limitations
The math is exact for the numbers you enter: lookback = min(grant, purchase); purchase price = lookback × (1 − discount); shares = contribution / purchase price; value = shares × sell price; gain = value − contribution; discount income = contribution × discount / (1 − discount); capital gain = (sell price − lookback) × shares; tax = discount income × ordinary rate + capital gain × capital-gains rate; net = value − tax; profit = net − contribution. What the model cannot do is know your real tax rates: check them, because the discount income is taxed at your ordinary rate and the capital gain at your capital-gains rate — and check the holding periods, because selling early makes it a disqualifying disposition and taxes more of the gain as ordinary income. It assumes a qualifying disposition, one flat ordinary rate, one flat capital-gains rate, and that you sell all the shares at one price. It leaves out state tax, Social Security and Medicare, and the contribution limits of your plan. It is a value calculator, not tax advice: for what lands in your bank account, see the take-home pay calculator; for how a bonus is taxed, see the bonus tax calculator.
Cite this calculatorBright Side Kit. “ESPP Calculator: Shares, Discount & Tax Owed 2026” brightoolbox.com, 2026. Method: qualifying disposition (held 2 years from the grant date and 1 year from the purchase date). Lookback price = min(FMV at grant, FMV at purchase); purchase price = lookback × (1 − discount); shares bought = contribution / purchase price; value at sale = shares × sell price; total gain = value at sale − contribution; value at purchase = shares × FMV at purchase; instant gain = value at purchase − contribution; discount income = (lookback − purchase price) × shares = contribution × discount / (1 − discount) — it depends only on the contribution and the discount, not on the share prices; capital gain = (sell price − lookback) × shares; tax = discount income × ordinary rate + capital gain × capital-gains rate; net after tax = value at sale − tax; net profit = net − contribution; return = net profit / contribution. Key idea: the ESPP discount looks free, but the discount is taxed as ordinary income at sale even in a qualifying disposition — and if you sell at the purchase price you still lose money after tax. A disqualifying disposition (sold early) taxes MORE of the gain as ordinary income — this calculator models the qualifying case only. Defaults: contribution $3,000, grant $40, purchase $45, discount 15%, sell $50, ordinary tax 22%, capital-gains rate 15% → lookback $40.00, purchase price $34.00, shares 88.2353, value at sale $4,411.76, total gain $1,411.76, value at purchase $3,970.59, instant gain $970.59, discount income $529.41, capital gain $882.35, tax $248.82, net after tax $4,162.94, net profit $1,162.94, return 38.76%. Branches: contribution $1,500 → shares 44.1176, value $2,205.88, gain $705.88, tax $124.41, net $2,081.47, profit $581.47; contribution $6,000 → shares 176.4706, value $8,823.53, gain $2,823.53, tax $497.65, net $8,325.88, profit $2,325.88; grant $30 → shares 117.6471, value $5,882.35, gain $2,882.35, tax $469.41, net $5,412.94, profit $2,412.94; purchase $38 → shares 92.8793, value $4,643.96, gain $1,643.96, tax $283.65, net $4,360.31, profit $1,360.31; discount 10% → shares 83.3333, value $4,166.67, gain $1,166.67, tax $198.33, net $3,968.33, profit $968.33; sell $40 → shares 88.2353, value $3,529.41, gain $529.41, tax $116.47, net $3,412.94, profit $412.94; sell $60 → shares 88.2353, value $5,294.12, gain $2,294.12, tax $381.18, net $4,912.94, profit $1,912.94; ordinary tax 37% → tax $328.24, net $4,083.53, profit $1,083.53; capital-gains rate 0% → tax $116.47, net $4,295.29, profit $1,295.29. Reverses: contribution for a $5,000 net after tax = 3603.2217 → $3,603.22 (fwd net $5,000.00; at $3,603.21 $4,999.98); sell price for a $2,000 net profit = 61.1608 → $61.16 (fwd profit $1,999.94; at $61.17 $2,000.69); discount for a $1,500 net profit = 22.4609% → 22.46% (fwd profit $1,499.95; at 22.47% $1,500.45); sell price for after-tax break-even = 34.4941 → $34.49 (fwd net $2,999.69; at $34.50 $3,000.44); contribution for a $1,000 net profit = 2579.6662 → $2,579.67 (fwd profit $1,000.00, unrounded $1,000.0015; at $2,579.66 the unrounded profit is $999.9976, which also rounds to $1,000.00). Edges: contribution $0 → $0.00 everywhere; discount 0% → purchase price $40.00, shares 75.0000, value $3,750.00, gain $750.00, discount income $0.00, capital gain $750.00, tax $112.50, net $3,637.50, profit $637.50; sell at the $34.00 purchase price → value $3,000.00, gain $0.00, discount income $529.41, capital gain −$529.41, tax $37.06, net $2,962.94, profit −$37.06. Bright Side Kit. "ESPP Calculator: Shares, Discount & Tax Owed in 2026" https://brightoolbox.com/espp-calculator/ Accessed October 25, 2026.
Embed this calculatorPaste this into any web page to embed the live calculator. The “Powered by Bright Side Kit” link below it must stay intact.