Stock Average Calculator

Average cost after averaging down and shares needed for a target

Shows how many shares you would need to buy at the buy price, starting from your current holding.

Averaging down in 3 steps

  1. Add up the costcurrent shares × current average + new shares × new price
  2. Divide by total sharesa weighted average, so a bigger buy moves the average more
  3. 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

StepCalculationResult
Current position100 shares × 50.005,000.00
New purchase100 shares × 40.004,000.00
Total200 shares9,000.00
New average9,000.00 ÷ 20045.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

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.

Frequently asked questions

How is the average cost per share calculated?

Add up what you paid for every lot (shares × price) and divide by the total number of shares. Buying more at a lower price pulls the average down; buying at a higher price pulls it up.

Should I include commissions in the price?

If you want your true cost basis, yes. Many brokers now charge zero commission on stocks and ETFs, but if yours does not, add the fee to the lot total and divide by the shares to get an all-in price per share.

Why does it say my target average is not reachable?

Your new average can only land between your current average and the price you buy at. If you hold at 50 and buy at 40, no amount of buying gets you below 40 or above 50. Pick a target in that range or change the buy price.

Can I use fractional shares?

Yes. Quantities can have decimals for the average calculation. The “shares needed” figure is rounded up to a whole share, so with fractional trading you may need slightly less.

Does averaging down make a losing position better?

It lowers the break-even price, but it also puts more money into the same stock. If the company keeps falling, the loss grows. Decide on a maximum position size before you add.

Related calculators