stocktax.tools
HomeGuides › Cost basis explained

Cost basis explained

Cost basis is the number that decides your gain — and getting it wrong is the most common way investors overpay tax, especially on stock received as compensation.

What cost basis is

Cost basis is what you are treated as having paid for a share, used to compute your gain: gain = sale price − cost basis. For a simple purchase it is the price you paid plus commissions. The lower your basis, the larger your taxable gain — which is why an incorrect, too-low basis costs you real money.

FIFO vs specific identification

When you own shares bought at different times and prices and sell only some, which lots you sell matters. The default is first-in, first-out (FIFO) — the oldest shares go first, which in a rising market means the lowest basis and the biggest gain. Specific identification lets you choose which lots to sell; picking high-basis lots shrinks the gain. To use it you must specify the lots at the time of sale and have your broker confirm them.

Basis for reinvested dividends

If you reinvest dividends (DRIP), each reinvestment buys new shares and adds to your basis. Forgetting this is a classic error: people are taxed on the dividend when it is paid, then taxed again on the full sale price because they did not add the reinvested amounts to basis. Keep the records, or you pay twice.

The equity-comp adjustment

Here is where most overpayment happens. For RSUs, basis is the vesting-date value. For NSOs, it is the fair market value at exercise. For ESPP, it is your purchase price plus the amount taxed as ordinary income. In every case the value already taxed as income is part of your basis — but brokers frequently report only what you paid out of pocket, or even $0.

The $0-basis trap

When a 1099-B shows a $0 or too-low basis on equity-comp shares, filing it unchanged taxes the compensation income a second time as a capital gain. The fix is to adjust the basis on Form 8949 (using adjustment codes) to the correct value. Your vesting statement, Form 3922 (ESPP) or Form 3921 (ISO), and exercise confirmations have the numbers. Checking this on every equity-comp sale is one of the highest-value few minutes in your whole return.

Keep the records

Basis problems are really record-keeping problems. Save vesting and exercise statements, ESPP Form 3922s, and DRIP confirmations. Brokers only track basis reliably for shares bought after basis-reporting rules took effect and rarely for compensation shares — so the responsibility to get it right is yours.

Frequently asked questions

What is cost basis?

The amount you are treated as having paid for a share, used to compute your gain. Gain equals sale price minus cost basis, so a lower basis means a larger taxable gain.

What is the difference between FIFO and specific identification?

FIFO sells your oldest shares first, which usually means the lowest basis and largest gain. Specific identification lets you choose which lots to sell so you can pick high-basis shares and reduce the gain.

What is the cost basis of RSU or NSO shares?

The value already taxed as income: the vesting-date value for RSUs and the fair market value at exercise for NSOs. Brokers often omit this, so adjust the basis on Form 8949.

Why does my 1099-B show a $0 cost basis?

Brokers frequently report only your out-of-pocket cost on equity-comp shares, omitting the amount taxed as income. Filing it unchanged double-taxes you; correct it on Form 8949.

Sources & methodology

Based on standard U.S. treatment of cost basis. References: IRS Publication 550, Form 8949 instructions, Form 3922 and Form 3921. Tax year 2026. Last updated 2026-07.

⚠️ Educational content only — not tax advice. Your actual tax depends on your full situation and current law. Confirm with a qualified professional before acting.