The formula
Total shares = Σ shares bought
Total cost = Σ (shares × price) + fees
Average price = total cost ÷ total shares
Unrealised gain = total shares × current price − total cost
Rise needed to break even = average price ÷ current price − 1
Shares to buy for a target average T at price P:
x = total shares × (average − T) ÷ (T − P)
Worked example
- You bought 100 shares at $50 and 50 more at $40.
- Total cost = 5,000 + 2,000 = $7,000 for 150 shares, so the average price is $46.67.
- At today's $42 the shares are worth $6,300, an unrealised loss of $700 (−10%).
- The price must rise 46.67 ÷ 42 − 1 = 11.11% for you to break even.
- To bring your average down to $45, buy 150 × (46.67 − 45) ÷ (45 − 42) = 83.33 shares at $42, costing $3,500.
What averaging down means
Averaging down means buying more of an investment after its price has fallen, which lowers your average cost per share. The calculator combines up to five purchases into a single average price and shows your current gain or loss and the price rise needed to break even. Because the new shares are cheaper, you need a smaller rebound to get back to even. In the example, the break-even price falls from $50 to $46.67.
Reaching a target average
Enter a target average and the calculator works out how many shares you'd need to buy at today's price to get there. The target must lie between your current average and the current price. You can never average all the way down to the current price, and each step closer costs more. In the example, getting from $46.67 to $45 costs $3,500. Getting to $43 would take far more, as the formula's denominator shrinks.
When averaging down makes sense
Averaging down works when the investment is still sound and the price fall is temporary: a broad index fund in a market correction, for example, or a quality company hit by short-term news. It's also the automatic effect of regular investing. See the dollar-cost averaging calculator. The key question is whether you'd buy the shares today at this price if you didn't already own any. If the answer is yes, a lower average is a bonus.
When it's dangerous
Averaging down on a company whose prospects have genuinely worsened is often called throwing good money after bad. Prices can keep falling, and a position that keeps growing as it falls can come to dominate your portfolio. Traders call this "adding to losers" and most strategies forbid it. Set a limit in advance on how large any single holding can become, and consider your position size and risk before adding.
Averaging up
The same maths works in reverse. Buying more of a winning position raises your average cost, which is called averaging up or pyramiding. Your average rises, but so does the size of a position that's working. Many trend-following traders prefer this to averaging down. Enter purchases at rising prices to see the effect.
Cost basis and tax
For tax, your cost basis may be calculated differently from this simple average. In the US, brokers usually default to FIFO (first in, first out) for shares, though you can often choose specific lots, and mutual funds can use average cost. The UK pools shares of the same company at average cost (a section 104 holding), subject to same-day and 30-day matching rules. Include commissions in the fees field, because they're part of your cost. Estimate the tax on a sale with the capital gains tax calculator.
Using the calculator
Enter each purchase's number of shares and price, leaving unused rows at zero, then today's price. Fractional shares are fine. The result shows your average price per share, total cost, current value, gain or loss and the move needed to break even. It works the same for stocks, ETFs, mutual funds and cryptocurrencies; for crypto, enter coins as shares. Results are before tax and assume no dividends were received.