Averaging down in 3 steps
- Add up the costcurrent shares × current average + new shares × new price
- Divide by total sharesa weighted average, so a bigger buy moves the average more
- Target averageshares = q × (current average − target) ÷ (target − buy price), rounded up
average = (q₁ × p₁ + q₂ × p₂) ÷ (q₁ + q₂)
How the stock average calculator works
Your average cost per share (also called cost basis per share) is a weighted average. Each purchase counts in proportion to the number of shares it added, so a big buy at one price moves the average much more than a small buy at another. The calculator combines your current position with a new purchase and shows the result, along with the total number of shares and the total amount invested.
The formula is average = (q₁ × p₁ + q₂ × p₂) ÷ (q₁ + q₂), where q is the number of shares and p is the price of each lot. If you have bought in more than two lots, enter the shares you hold and the average price your broker shows as the first lot; that number already blends all of your earlier purchases.
Shares needed to reach a target average
When you average down, a common question is “how many shares do I have to buy at today’s price to bring my average to X?” Rearranging the formula gives shares = q × (current average − target) ÷ (target − buy price), rounded up to a whole share. The target has to sit between your current average and the buy price. You can never average below the price you are buying at, and the closer the target is to that price, the more shares you need. The number grows very quickly, which is why trying to “fix” a large loss by averaging down can take far more cash than expected.
Worked example
| Step | Calculation | Result |
|---|---|---|
| Current position | 100 shares × 50.00 | 5,000.00 |
| New purchase | 100 shares × 40.00 | 4,000.00 |
| Total | 200 shares | 9,000.00 |
| New average | 9,000.00 ÷ 200 | 45.00 |
| Shares at 40.00 for a 42.00 average (from 100 at 50.00) | 100 × (50 − 42) ÷ (42 − 40) | 400 |
| Shares at 40.00 for a 42.00 average (from 200 at 45.00) | 200 × (45 − 42) ÷ (42 − 40) | 300 |
Notice how buying another 100 shares only moved the average from 50.00 to 45.00. Getting all the way to 42.00 needs 400 shares at 40.00 in total, which is four times the original position.
Practical tips
- Include fees if you pay them. Many brokers charge zero commission for stocks and ETFs, but some markets and account types still charge a fee per trade. Add it to the cost of the lot to get your true break-even price.
- Use your broker’s average as the starting point. It already reflects splits, dividends you reinvested and earlier lots. Re-entering every trade by hand is a common source of small errors.
- Plan the size before you buy. Decide the maximum percentage of your portfolio one stock can take, then check whether the shares needed for your target fit inside that limit.
- Averaging up works the same way. If you buy more of a winner at a higher price, the average rises. The calculator handles both directions.
Cautions
Your tax cost basis may not be the same as this simple average. Some countries require first-in, first-out (FIFO) or specific lot identification when you sell, and wash-sale rules can change the basis of shares bought shortly after a loss. Check the rules where you file taxes, or ask your broker which method they report. A lower average also does not change what the shares are worth today; it only changes the price you need to break even.