Stock Average Calculator

Stock Average Calculator

Your average buy price across several purchases of the same share, what the holding is worth now, and how many more shares you would have to buy, at what cost, to bring the average down to a target.

Average buy price

Buys → average price
0 if you have not bought a second time.
0 = unused.
0 = unused.
Brokerage, exchange charges, stamp duty and other charges on each buy, as a % of its value. Your contract notes show them.
For the averaging question: the price of the next purchase, often today’s price.
The average you would like to bring your holding down to.
$1,133.33Example

100 shares at $1,200 and 50 at $1,000; the price is now $900; target average $1,000

Advertisement

Weighted average price, and shares needed to reach a target

Average = Σ(q × p) × (1 + c) ÷ Σq;   n = (TC − Y × Q) ÷ (Y − X × (1 + c))
q, p
the shares and price of each purchase
c
buying costs as a fraction of the trade value
TC, Q
the total cost and total shares so far
X, Y
the price of the next purchase and the target average; n is rounded up, and exists only if X × (1 + c) is below Y

Worked example

100 shares at $1,200 and 50 at $1,000; the price is now $900; target average $1,000
Total cost = 100 × 1,200 + 50 × 1,000 = $1,70,000; shares = 150
Average = 1,70,000 ÷ 150 = $1,133.33
Worth now = 150 × 900 = $1,35,000, an unrealised loss of $35,000 (20.59%)
To reach 1,000 buying at 900: n = (1,70,000 − 1,000 × 150) ÷ (1,000 − 900) = 200 shares, costing $1,80,000
New average = (1,70,000 + 1,80,000) ÷ 350 = $1,000

Shares to buy to bring a 150-share average of 1,133.33 down to a target

Target averageBuying at 900Buying at 800Buying at 700
$1,10025 shares ($22,500)17 shares ($13,600)13 shares ($9,100)
$1,05084 shares ($75,600)50 shares ($40,000)36 shares ($25,200)
$1,000200 shares ($1,80,000)100 shares ($80,000)67 shares ($46,900)
$950550 shares ($4,95,000)184 shares ($1,47,200)110 shares ($77,000)
The closer the target is to the buy price, the more shares it takes. Costs are 0% here.

How the average price works, and what averaging down really does

When you buy the same share more than once, your cost per share is a weighted average: the total you paid divided by the total number of shares. It is weighted by quantity, so a large purchase moves the average far more than a small one. Buying costs such as brokerage, exchange charges and stamp duty are part of what you paid; enter them as a percentage and they are added to every purchase. In the example, 100 shares at 1,200 and 50 at 1,000 average 1,133.33, not the simple midpoint of 1,100.

Averaging down. Buying more after a fall lowers the average. The page solves for the number of shares that brings the average to your target: n = (total cost − target × shares held) ÷ (target − buy price). Two limits follow from that formula. The buy price has to be below the target, because the average can approach the price you are buying at but never pass it. And the closer the target is to that price, the more shares it takes, rising steeply: in the table, reaching 950 by buying at 900 takes 550 shares.

A lower average does not by itself make the position any better. The shares are worth the market price whatever you paid, and a lower break-even point comes from putting more money into the same holding. Averaging down makes sense only if you would buy the share at today’s price anyway; for how much of an account to put into one position, see the position size calculator.

Tax is worked out differently. This average is for your own tracking. In India, when you sell shares held in a demat account, the cost and the holding period for capital gains are matched first-in, first-out, the oldest shares first, not at the average price. To measure the return on a holding, use the ROI calculator or the CAGR calculator. This is arithmetic on the figures you enter, not financial advice.

Advertisement

Frequently asked questions

How do you calculate the average price of a stock?

Add up what you paid for every purchase, including costs, and divide by the total shares. 100 shares at 1,200 and 50 at 1,000 cost 1,70,000 for 150 shares: an average of 1,133.33.

How many shares should I buy to average down to a target price?

n = (total cost − target × shares held) ÷ (target − buy price), rounded up. In the example, bringing 1,133.33 down to 1,000 by buying at 900 takes 200 shares, $1,80,000 more money.

Why does the calculator say my target is impossible?

Because you would be buying at or above the target. Each new share pulls the average towards the price you pay for it, never beyond it, so only a purchase below the target can bring the average under it.

Is the average price used for capital gains tax?

Not in India for shares held in demat: the cost and holding period of the shares you sell are matched first-in, first-out. Your broker’s tax statement does this for you.

Related calculators

References

  1. Bodie Z, Kane A, Marcus AJ. Investments. McGraw-Hill. Holding-period return, cost basis, option payoffs at expiry and option pricing.
  2. Income-tax Act, 1961, section 45(2A): for securities held in a demat account, the cost and holding period are worked out first-in, first-out. The Income-tax Act, 2025 replaced the 1961 Act from 1 April 2026; check the current provisions before filing.
  3. SEBI. Investor charter for stock brokers, and contract note requirements: brokerage and statutory charges (securities transaction tax, exchange transaction charges, stamp duty, GST) are shown on each contract note.