Skip to content
Logo Any Help Me

Stock Average Calculator: Calculate Your Average Cost Basis

#1
$
#2
$
Price per shareNumber of shares
Average Cost Per Share
Total Shares
Total Invested
Avg Price

Purchase Breakdown

#PriceSharesCost
1$50$100$5,000
2$35$150$5,250
Total$41$250$10,250
Profit / Loss Calculator
$
Enter a target price above to calculate profit or loss

Your Average Price Across Several Buys

Buying the same holding more than once leaves you with a position that has no single purchase price. The average is what determines whether you are up or down, what a target price means for you specifically, and what the tax position looks like when you sell.

This calculator takes each purchase as a quantity and a price and returns the weighted average cost along with the total invested.

How to Calculate Your Average Cost

Enter each purchase separately; the weighting is what a simple average of the prices gets wrong.

  1. Enter the quantity and price for your first purchase.
  2. Add a row for each subsequent purchase at its own price and quantity.
  3. Include commission or fees in the price where your broker charges them, since they are part of what the position cost you.
  4. Read the weighted average cost. This is your break-even price before any tax.
  5. Compare it with the current price to see the position, and note that the total invested is the figure that matters for judging the size of the holding.
  6. Model a prospective purchase by adding it as a row before committing, which shows where the average would land.

Why It Is Weighted, Not Averaged

Buying 10 shares at 100 and 90 shares at 50 does not give an average of 75. The correct figure is 55, because ninety per cent of the position was bought at the lower price. Averaging the two prices ignores how much was bought at each and produces a break-even that is badly wrong in the direction of whichever purchase was smaller.

This matters most when someone adds a large position after a fall. The new average moves close to the recent price rather than sitting between the two, which is exactly why averaging down changes the break-even so much, and also why it commits a much larger sum to a holding that has already disappointed.

How a Second Purchase Moves the Average

Starting from 100 shares bought at 50, then adding at 40.

Shares added at 40Total sharesTotal investedNew average
251256,00048.00
501507,00046.67
1002009,00045.00
20030013,00043.33
40050021,00042.00

Doubling the position moves the average only from 50 to 45, halfway to the new price. Bringing the break-even close to the current price requires committing several times the original amount, which is the trade-off averaging down actually presents.

Average Cost and Tax Are Not the Same Question

The weighted average is a useful measure of your position, but many tax authorities do not use it to calculate a gain. Some require first-in-first-out, some allow specific identification of which shares were sold, and rules on identical holdings bought within a short window before or after a sale vary considerably. The average cost may not be the cost basis your tax return uses.

This is a calculation tool rather than investment advice. Averaging down lowers the break-even price and simultaneously increases the amount at risk in a single holding, and whether that is sensible depends on why the price fell, something no calculator can assess. Nothing here is a recommendation to buy or sell.

One habit the calculation encourages is worth naming: it makes the total invested visible alongside the average, and that first number is usually the more important one. A break-even price that has come down looks like progress, but if it came down because the position now represents a much larger share of a portfolio, the risk has grown rather than shrunk. Reading the two figures together is what keeps that visible.

Frequently Asked Questions

How do I calculate my average share price?
Divide the total amount invested by the total number of shares. That weights each purchase by its size, which a simple average of the prices does not.
Why is a simple average of the prices wrong?
Because it ignores how many shares were bought at each price. Ten shares at 100 and ninety at 50 average to 55, not 75.
What is averaging down?
Buying more of a holding after the price falls, which lowers the average cost. It also increases the total amount committed to a position that has already declined.
Should I include broker fees?
Yes, where they are charged. Fees are part of what the position cost you, so including them gives a break-even price that reflects reality.
Is my average cost the same as my tax cost basis?
Often not. Many jurisdictions require first-in-first-out or specific identification rather than average cost, so check the rules that apply to you before assuming.
How much do I need to buy to move my average significantly?
More than most people expect. Doubling a position only moves the average halfway to the new price, so meaningful moves require several times the original amount.
Is my portfolio data private?
Yes. Everything is calculated in your browser and nothing you enter is transmitted or stored.

Explore more in Finance

View all →