Cost basis and lot methods: FIFO vs specific identification
Lesson 3 · about 9 min
Education, not tax advice: rules, rates and thresholds change every year, so confirm anything you plan to act on with a qualified tax professional.
A gain is proceeds minus cost basis. Proceeds are easy: what you sold for, net of commissions. Cost basis is where the choices live, because when you bought the same asset more than once at different prices, which shares you sold determines the gain you report.
What cost basis includes
Basis is what you paid plus the costs of acquiring it: purchase price, commissions and fees. Selling costs reduce proceeds rather than increasing basis, but the effect on the gain is the same.
- Buy 100 shares at $50 with a $1 commission: basis = $5,001.
- Sell 100 shares at $58 with a $1 commission: proceeds = $5,799.
- Gain = $5,799 − $5,001 = $798.
Basis is also adjusted by events along the way: disallowed wash-sale losses are added to it (Module 2), option premiums move it when options are exercised or assigned (Module 4), stock splits divide it across more shares, and return-of-capital distributions reduce it.
Lots
Every purchase creates a tax lot: a quantity, a trade date and a basis. When you sell part of a position, you (or your broker, by default) must decide which lots are being sold. Two methods matter for traders.
FIFO (first in, first out). The oldest shares go first. This is the IRS default and the default at nearly every broker if you do nothing.
Specific identification. You tell the broker, at or before the time of sale, exactly which lots to sell. Many brokers let you set a standing preference such as "highest cost first" or "minimize short-term gain", which is specific identification on autopilot.
Average cost is a third method, but it is only permitted for mutual fund shares and certain dividend reinvestment plans, not for individual stocks, options or crypto.
Worked example
Three purchases of the same stock:
| Lot | Date | Shares | Price | Basis |
|---|---|---|---|---|
| A | Jan 5, 2025 | 100 | $40 | $4,000 |
| B | Aug 20, 2025 | 100 | $55 | $5,500 |
| C | Feb 3, 2026 | 100 | $48 | $4,800 |
On March 2, 2026 you sell 100 shares at $60 (proceeds $6,000).
| Method | Lot sold | Gain | Character |
|---|---|---|---|
| FIFO | A ($4,000) | $2,000 | Long-term (held 14 months) |
| Specific ID, highest cost | B ($5,500) | $500 | Short-term (held 6 months) |
| Specific ID, lot C | C ($4,800) | $1,200 | Short-term (held 1 month) |
At illustrative rates of 22% ordinary and 15% long-term, the federal tax is $300 (FIFO, long-term), $110 (lot B) or $264 (lot C). Choosing lot B this year defers $190 of tax versus FIFO and $1,500 of gain remains embedded in lot A for later. Nothing is avoided; the timing and character change. Whether deferral is worth it depends on your bracket now versus later, which is a planning question, not a rule.
The rule that trips people
Specific identification only counts if the broker records it at the time of sale. Deciding in April which lots you "meant" to sell is not allowed. If your confirmation or the broker's lot-assignment shows FIFO, that is what you sold. Set the standing preference before you need it, and check the lot detail on the confirmation for any sale where it matters.
Crypto has its own version of this rule: from 2025 the IRS requires basis to be tracked wallet by wallet or account by account, and specific identification must be documented at the time of the transaction; otherwise FIFO applies within that wallet. Module 4 goes deeper.
Key idea: Gain = proceeds − basis, and basis depends on which lot you sold. FIFO is the default; specific identification must be chosen and recorded at the time of sale, never after the fact.
Transferred and missing basis
When shares move between brokers (ACATS transfer), basis usually travels with them, but "usually" is doing work. Shares bought before 2011 (2012 for funds, 2014 for options) are "noncovered" and the receiving broker may show no basis at all. Crypto moved between exchanges and wallets almost never carries basis automatically. If the broker reports zero basis, the IRS computer sees the entire proceeds as gain until you correct it on Form 8949 with your own records. Keep purchase confirmations for anything you might ever transfer.
Try it: Log in to your broker and find the cost basis method setting. Note what it is currently set to. Then open your largest position, view its tax lots, and identify which lot FIFO would sell first and which lot has the highest basis. You now know the range of gains a partial sale could produce before you click.
Recap
- Basis = price paid + acquisition costs, then adjusted by wash sales, option events, splits and return of capital.
- Each purchase is a lot; a partial sale must be matched to specific lots.
- FIFO is the default; specific identification must be chosen and recorded at the time of sale.
- Lot choice changes the size and character of the gain this year, not the total over time.
- Basis can go missing on transfers and noncovered lots; keep your own records to correct the 1099-B.