Average Cost Per Share Calculator

A hundred shares bought at $50 and fifty more at $35 make 150 shares, $6,750 invested and an average of $45.00. The average moved eleven percent. The money at risk went up by a quarter. Both of those are results of the same purchase and only one of them tends to get mentioned.

Added to the cost basis, once per purchase entered. Many brokers charge nothing on ordinary share trades and some charge per trade or per share. Use your own figure.
Optional. Used for the position value and the move back to break even.
Average Cost Per Share Calculator — New Average After Adding to a PositionBuildFigure

The formula, and the one place people put the wrong number in it

Average cost is total money in divided by total shares held. Nothing else enters it. A hundred shares at $50 is $5,000, fifty shares at $35 is $1,750, and $6,750 across 150 shares is $45.00 per share. That is the whole calculation, and it works the same whether the second purchase was higher or lower than the first.

The input that goes wrong is the first one. People type the price they remember paying rather than the average their broker is holding, and those differ as soon as there has been more than one purchase, a reinvested dividend, a fractional share or a stock split. Take the average from the account, not from memory. If the position was built over years, the account figure is the only one that reflects it.

Commission belongs in the basis when it exists. On a $6,750 position a few dollars of commission moves the average by a fraction of a cent and does not matter. On a $200 purchase with a $7 commission it is three and a half percent and it matters a great deal. The field is there for the second case.

What adding to a losing position actually changes

Two things move when you buy more of something that has fallen, and they move in opposite directions.

BeforeAfter 50 more at $35Change
100 shares150 shares+50%
$5,000 invested$6,750 invested+$1,750
Average $50.00Average $45.00-10%
Break even needs +42.9% from $35Break even needs +28.6% from $35lower bar
A further 20% fall costs $700A further 20% fall costs $1,050+$350

The recovery needed falls, and the cost of being wrong again rises. Both are consequences of the same $1,750. Which one dominates depends entirely on what happens to the price next, which the arithmetic does not know and neither does anyone else. The honest framing is that averaging down is a decision to concentrate more money in a position, taken at a moment when the market has priced that position lower than you did. That may be right. It is not made right by the average falling, because the average falls automatically whenever you buy below it.

The reverse solve and why it runs away from you

To move an average to a target, the shares needed are the current holding times the distance from average to target, divided by the distance from target to purchase price. In symbols, shares = held x (average − target) ÷ (target − price).

The denominator is what makes this awkward. From 150 shares at an average of $45, getting to $42 by buying at $35 takes 64 shares. Getting to $38 takes 375. Getting to $36 takes 1,125, which is $39,375 of new money to move an average by nine dollars. As the target approaches the purchase price the requirement goes to infinity, and it never reaches the purchase price at all, because the original shares are always in the numerator. That asymptote is the useful part of the calculation: it shows the point where the target has stopped being a plan and become a wish.

Selling, splits and what the average is for

Selling part of a position does not change the average cost of what remains. Sell 50 of 150 shares held at $45 and the remaining 100 are still held at $45; what changed is that a gain or loss on the 50 became real. Some brokers display a figure that nets realised profit against the remaining basis, which is a presentation choice rather than a different cost, and it is worth knowing which one your account shows before comparing it to anything.

Splits scale both sides and leave the average consistent: a two for one split turns 150 shares at $45 into 300 at $22.50, with $6,750 invested either way. Reinvested dividends are ordinary purchases and belong in the table as lots.

What the average is for is narrow. It sets the break-even price and, where gains are taxed, it is the basis those gains are measured from. It says nothing about whether the holding is worth keeping, because the market does not know or care what you paid. To see what a sale actually returns after costs, the stock profit calculator takes the same position through to a net figure. If the holding pays a dividend, the average cost here is the denominator behind yield on cost in the dividend calculator.

Questions people ask

Does the average include commissions and fees?

It does if you enter a commission, and it should. Cost basis is what the shares cost you to acquire, which includes the commission paid to acquire them. The field applies your figure once per purchase you enter, not to the existing holding, since whatever commission was paid on that is already inside the average your account shows. Brokerage charges vary enormously between providers and account types, from nothing at all on ordinary share trades to a flat fee per order to a charge per share, so the page assumes none until you type one.

Can the average cost ever reach the price I am buying at?

No. The original shares never leave the numerator, so the average approaches the purchase price as you buy more but never arrives. Half the position bought at $35 with an average of $50 gets you to $42.50, three quarters gets you to $38.75, nine tenths gets you to $36.50, and each further step costs more than the last for less movement. If your target is close to the price you would be buying at, the reverse solve will show a quantity large enough to make that obvious.

What about fractional shares and crypto?

The arithmetic is identical and the quantity fields accept decimals, so 0.4213 units works exactly as 100 shares does. The results table shows quantities to six decimal places for that reason. The reverse solve reports both a rounded whole number and the exact figure; for anything that trades in fractions, use the exact one.

Is averaging down a good strategy?

That is not a question with an arithmetic answer and this page does not offer one. What the calculator can tell you is the size of the commitment: how much new money is involved, how far the average moves for it, what the position is worth at the price you entered, and how much a further fall would now cost. Those are the figures the decision rests on. The decision itself depends on why the price fell and on how much of your money you want in one place, and neither of those is visible from a cost basis.

Related