How to use the stock average calculator
- Enter each purchase as a row: the number of shares, the price per share and, if you want, the fee. Fractional shares are fine.
- Use Add a purchase for more rows. Blank rows are ignored.
- Optional: open More options to enter the current share price to see your gain or loss, or a planned purchase to see how it would change your average.
- Read the average cost per share, which is also your break-even price before selling costs.
Formula
Cost of a purchase = shares x price + fee
Total cost = sum of all purchase costs
Total shares = sum of all shares
Average cost per share = total cost / total shares
This is a weighted average, so each share counts once. It is not the simple average of the prices, which would ignore how many shares you bought at each price.
Worked examples
Three purchases: 100 shares at $50.00, 50 shares at $42.00 and 75 shares at $58.40 cost $5,000 + $2,100 + $4,380 = $11,480.00 for 225 shares. The average is $51.0222 per share. The simple average of the three prices would be $50.13, which understates your cost because you bought the most shares at the higher prices.
With a fee: adding a $10 fee to the first purchase raises the total cost to $11,490.00 and the average to $51.0667.
Gain and a planned purchase: at a current price of $60, your 225 shares are worth $13,500.00, a gain of $2,020.00 (17.6%). Buying 100 more shares at $40 would bring the average down to $47.6308 across 325 shares.
Averaging down and averaging up
Buying more shares after the price falls lowers your average cost, often called averaging down. Buying after a rise raises it. A lower average makes it easier to break even, but buying more of a falling stock also increases how much money is exposed to it. The planned purchase option shows the arithmetic only. It does not say whether a purchase is wise.
Average cost versus tax cost basis
Many brokers track individual lots and let you choose which shares are sold, so your reported gain for a sale can differ from the gain based on the overall average. Mutual fund accounts sometimes use an average cost method for tax reporting. Rules differ by account and situation, so check your broker's statements and tax guidance. This tool does not process sales, stock splits, return of capital or wash sale adjustments.
Why fees belong in the cost
A commission or fee is part of what you paid, so including it gives a more honest break-even price. If your broker charges no commission, leave the fee blank. Fees on selling are not included in the break-even price shown here.
Assumptions and limits
- Every row is a purchase. Sales are not subtracted, so enter only the shares you still hold at their purchase prices.
- The break-even price ignores selling fees, taxes and any dividends received.
- Stock splits and other corporate actions are not adjusted, so enter split-adjusted shares and prices.
- The average is a simple weighted average, not a specific-lot or tax-lot calculation.
- Results are rounded to four decimals for the price and to the cent for totals, for display only.
- This is arithmetic, not tax or investment advice.
Frequently asked questions
How do I calculate the average cost of a stock?
Add up what you paid for every purchase, including fees, and divide by the total number of shares. This page does that for any number of purchases and also shows the break-even price.
What is averaging down?
It means buying more shares at a lower price than you paid before, which lowers your average cost per share. The planned purchase option shows the new average, but it does not suggest that adding to a position is a good idea.
Why is the weighted average different from the average of the prices?
A simple average treats a 10-share purchase the same as a 1,000-share purchase. A weighted average counts every share, so large purchases pull the result toward their price.
Can I use fractional shares?
Yes. Enter the decimal number of shares, such as 2.5 or 0.125. The total shares and the average are calculated from the exact amounts you enter.
Is this the same as my broker's cost basis?
It can differ. Brokers may track lots separately or use another method, and they adjust for splits and other events. Use your broker statement for tax reporting, and this tool for a quick overall average.