Guide
Average cost per share and the arithmetic of averaging down
If you buy the same share on several occasions at different prices, your cost basis, the price at which you break even, is neither the first price nor the last. It is a weighted average that depends on how many shares you bought each time. Knowing it precisely matters when you decide whether to sell, when you report gains for tax, and when you are tempted to buy more of something that has fallen.
Entering purchases
Write each purchase on its own line as the number of shares and the price per share, for example “100 @ 250”, “50, 180” or “75 x 140”. The page accepts commas in numbers and currency symbols on the price. A line it cannot read produces a message with the line number. Fractional shares are fine, so units of a fund or coin work in the same way.
The average
Total invested is the sum of shares × price for every lot, and the average is that total divided by the total number of shares. In the sample, 100 at 250, 50 at 180 and 75 at 140 cost 25,000 + 9,000 + 10,500 = 44,500 for 225 shares, an average of 197.7778. That is also the price at which the holding breaks even before any fees. With a current price of 150 the holding is worth 33,750, a loss of 10,750 or 24.16 percent.
Averaging down
Buying more at a lower price pulls the average down. To reach a target average T by buying x shares at price p, the equation (S × A + x × p) ÷ (S + x) = T solves to x = S × (A − T) ÷ (T − p), where S and A are the shares and average you hold now. In the sample, to bring the average to 170 by buying at 150 you need 225 × (197.7778 − 170) ÷ (170 − 150) = 312.5 shares. In whole shares that is 313, which costs 46,950, and the new average is 169.9814 on a total investment of 91,450.
When the target cannot be reached
The formula only works when the price of the new shares is below the target and the target is below your current average. If the target is at or above the average, no purchase is needed. If it is at or below the price you would pay, the page explains that no amount of buying at that price can get you there. These checks save you from nonsense numbers such as a negative number of shares.
The risk
Averaging down lowers your break-even price, but it also commits more money to the same holding. If the price keeps falling, the loss grows with the larger position. It makes sense when you would buy the share at today’s price anyway, with fresh money and a clear reason, and not simply to make a past mistake look smaller. The calculator describes the arithmetic and offers no view on whether to do it.
Limits
Brokerage, transaction taxes and currency conversions are not included; add them to each price if you want a basis that contains them. For tax reporting, some countries require a specific method, such as first in, first out, rather than an average, so check your local rule.
Related tools
- Capital Gains Calculator estimates the tax when you sell the holding at a profit.
- Dividend Calculator projects the income from the shares you hold.
- ROI Calculator turns the gain or loss into a percentage return.
- Percentage Calculator helps with quick checks of price changes.
Checked against the current version of the Stock Average Calculator on .

