Average Cost Basis: What It Is and Why It Moves
Average cost basis is the most-quoted number in any portfolio and one of the least understood. The definition fits in a sentence — what you paid, divided by what you hold — but the number’s behavior under real trading (fees, partial sells, method choices) surprises almost everyone at least once.
The basic mechanics
Buy 10 shares at $100 and 10 more at $120: you hold 20 shares that cost $2,200, so your average is $110. The average is weighted — it leans toward whichever lot has more shares. Make the second lot 30 shares and the average lands at $115, three-quarters of the way to $120.
Two refinements matter in practice:
- Fees belong in the cost. A $5 commission per buy makes the two-lot example $2,210 for 20 shares — average $110.50. Small per trade; systematic over a trading career (the evidence is in the trading-costs article).
- Equal dollars and equal shares average differently. Equal dollar amounts at $100 and $120 give an average of $109.09, below the $110 midpoint, because the same dollars buy more of the cheaper shares. This is why dollar-cost averaging literature talks about the harmonic mean.
The stock average calculator handles any lot list and also answers the reverse question — how many shares at today’s price reach a target average — whose formula diverges as the target approaches the price. (Why that matters when the price has fallen is its own article.)
What a sell does — and the method question
Here is where methods split. This site’s main calculators use the average-cost method, applied sequentially: a sell removes shares at the running average and realizes the difference. Sell 5 of your 20 shares (avg $110) at $130 and you realize 5 × ($130 − $110) = $100; the remaining 15 shares still average $110. Under average cost, selling never moves the average of what remains — only buying can.
Lot-based methods answer differently. Under FIFO (first in, first out) that same sell disposes of $100-basis shares, realizing $150 and leaving the remainder averaging $113.33. Under specific-lot identification you could sell the $120 shares instead, realizing $50 and lowering the remaining average to $107.50. Same trade, three different realized gains, three different remaining averages — all arithmetically correct.
Which method applies to your taxes depends on your jurisdiction, your broker’s defaults, and elections you may be able to make; brokers commonly report average cost for funds and FIFO for stocks, and none of that is something a calculator should guess at. The main calculators here state their method — sequential average cost — and show every intermediate number so you can reconcile against whatever your broker reports. To see the methods side by side, the cost basis calculator runs one trade list under FIFO, LIFO, highest-cost-first and average cost, and shows which lots each sell used.
Why the number anchors so hard
Average cost has real uses: it’s the input to your break-even price (which sits slightly above it, once selling fees are counted), and it’s the baseline that splits total P/L into realized and unrealized in the position calculator. What it is not is information about the future — the market neither knows nor cares what your average is. Behavioral research finds that purchase prices act as powerful reference points anyway, shaping when people sell in measurable, systematic ways; the disposition-effect article covers that evidence. Understanding exactly what moves your average — and what your average cannot tell you — is the inoculation.