Skip to content
AZ Tools

Stock Average Price Calculator (Averaging Down)

Find the average cost of shares bought at different prices and your gain or loss, and how many more to buy at today's price to reach a target average.

Purchases
PriceQuantity
#1
#2

Average price

65,000

Shares held

20

Total cost

1,300,000

Market value

1,100,000

Unrealised gain/loss: −200,000 (−15.38%)

Averaging down

How many more shares at a given price bring the average to your target.

Buy 20 more at 55,000 for an average of 60,000

Extra cost 1,100,000 · 40 shares afterwards

Fees, taxes and exchange rates are not included. Fractional quantities are fine.

How to use

  1. Enter each purchase's price and quantity; add rows with the button.
  2. Enter the current price to see the market value and return.
  3. In the averaging section, enter the price you would buy at and the average you want; it shows how many to buy and the cost.

About this tool

Show

Bought a stock, ETF or coin in several goes? This works out your average cost per share and, given the current price, the market value and the gain or loss. The average cost is not the average of the prices but total cost ÷ total shares: 10 shares at 70,000 and 30 at 60,000 average (700,000 + 1,800,000) ÷ 40 = 62,500, not the 65,000 halfway between the two prices.

The averaging-down section asks the reverse question: how many shares at today's price B bring the average to a target T? The answer is shares held × (current average − T) ÷ (T − B), rounded up because shares are bought whole. Holding 20 shares at an average of 65,000 and buying at 55,000 to bring the average to 60,000 takes 20 × 5,000 ÷ 5,000 = 20 shares, costing 1,100,000. It only works when the target lies between the current average and the purchase price; buying above the average to raise it (averaging up) uses the same formula.

The closer the target is to the purchase price, the faster the share count grows: in the example above a target of 56,000 needs 180 shares. Commissions, transaction taxes, exchange rates and capital gains tax are not included, and fractional quantities (fractional shares, crypto) are accepted. Inputs stay in this browser.

Frequently asked questions

How is the average price calculated?

Total cost divided by total shares: a quantity-weighted average, not the plain average of the prices.

What is the averaging-down formula?

Shares to buy = shares held × (current average − target) ÷ (target − purchase price), rounded up to a whole share.

It says my target is impossible.

The target must lie between the current average and the purchase price. Buying at 55,000 can never bring the average below 55,000.

Are fees and taxes included?

No. To include a buying commission, add it to the purchase price. Selling taxes are separate.

Related tools