Finding Your Quantity-Weighted Average Cost Per Share
Your average cost per share across separate purchases of the same stock is the total amount you spent divided by the total number of shares you bought — weighted by how many shares each purchase actually involved, not a plain average of the prices you paid. Enter the number of shares bought and the price paid in each purchase, and optionally a current price, to see your real average cost, total shares owned, and your current gain or loss.
This is distinct from the Dollar-Cost Averaging (DCA) Calculator calculator, which assumes a fixed dollar amount invested every period, with the number of shares bought each time implied by that fixed amount divided by the price. This calculator instead takes the actual number of shares bought in each purchase directly as input — real purchase sizes you choose, not a fixed-dollar formula.
The Formula
The average cost per share is the total cost of every purchase divided by the total shares bought:
Each purchase pulls the average toward its own price in proportion to how many shares it involved — a large purchase has far more influence on the average than a small one at the same price.
Worked Example
Buying 10 shares at $100, then 20 shares at $80, then 5 shares at $120:
- Total shares owned: 10 + 20 + 5 = 35 shares.
- Total cost: (10 x $100) + (20 x $80) + (5 x $120) = $3,200.
- Average cost per share: $3,200 / 35 = $91.43 — lower than the simple average of the three prices ($100.00), because the largest purchase (20 shares) happened at the lowest price ($80).
- At a current price of $95, the position is worth about $3,325.00, a gain of about $125.00 (3.91%).
Key Factors to Consider
- Average cost per share is a cost-basis concept, distinct from cost-basis METHODS used for tax reporting. Brokers may track cost basis using specific-lot identification (choosing exactly which purchased shares to sell) rather than a simple weighted average — this calculator computes the intuitive weighted-average figure for understanding your overall position, which may differ from the specific cost-basis method your broker actually uses when calculating taxable gains on a partial sale.
- Trading commissions and fees, if any apply, should be added into a purchase’s total cost for a fully accurate average. This calculator uses the raw quantity-times-price figures entered — including any per-trade fees in the price or as part of the total cost gives a more complete picture of the real, all-in average cost basis.
- “Averaging down” (buying more shares as the price falls) is a deliberate strategy some investors use, but it isn’t automatically the right move. It only makes sense if the original investment thesis for owning the stock still holds — averaging down purely to lower an average cost, without re-evaluating why the price fell in the first place, can mean adding more money to a genuinely deteriorating investment.
- This calculator handles purchases only — selling shares (even partially) requires tracking which shares are considered sold, which affects the remaining average cost differently depending on the accounting method used. A partial sale isn’t simply subtracted from this running average without deciding which lot the sold shares came from, which is a separate, more involved calculation than this tool covers.
Common Mistakes
- Averaging the prices instead of weighting by quantity. A simple average of $100, $80, and $120 is $100.00 — but the real average cost is $91.43, because 20 of the 35 total shares were bought at the cheapest price. Whenever purchase sizes differ, the simple average and the true average cost basis can diverge significantly.
- Thinking “averaging down” reduces your risk. Buying more shares at a lower price lowers your break-even point, but it also means you now have more total money invested in the stock — your risk exposure goes up, not down, even as your average cost goes down.
- Forgetting that a lower average cost per share isn’t the same as a profit. The position still needs the current price to exceed the average cost per share to be in the green.
Useful to Know
- Investing a fixed dollar amount on a regular schedule instead of choosing your own purchase sizes? Dollar-Cost Averaging (DCA) Calculator models that fixed-amount approach directly.
- Want to know your overall return once you know your average cost basis? Return on Investment (ROI) Calculator turns an initial investment and current value into a percentage return.
- Reinvesting dividends back into more shares of the same stock? Dividend Reinvestment (DRIP) Calculator projects how that compounds over time.