Cost Basis & Stock Average Calculator
Average Cost Basis Across Multiple Stock Purchases
Calculate your stock cost basis across multiple purchases, including fractional shares, to find your weighted average share price, break-even point and total investment. The Average down tab works the other way round and shows how many shares at a given price bring your average down to a target.
You buy 100 shares at $50, then 50 more shares at $40 when the price dips. Your average cost becomes $46.67 per share rather than $45, because you own more shares at the higher price. If the stock recovers to $50, the 150-share position is $500 in profit, about $3.33 a share over your average. Starting again from the 100 shares at $50, getting the average down to $45 with one buy at $40 takes 100 shares, a $4,000 purchase.
Enter your purchases
Add each transaction to calculate your averageFills in the latest price shown on the stock’s page, or its last close when no recent price is available, and values your position at it. In Average down it also becomes the buy price, which you can type over.
Results
Your average price calculationEnter your stock purchases and click calculate to see your average price.
Enter the shares you hold, their average, the average you are aiming for and a buy price to see how many shares that purchase takes.
Averaging Down Strategy
Understanding cost averaging in the stock market
Why does average price matter?
Your average purchase price (cost basis) determines your break-even point, the price at which you neither profit nor lose before fees or taxes. Every time you buy more shares at a different price, your cost basis shifts. Knowing this number helps you understand the position accurately.
For example, if you buy 100 shares at $50 and later 200 shares at $35, your average drops to $40 per share. The stock only needs to recover to $40 for you to break even before fees and taxes, not back to $50. This is why tracking your true cost basis matters more than remembering individual purchase prices.
When should I average down on a stock?
Averaging down means buying more shares after a price drop, which lowers your weighted average price if the later purchase price is below your current cost basis. The calculator shows the math, but it does not decide whether adding to a position is appropriate.
Before adding to a losing position, compare the new average price with your risk plan, portfolio size, and the latest company information. A lower price can improve the arithmetic of the position, but it can also reflect real deterioration in the business or market outlook.
How does a stock average calculator work?
A stock average calculator uses weighted average math: average price = total cost ÷ total shares. It multiplies each purchase price by the number of shares bought, adds every purchase cost together, then divides that combined cost by the total shares owned.
This method handles uneven purchases correctly. A 500-share order has five times the weight of a 100-share order, so the larger trade has a larger effect on your average share price.
Average down vs. dollar-cost averaging
Average down calculations focus on what happens when you add shares below your current average price. Dollar-cost averaging is broader: it usually means investing a set amount on a schedule regardless of short-term price movement.
If you want to model scheduled contributions over time, use the DCA Calculator. If you want the average price of actual share purchases, this stock average calculator is the right tool.
How many shares do I need to buy to average down?
The answer depends on the shares you already hold and on two gaps: how far your current average sits above the target, and how far the target sits above the price you would buy at. Written out, shares to buy = shares held × (current average − target) ÷ (target − buy price). With 100 shares at a $50 average, a $45 target and a $40 buy price, that is 100 × $5 ÷ $5 = 100 shares, a $4,000 purchase, and the 200 shares then cost $9,000 between them, which is $45.00 each.
The closer the buy price gets to the target, the more shares it takes, and a buy price at or above the target never gets there, since the new average always lands somewhere between your current average and the price you pay. The Average down tab above runs the same formula on your own numbers, and a ticker fills in the latest price shown on the stock’s page as the buy price (its last close when no recent price is available) if you would like to start from there.
Is my average price the same as my tax cost basis?
Not always. This calculator gives the average cost of the whole position. When you sell part of a position in an individual stock, US tax rules use the cost of the specific shares you sell, or of the shares you bought first when you cannot identify them, and an average cost is allowed only for certain mutual fund and dividend reinvestment plan shares (IRS Publication 550). Commissions and transfer fees are added to the cost (IRS Publication 551). This is general information, not tax advice; confirm specifics with a tax professional.
For informational and educational purposes only, not investment advice.