🧾
✓ Editorially reviewed by Derek Giordano, Founder & Editor · BA Business Marketing

ESPP Calculator

Employee stock purchase plan gain and taxes when you sell

Updated October 2026

🧮
700+ calculators, no signup required
Finance · Health · Math · Science · Business
nnng.com
With a 15% discount and a lookback, you buy at 85% of the lower of the offering-date and purchase-date prices. If the stock was $40 at the start of the offering and $50 on the purchase date, you pay $34; $12,500 buys 367 shares at $34.00, worth $18,350, a 47.1% instant gain. Sold at $55 within a year, $5,872 is ordinary income and $1,835 a short-term gain: $1,849.68 of tax at 24%, leaving $5,857.32 after tax. Held for a qualifying disposition, only $2,202 is ordinary income and $5,505 is a long-term gain, cutting the tax to $1,354.23.

Section 423 Plan Rules

A qualified ESPP is defined by section 423 of the Internal Revenue Code. The limits that shape every purchase:

RuleLimit
Maximum discountPrice at least 85% of the stock’s value at the offering date or the purchase date, whichever the plan uses (a lookback can use the lower of the two)
Annual purchase limit$25,000 of stock per calendar year, valued at the offering-date price
Maximum offering period27 months (up to 5 years if the price is set only at purchase-date value)
Qualifying holding periodMore than 2 years after the offering (grant) date and more than 1 year after the purchase date
Who is excludedEmployees owning 5% or more of the company’s stock
Payroll taxesNo Social Security or Medicare tax on the discount, at purchase or sale (IRC 3121(a)(22))

Nothing is taxed when you buy. Your employer files Form 3922 for each purchase, listing the offering-date price, the purchase-date price and what you paid: the figures you need to report the sale.

Worked Example: Lookback Price, Shares and the Tax Split

  1. Purchase price: 85% × the lower of $40 and $50 = $34.00.
  2. Shares: $12,500 ÷ $34 = 367.6, so 367 whole shares for $12,478; the $22 left over carries to the next period or is refunded.
  3. Disqualifying sale at $55: ordinary income = ($50 − $34) × 367 = $5,872, the bargain element on the purchase date. Capital gain = ($55 − $50) × 367 = $1,835. Tax at 24% on both = $1,849.68.
  4. Qualifying sale at $55: ordinary income = the smaller of the actual gain ($21 × 367 = $7,707) and 15% of the offering-date price ($6 × 367 = $2,202), so $2,202. The other $5,505 is long-term gain. Tax at 24% and 15% = $1,354.23.

Your basis for capital gains is the price paid plus the ordinary income: $34 + $16 = $50 a share in the disqualifying case.

Selling Early vs Waiting: Six Outcomes

$12,500 of contributions, 24% ordinary rate, 15% long-term rate.

PricesWhen soldSharesOrdinary incomeCapital gain or lossEstimated taxGain kept after tax
Default prices, sold at $55Within a year (disqualifying)367$5,872.00$1,835.00$1,849.68$5,857.32
Default prices, sold at $55After 1 year, before qualifying date367$5,872.00$1,835.00$1,684.53$6,022.47
Default prices, sold at $55Qualifying367$2,202.00$5,505.00$1,354.23$6,352.77
Stock falls to $30 before you sellWithin a year (disqualifying)367$5,872.00−$7,340.00−$352.32−$1,115.68
Stock falls to $30 before you sellQualifying367$0.00−$1,468.00−$220.20−$1,247.80
No lookback (85% of $50 = $42.50), sold at $55Within a year (disqualifying)294$2,205.00$1,470.00$882.00$2,793.00

Waiting for a qualifying sale saves tax only if the price holds. If the stock falls to $30, the quick seller is still taxed on $5,872 of ordinary income but gets a capital loss to offset it; the qualifying seller has no ordinary income at all but a loss on the shares. Without a lookback the discount is just 15% of the purchase-date price, and the gain shrinks with it.

Common ESPP Mistakes

What This Calculator Does Not Include

It uses the flat rates you enter rather than a bracket calculation, ignores state tax and the 3.8% net investment income tax, and handles one purchase at a time. A capital loss is valued at the rate you enter, as if it offsets other gains; losses beyond your gains offset at most $3,000 of ordinary income a year (IRS Topic 409), with the rest carried forward, so the negative tax figures in the table above are a best case. Plans that reset the offering price when the stock drops, non-qualified (non-423) plans, and sales of shares from several purchases need lot-by-lot records. For a large position, a CPA can match each sale to its Form 3922.

Frequently Asked Questions

How is an ESPP taxed?
Nothing is taxed when you buy. When you sell, part of the gain is ordinary income and the rest is a capital gain or loss; the split depends on whether the sale is qualifying.
What is a qualifying disposition for an ESPP?
A sale more than two years after the offering date and more than one year after the purchase date. Ordinary income is then the smaller of the actual gain or the discount measured at the offering date.
What is an ESPP lookback?
A plan feature that applies the discount to the lower of the offering-date and purchase-date prices, so the discount grows when the stock rises during the offering.
Should I sell ESPP shares immediately?
Many people do, locking in the discount and avoiding concentration in one stock. Holding for a qualifying disposition can lower the tax if the price holds up.
What is the ESPP contribution limit?
You can buy up to $25,000 of stock per calendar year, measured at the offering-date price; your plan may also cap contributions as a percent of pay.
Do I pay Social Security and Medicare on ESPP income?
No. Income from a section 423 plan is excluded from FICA wages, though the ordinary income is still subject to income tax.
What is Form 3922?
The form your employer issues for ESPP purchases, showing the offering date, purchase date, prices and shares. Keep it to figure your ordinary income and cost basis when you sell.

How to Use This Calculator

  1. Enter your contributions — payroll deductions for the purchase period, from your pay stubs or plan account.
  2. Enter the prices — the price at the start of the offering, on the purchase date and when you sell (or expect to).
  3. Set the discount and lookback — from your plan document; most qualified plans use 15% with a lookback.
  4. Choose when you sell and your tax rates — disqualifying within a year, disqualifying after a year, or qualifying; then your ordinary and long-term capital gains rates.
  5. Read the results — purchase price, shares, instant gain, ordinary income, capital gain, estimated tax and what you keep.
📚 Sources & References
  1. [1] 26 U.S.C. 423, Employee stock purchase plans (85% price, $25,000 limit, 27-month offering, holding periods; accessed Oct 2026). www.law.cornell.edu
  2. [2] IRS. Publication 525 for 2025 returns: employee stock purchase plans and Form 3922 (accessed Oct 2026). www.irs.gov
  3. [3] IRS. About Form 3922, Transfer of Stock Acquired Through an ESPP (accessed Oct 2026). www.irs.gov
  4. [4] 26 U.S.C. 3121(a)(22), FICA exclusion for ESPP stock (accessed Oct 2026). www.law.cornell.edu
  5. [5] IRS. Topic No. 409, Capital gains and losses (accessed Oct 2026). www.irs.gov
✅ Editorial Standards — Every calculator is built from peer-reviewed formulas and official data sources, editorially reviewed for accuracy, and updated regularly. Read our full methodology · About the author