How to use the average price calculator

  1. Pick the currency and enter a fee per trade. The fee is optional. It is charged on each buy and once more on the sale that closes the position.
  2. Enter your buys. Each row is one purchase: the price and the quantity. You can use up to six. Empty rows are ignored, and a row with only a price or only a quantity is left out, with a note telling you which.
  3. Enter the current price. This is optional. It adds the value of the position and the unrealised profit or loss.
  4. Plan the next buy. Enter the price you would buy at, then choose how to size it: a quantity, or the average price you want to reach. In the second case the calculator works out how many units that takes.

The results show the total quantity, the total cost, the average price, the break-even price, the unrealised result, and what your average, position size and break-even would be after the planned buy. The first chart follows the average from buy to buy against the prices you paid. The second shows what each buy cost.

The average price formula

The average price is weighted by quantity, because a larger buy counts for more than a smaller one:

average price  = Σ (price × quantity) ÷ Σ quantity
break-even     = (Σ (price × quantity) + fee × (buys + 1)) ÷ Σ quantity
unrealised P&L = quantity × current price − Σ (price × quantity) − fee × (buys + 1)
new average    = (cost + planned price × x) ÷ (quantity + x)
x for a target = quantity × (target − average) ÷ (planned price − target)

The sums run over all your buys. In the last line, x is the number of units to buy at the planned price so that the average lands on the target. The break-even adds the fee of every buy plus one more for the sale, which is why it sits above the average whenever the fee is above zero. The average price itself leaves fees out, as a broker's average cost column does.

The weighting is what separates this from a plain mean. Buying 10 at 100 and 30 at 80 gives an average of 85, not 90, because three quarters of the position was bought at the lower price.

Worked example

You buy 10 units at 100, 10 at 90 and 20 at 80. The price is now 95, and you are thinking about buying 10 more at 75. Those are the defaults in the calculator above.

Step Calculation Result
Total quantity 10 + 10 + 20 40
Total cost 1,000 + 900 + 1,600 $3,500.00
Average price $3,500 ÷ 40 $87.50
Break-even (no fees) same as the average $87.50
Value now 40 × $95 $3,800.00
Unrealised P&L $3,800 − $3,500 +$300.00 (+8.57%)
The planned buy 10 × $75 $750.00
New average price ($3,500 + $750) ÷ 50 $85.00
Position growth 10 ÷ 40 25%
Units needed for an average of 85 at 75 40 × (85 − 87.5) ÷ (75 − 85) 10

A plain mean of the three prices would be 90, which overstates the cost because you bought most of the position at 80. The weighted average of 87.50 is the figure to use.

Now add a fee of 5 per trade. The break-even rises to (3,500 + 5 × 4) ÷ 40 = 88.00 and the unrealised result at 95 falls to +$280.00, because three buys and the sale cost $20.

Averaging down: what it does and what it does not

Averaging down means buying more of something after its price has fallen, so the average price comes down. The arithmetic always works: the new average lands between your old average and the new buy price. In the example, one buy at 75 pulls the average from 87.50 to 85.00.

What the arithmetic cannot do is change the odds. A lower average means the price has less far to climb before you are even, and that is all. How far it has to climb is also less forgiving than it looks: a position that has lost 40% needs a 66.7% gain to get back to its starting value, a sum the drawdown recovery calculator does for any loss. It also means you now hold more of an asset that has just moved against you. In the example the position grows by 25% while the idea behind it is exactly as unproven as before.

Here is how the risk behaves if your exit is at 70. Before the extra buy, 40 units from an average of 87.50 lose 40 × 17.50 = $700 at that exit. After it, 50 units from an average of 85.00 lose 50 × 15.00 = $750. The average fell, and the loss at the same exit went up by $50.

So decide on the exit and the total size before you start adding. If every buy is part of one plan, measure the risk from the average to your stop across the whole position, as in scaling in, and keep that total inside the amount you chose for the trade. The position size calculator gives the size for a single entry, and the same logic applies to the sum of the parts. Adding because the price is lower is a different thing from adding because your setup is still valid.

Adding to a winner is a different decision from adding to a loser. It also uses this calculator, and it raises the average instead of lowering it.

Dollar-cost averaging

Dollar-cost averaging is buying a fixed amount of money at regular intervals, whatever the price. Because the same money buys more units when the price is low, the average ends up below the plain mean of the prices.

