Cost Basis Methods
When part of a position is sold, which shares were sold is a choice. The default is usually first-in first-out, and it is rarely a deliberate one.
MadStockAlerts Research · Updated August 29, 2026
What to take away
- A position built over time is a set of lots, each with its own date and basis.
- The method determines which lots a partial sale uses.
- The default at most brokers is first-in first-out unless changed.
- Specific identification must generally be made at or before the sale.
- The method affects both the size and the character of the resulting gain.
MAD Academy Training Video · 0:46
Which Shares Did You Just Sell?
When you hold several lots, the method decides which one is sold — and that decides the gain reported.
This lesson is part of a Stock Alerts + Tools plan.
Lots, and why they exist
Every purchase creates a tax lot: a quantity of shares with an acquisition date and a cost. A position bought in four instalments and reinvesting dividends quarterly is not one holding but dozens of lots, each with a different basis and holding period.
When part of the position is sold, the tax result depends entirely on which lots the sale is matched against. Same security, same price, same quantity, different answer.
This describes how the rules are structured and is not tax advice. Tax rules change, they interact, and the treatment of any particular situation depends on circumstances that only a qualified professional can assess.
The methods
| Method | Which lots are used | Typical effect |
|---|---|---|
| First-in first-out | The oldest lots first | The usual default. Often the largest gain in an appreciated position |
| Last-in first-out | The most recent lots first | Not available at every broker |
| Highest cost first | The most expensive lots | Minimises the reported gain, subject to holding period |
| Specific identification | Lots chosen by the account holder | Full control, and it must be elected at the time |
| Average cost | A blended basis across all lots | Available for funds; generally not for individual equities |
The fourth row is the one that requires action. Specific identification generally has to be made at or before the time of the sale and confirmed by the broker; choosing lots after the fact is not the same thing.
Character, not only amount
The method changes which lots are used, and lots differ in holding period as well as in cost. A sale matched against recent lots can produce a short-term result; the same sale matched against older ones can produce a long-term one.
| Lot | Bought | Basis | Character if sold today |
|---|---|---|---|
| A | 3 years ago | $20 | Long-term |
| B | 14 months ago | $45 | Long-term |
| C | 4 months ago | $62 | Short-term |
Selling at $70, lot A produces the largest gain at the preferential rate and lot C the smallest gain at the ordinary rate. Which is preferable is a question with several inputs, and it is not answerable in general.
Scroll the chart sideways to see all of it.
Covered and non-covered
Brokers are required to report basis to the tax authority for securities acquired after specified dates, which are known as covered securities. For older holdings, basis is not reported and the account holder is responsible for substantiating it.
- Basis on a transferred account arrives separately and can be incomplete for older lots.
- A non-covered position with no records requires the basis to be reconstructed from statements.
- A missing basis does not mean a basis of zero, but substantiating it is the holder's job.
- Corporate actions adjust basis, and complex ones are the most common source of an error.
Keeping the final statement from any account being transferred is the practical safeguard, since reconstructing decade-old lots without it is considerably harder. This describes how the rules are structured and is not tax advice. Tax rules change, they interact, and the treatment of any particular situation depends on circumstances that only a qualified professional can assess.
Changing the method, and when it takes effect
The accounting method is a setting on the account, and changing it generally applies to future sales rather than to past ones. That timing is the practical constraint.
- A method change made before a sale governs that sale; made afterwards, it does not.
- Specific identification generally has to be communicated at or before the time of the trade and confirmed.
- Average cost, where it is available, is an election with its own rules about changing away from it.
- The method is per account, so two accounts holding the same security can use different ones.
The first item is the whole practical point. The decision about which lots to sell is made before the sale or it is not made at all, and the default method quietly makes it otherwise.
Most brokers expose the setting in account preferences and allow lot selection at the point of trade. Finding both once is a few minutes that applies to every future sale. This describes how the rules are structured and is not tax advice. Tax rules change, they interact, and the treatment of any particular situation depends on circumstances that only a qualified professional can assess.