How it is calculated
- Average cost = (shares₁ × price₁ + shares₂ × price₂ + …) ÷ total shares.
- Shares to buy to reach a target average T at price P, holding S shares at average A: S × (A − T) ÷ (T − P).
- The target has to lie between the new price and your current average; a lower average is not reachable by buying above it.
What it leaves out
- Fees, unless you add them to each purchase price.
- Whether buying more is wise: averaging down lowers the break-even price but adds to a position that has fallen.
- Tax lots: brokers may track each purchase separately for capital gains.
A general calculation on your own numbers, not personalized financial advice.