Suppose you spend $1,000 at 100 and $1,000 at 50. You get 10 and 20 units, so the average is $2,000 ÷ 30 = 66.67, not 75. This is a mechanical effect of buying equal amounts, and it is a reasonable way to enter a position without guessing the bottom. It is not a guarantee of profit. If the price keeps falling, a series of equal buys is a series of losing buys, and the break-even in the calculator tells you how far the price has to recover.

Enter each purchase as its own row, using the quantity you actually received. For regular buys of the same amount, that quantity differs every time, which is exactly what the calculator is for.

Common average price mistakes

  • Averaging the prices instead of weighting them. Add up price times quantity, then divide by the total quantity.
  • Averaging down without a limit. Each extra buy has to fit inside a total size and a loss you accepted in advance.
  • Treating the average as a target. Waiting for the price to "get back to my average" can keep a bad position open for months. The average is where you stand, not where the market is obliged to go.
  • Leaving out fees on small buys. A fee of 5 on a buy of 100 is 5% of that buy. It moves the break-even more than it seems.
  • Mixing currencies or lot sizes. Enter all prices in one currency and all quantities in one unit.
  • Counting an unrealised profit as kept. The value now is what the position would fetch today, less the fee of selling. It changes with every tick.

What the calculator does not know

The calculator assumes you only bought. If you sold part of the position, the cost of what remains depends on your broker's method (average cost, first in first out and others), and on the tax rules where you live, so use the figure on your statement for that. It models the fee as a fixed amount per trade, not as a percentage, and it does not know about spreads, splits, dividends, interest on borrowed money or currency conversion. It also does not predict where the price goes. The planner shows arithmetic, not a recommendation. If you want to see what a finished trade made after fees, use the profit and loss calculator. Nothing here is investment advice.

Frequently asked questions

How do I calculate the average price when I buy at different prices?

Multiply each buy's price by its quantity, add up those amounts, and divide by the total quantity. Buying 10 at 100, 10 at 90 and 20 at 80 costs $3,500 for 40 units, which is $87.50 each. The calculator does this for up to six buys.

Why is my average price not the plain mean of my buy prices?

Because larger buys count for more. A plain mean treats a buy of 1 unit the same as a buy of 100. The weighted average multiplies each price by its quantity first, so the prices you bought most at pull the result towards them.

What does averaging down mean?

Averaging down means buying more of an asset after its price has fallen, which lowers your average price. In the example, buying 10 more at 75 brings the average from 87.50 down to 85.00. It lowers the break-even, but it also increases the size of the position.

Is averaging down a good strategy?

It depends on why you are adding. It can make sense when the original reasons for the trade still hold and the extra size stays inside a risk limit you set beforehand. It does harm when it is used to avoid accepting a loss, because it puts more money into an idea that is currently wrong.

Does averaging down reduce risk?

No, it reduces the average price but usually increases the money at risk. With a fixed exit, a larger position loses more if that exit is hit, even from a lower average. The exit at 70 in the example costs $700 before the extra buy and $750 after it.

How many units do I need to buy to reach a target average price?

Use x = quantity × (target − average) ÷ (planned price − target). To bring an average of 87.50 on 40 units to 85.00 by buying at 75, you need 40 × (85 − 87.5) ÷ (75 − 85) = 10 units. The target has to lie between your current average and the planned buy price, or it cannot be reached.

How do I calculate dollar-cost averaging?

Divide the total money you spent by the total units you received. Because equal amounts buy more units at lower prices, the result sits below the plain mean of the prices. Enter each purchase as a row with its price and the quantity you got.

What is the break-even price after fees?

The break-even is the sale price at which the whole position returns to zero after all fees. It is the total cost plus the fee of every buy and of the sale, divided by the total quantity. With a fee of 5 on the example position, it is 88.00 instead of 87.50.

What happens to my average price if I sell part of the position?

It depends on your broker's cost method. With an average cost method the remaining units keep the same average. With first in first out, the earliest buys are sold first, so the average of what remains changes. Check which method your statement uses.

Can I use the average price calculator for crypto, forex and stocks?

Yes. The formula works for any asset you buy in several steps, in whole or fractional units. Enter the price and the quantity of each fill in one currency. For forex, enter lots or units, as long as every row uses the same unit.