Intermediate4 min read

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.

See the library

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

MethodWhich lots are usedTypical effect
First-in first-outThe oldest lots firstThe usual default. Often the largest gain in an appreciated position
Last-in first-outThe most recent lots firstNot available at every broker
Highest cost firstThe most expensive lotsMinimises the reported gain, subject to holding period
Specific identificationLots chosen by the account holderFull control, and it must be elected at the time
Average costA blended basis across all lotsAvailable 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.

LotBoughtBasisCharacter if sold today
A3 years ago$20Long-term
B14 months ago$45Long-term
C4 months ago$62Short-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.

One sale, three answers
One sale, three answers0204060Largest gain, at the preferential rateSmallest gain, at the ordinary rateLot A, 3 yrs, $20Lot B, 14 mth, $45Lot C, 4 mth, $62Gain per share, $

Scroll the chart sideways to see all of it.

Selling 100 shares at $70. Same security, same price, same quantity: the method decides which lots are used, and therefore both the gain and its character. Illustrative.

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.

Educational content only. MadStockAlerts provides market commentary, research, and educational content. It is not personalized investment advice, and nothing here is a recommendation to buy or sell any security. Trading and investing involve substantial risk, including loss of capital. See the Risk Disclosure and Customer Agreement.