Concepts

Average Cost vs. FIFO vs. Specific Lots

Three ways to figure the cost basis of shares you bought at different prices. How each method works, what it does to your gain, and when each one fits.

4 min read

If you have only ever bought a stock once, cost basis is trivial: it is what you paid. The moment you buy the same holding a second time at a different price, you have to decide which shares you are selling — and that choice changes the gain you report.

There are three common answers.

The three methods

MethodWhich shares are soldEffect
Average costEvery share carries one blended basisSimplest to track; one number to keep
FIFOOldest shares go firstCommon broker default; often the largest gain in a rising market
Specific lotYou nominate exactly which purchaseMost control; most record-keeping

The same sale can produce three different gain figures depending on which one applies. That is not a loophole — it is why brokers ask you to pick a method and why the choice is worth understanding.

Worked exampleOne sale, three answers

You buy 10 shares at $500 ($5,000), then 10 more at $600 ($6,000). You now hold 20 shares that cost $11,000 in total. You sell 10 shares at $700 ($7,000 in proceeds).

  • Average cost. Basis per share is $11,000 ÷ 20 = $550. Gain is 10 × ($700 − $550) = $1,500.
  • FIFO. The oldest 10 shares go first, at $500 each. Gain is 10 × ($700 − $500) = $2,000.
  • Specific lot. Nominate the $600 shares. Gain is 10 × ($700 − $600) = $1,000.

Same sale, same proceeds, three gains: $1,500, $2,000, $1,000.

Average cost

Every share you own is treated as costing the same blended amount: total spent divided by total shares. Buy more and the average shifts; sell some and it stays where it is.

The appeal is that there is exactly one number to maintain per holding. The cost is that you give up the ability to choose — every sale takes the same basis whether that suits you or not.

Working out the blend by hand gets old quickly after the third or fourth purchase, which is what our cost basis calculator is for.

FIFO

First in, first out. The shares you have held longest are treated as the ones you sold. This is the default at most brokers when you haven't chosen otherwise, which means plenty of people are using it without having decided to.

In a holding that has risen over time, FIFO sells your cheapest shares first — so it tends to produce the largest reported gain. That is not automatically bad, but it is worth knowing that the default has a direction.

Specific lot identification

You tell the broker precisely which purchase the sold shares came from. It gives you the most control over the gain a sale produces, and it demands that you can actually identify your lots — every purchase, its date, its price, its share count, and what is left of it.

Warning

Specific-lot generally has to be elected at or before the time of sale, with your broker, in the way they require. It is not something you decide afterwards when working out your figures. Confirm the mechanics with your broker and a tax professional before relying on it.

Which one applies to you

Partly your choice, partly not. Brokers set a default; some holding types have their own conventions; and once a method has been used for a holding, switching is not always free. The specifics depend on your account, your broker and where you live.

What is generally true:

  • Average cost suits someone who buys steadily, holds broadly, and wants one maintainable number.
  • FIFO is what you get by not choosing, so it is worth knowing whether that is what you have.
  • Specific lot rewards people who already keep careful records, and punishes people who think they do.

Warning

This is an explanation of how the methods work, not a recommendation of which to use. Which method is available and advantageous depends on your own tax situation — that conversation belongs with a tax professional.

The record-keeping problem underneath

Notice that two of the three methods need you to know your lots, and the third needs you to recompute a blend every time you buy. Both quietly assume a running history that most people don't keep.

This is where hand-maintained tracking breaks. A spreadsheet holds a single "price paid" cell per row, so the moment you buy again — or a dividend reinvests, which is also a purchase — the cell is wrong, and nothing in the file tells you. The gain keeps computing, confidently, from a stale number.

StoxDeck records every purchase as its own lot, so the basis stays right as the position grows. Build your first deck →

For the underlying concept, start with what cost basis actually is. For what to do when the records are already gone, see finding the cost basis of old stock. And for how basis turns into the gain you see on screen, read unrealized gain or loss.