How to calculate a basic capital gain or loss
For example, if you buy 100 shares at $20 each, and pay a total commission of $10, your total cost basis is $2,010. If you later sell those shares for $3,000, your taxable capital gain is $990; the sales price minus your cost basis. If instead you sold the stock for less than $2,010, you’d have a capital loss.
Methods for tracking cost basis when you buy in batches
| Method | How it works |
|---|---|
| FIFO (first in, first out) | The earliest shares you bought are treated as the first ones sold |
| Average cost | Total cost of all shares divided by the number of shares (common for mutual funds) |
| Specific identification | You choose exactly which shares (by purchase date/price) to sell |
What adjusts your cost basis over time
Reinvested dividends and capital gains distributions (if reinvested) increase your cost basis, since those funds effectively bought you more shares. Stock splits adjust your per-share basis without changing your total investment value. Return-of-capital distributions can lower your basis over time.
Special rules for inherited and gifted stock
If you inherit stock, your cost basis usually steps up to the fair market value on the date the previous owner died, regardless of what they originally paid. If you receive stock as a gift, you generally take on the giver’s original cost basis, which means you could owe more in capital gains tax than if you’d inherited the same shares.
Where cost basis shows up on your tax return
Your broker reports cost basis for covered shares, generally those bought after 2011, directly to the IRS on Form 1099-B, Proceeds from Broker and Barter Exchange Transactions. For noncovered shares bought in earlier years, you’re responsible for tracking and reporting the basis. Either way, you report the sale on Form 8949, Sales and Other Dispositions of Capital Assets, and the totals carry over to Schedule D, Capital Gains and Losses.