How to calculate the average price of a stock

Your average price is what you paid per share across all your buys: total cost ÷ total shares, where total cost is the sum of shares × price for each purchase. It is weighted by the number of shares, so it is not the simple average of the prices.

Hypothetical: you buy 100 shares at $50, then 50 at $44, then 50 at $38. Total cost = $5,000 + $2,200 + $1,900 = $9,100. Total shares = 200. Average price = $9,100 ÷ 200 = $45.50. The plain average of the three prices is $44, which is wrong here because the first buy was twice as large as each of the others.

With equal buys the two match: 1 share at $60 and 1 at $40 average $50. Make the second buy 3 shares at $40 and the average drops to $45, because more shares were bought at the lower price.

How to use the stock average calculator

The first mode, Average price, takes one row per purchase. It runs in your browser and stores nothing you type.

  1. Shares and Price: enter the first buy, for example 100 shares at $50.
  2. Add a purchase: add a row for each later buy, up to 10 purchases.
  3. Read Total shares, Total cost and Average price: 200, $9,100 and $45.50 for the example above.
  4. Current price (optional): enter it to see Market value and Profit / loss in dollars and percent, as in the next section.
  5. Reach a target average: switch to the second mode when you want to know how many shares to buy to move your average.

Stock average calculator with profit: add the current price

With a current price, the calculator compares what your shares are worth with what you paid. Market value = total shares × current price. Profit / loss = market value − total cost. Profit / loss % = profit / loss ÷ total cost.

Same hypothetical position: 200 shares at an average of $45.50, or $9,100. At $48, market value is $9,600: a $500 profit, +5.49%. At $40, market value is $8,000: a $1,100 loss, −12.09%. You are in profit only above $45.50, before fees, and the percentage is measured on everything you put in, not on the last buy.

Average down calculator: how many shares to reach a target average

Mode 2 answers the question behind most averaging down: how many shares at today’s price bring my average to a target? Enter Shares you own, Your average price, New buy price and Target average. The calculator applies: shares to buy = shares × (average − target) ÷ (target − new price).

Hypothetical: you own 100 shares at $50 and the stock is at $40. To bring the average to $45: 100 × (50 − 45) ÷ (45 − 40) = 100 shares, costing $4,000. To reach $42 instead: 100 × 8 ÷ 2 = 400 shares, or $16,000, four times the money for a target only $3 lower. The closer the target sits to the new price, the faster the share count explodes.

A target at or below the new buy price cannot be reached, because shares bought at $40 can never pull the average below $40; the calculator shows a message instead of a number.

Why averaging down can grow a loss

A lower average feels like progress, but it means more money in a stock that is falling. Hypothetical: 100 shares at $50, then 100 more at $40, for 200 shares at an average of $45 ($9,000 in). If the price keeps falling to $30, you lose $3,000. Without the second buy, the loss would be $2,000. The percentage looks better (−33% instead of −40%), but the dollars are worse.

At $20 the gap widens: −$5,000 against −$3,000. Losses also get harder to recover as they deepen: a 50% drop needs a 100% gain just to get back to even, as the drawing shows. A stock can keep falling for years or never come back, which is why risk management starts before the first buy.

Turn your phone sideways to read the drawing. Tap to close.

An equity curve that peaks, falls with the drawdown shaded and recovers, plus three bars: −10% needs +11%, −25% needs +33% and −50% needs +100% to get back to the peak.

Average down only with a plan: a stop and a position size

Before any extra buy, compute the loss at your stop for the whole position: (new average − stop) × total shares. In the example above, with a stop at $36, adding 100 shares at $40 raises the loss at the stop from $1,400 to $1,800. If that number is more than you accept losing on one idea, buy fewer shares or do not add.

Better still, plan the adds before the first buy. Hypothetical $40,000 portfolio, at most 1% ($400) lost on this idea: buy 50 shares at $50, add 50 at $46 only if support holds, and set one stop for the whole position at $44. If both buys fill, the average is $48 and the loss at the stop is 100 × $4 = $400; if only the first fills, it is 50 × $6 = $300. Either way the worst case is known in advance. The position size calculator and the stop loss and take profit guide show how to set both.

  • Cap the total shares or dollars in one stock before the first buy.
  • Never move the stop lower to make room for another add.
  • If the reason you bought has changed, a lower price is not a reason to buy more.

Turn your phone sideways to read the drawing. Tap to close.

A hand-drawn trade plan with an entry, a dotted stop below it and a dashed target above it.

Averaging down vs dollar-cost averaging

Dollar-cost averaging means investing the same dollar amount on a schedule, whatever the price, usually into a broad fund. Averaging down means buying more of one stock because its price fell. Both lower your average cost when prices dip, but only the first is a fixed rule decided in advance.

Hypothetical: $300 a month buys 10 shares at $30, 15 at $20 and 12 at $25, so 37 shares for $900. That is an average cost of about $24.32, below the $25 average of the three prices, as in the drawing. The stock average calculator above works for both: enter each buy as a row. The dollar-cost averaging guide covers the method and its limits.

Turn your phone sideways to read the drawing. Tap to close.

A price line that falls then recovers, with equal monthly buys drawn as dots on it, bigger where price is low, and a note reading same $ buys more shares when price is low; a dashed line, your average cost, sits below the dashed average price line.

Fees, stock splits and what the calculator leaves out

Fees are not included. To count them, add the fee to the cost of each buy: 100 shares at $50 with a $5 commission cost $5,005, so enter a price of $50.05. Dividends reinvested into new shares are purchases too and belong in a row of their own.

A stock split changes the share count and the price, not the value. After a hypothetical 4-for-1 split, 10 shares at an average of $380 become 40 shares at an average of $95, the same $3,800. Enter pre-split buys on the same basis as later ones, or the average will be off by four times. The stock split guide explains why companies split.

Turn your phone sideways to read the drawing. Tap to close.

Two hand-drawn pies: on the left one big pie, 1 share × 400; on the right the same-size pie cut into four slices, 4 shares × 100; an equals sign between them and a note reading same value, more pieces.