Stock Pyramiding Calculator

Average cost and P/L at each step when you add to a position as the price rises

Enter 0 if you hold none yet.

Example value, check it yourself

You can add up to five steps. A step with 0 shares does not change the average.

Final average cost

$156.00

Final average cost (incl. fees)
$156.00
Final shares
40
Total invested
$6,240.00
Current price vs. average cost
+7.69%
New money share
51.92%
Final unrealized P/L
$480.00
Final return
+7.69%

Result by step

StepTotal sharesAverage costAvg. cost incl. feesUnrealized P/LReturn
Current holding20$150.00$150.00$360.00+12%
Step 130$152.00$152.00$480.00+10.53%
Step 240$156.00$156.00$480.00+7.69%

Average cost by step

  • Current holding$150.00
  • Step 1$152.00
  • Step 2$156.00
Show the calculation
  1. Current holding Average cost $3,000.00 ÷ 20 = $150.00
  2. Step 1 Average cost $4,560.00 ÷ 30 = $152.00
  3. Step 2 Average cost $6,240.00 ÷ 40 = $156.00
  4. New money share $3,240.00 ÷ $6,240.00 = 51.92%
  5. Current price vs. average cost $168.00 ÷ $156.00 − 1 = +7.69%

For reference only, not investment advice. Actual fills, commissions and taxes depend on your broker and the market.

Assumed example numbers, not tied to any specific stock.

As of 2026-11-18 · Source SEC Section 31 Fee Rate Advisory (FY2026)

The Stock Pyramiding Calculator shows how the average cost and the unrealized gain or loss change at each step when you add to a stock in stages after its price has risen. In an assumed example you hold 20 shares at $150.00 and add 10 shares at $156.00 in step 1 and 10 shares at $168.00 in step 2. The final average cost is $156.00, and the current price of $168.00 is 7.69% above it.

Pyramiding in 3 steps

  1. Enter the buysyour holding plus the price and shares of each of up to 5 steps
  2. Average costtotal paid so far ÷ total shares so far
  3. Unrealized gain or lossshares × current price − cost

Average cost = (held shares × held average + sum of step shares × step price) ÷ total shares

Pyramiding versus averaging down

Pyramiding adds to a position after the price has risen, so the average cost goes up when the add-on price is above your average. Averaging down adds after the price has fallen, so the average goes down. The formula is the same and only the direction differs. Use this calculator to compare a plan of up to five buys step by step. For one add-on buy, or the shares needed to reach a target average, the Stock Average Calculator is simpler.

How the figures are calculated

Example: 20 shares at $150.00, current price $168.00, two add-on steps (assumed numbers)

The first table spells out the default input of the calculator above, step by step. The commission rate of 0% applies to the new shares only, and the gain or loss uses the current price of $168.00. The numbers come from the same function as the calculator.

StepTotal sharesAverage costAvg. cost incl. feesUnrealized P/LReturn
Current holding 20 $150.00 $150.00 $360.00 +12%
Step 1 30 $152.00 $152.00 $480.00 +10.53%
Step 2 40 $156.00 $156.00 $480.00 +7.69%

The second table compares what happens to the final average cost and the unrealized result when the add-on buys or the current price change. In this example, more add-on buys raise the average and shrink the gap, and a current price below the average turns the result into a loss.

CaseCurrent price ($)Final average costCurrent price vs. average costFinal unrealized P/L
No add-on buys (for comparison) $168.00 $150.00 +12% $360.00
Step 1 only (example) $168.00 $152.00 +10.53% $480.00
Default example (2 steps) $168.00 $156.00 +7.69% $480.00
Current price falls (example) $151.20 $156.00 -3.08% -$192.00
Current price rises (example) $184.80 $156.00 +18.46% $1,152.00

In the default example the new money is 51.92% of the $6,240.00 total, and the average cost has moved from $150.00 to $156.00. With the same buys and a current price of $151.20, the unrealized result becomes -$192.00.

What to check

What to calculate next

For one add-on buy and the average after it, use the Stock Average Calculator. For the selling price that reaches your target return after costs, use the Target Sell Price Calculator, and for the exit price that matches a loss you can accept, use the Stop-Loss Price Calculator.

This page is a reference tool that calculates the average cost and the unrealized gain or loss at each step, not investment advice. Whether and when to add to a position is your own decision, and the results do not tell you where the price or your returns will go.

Related calculators

Frequently asked questions

How is a pyramiding calculator different from an averaging-down calculator?

Pyramiding means adding to a position after the price has risen, and averaging down means adding after it has fallen. The formula for the average cost is the same for both. This calculator plans up to five add-on buys one after another and shows the average cost and the unrealized gain or loss after each step. For a single add-on buy or the shares needed to reach a target average, the Stock Average Calculator is simpler.

How is the average cost after each step worked out?

It is the total paid for your holding and every step so far, divided by the total shares at that point. In the default example you hold 20 shares at $150.00. Buying 10 more at $156.00 in step 1 moves the average to $152.00, and buying 10 more at $168.00 in step 2 moves it to $156.00.

What does the current price versus the average cost tell me?

It is (current price ÷ final average cost − 1) × 100. A positive number means the current price is above your average cost. A negative number means it is below, so the position shows an unrealized loss. The default example shows +7.69%, and the example where the price falls to $151.20 shows -3.08%.

What is the new money share used for?

It is the amount of the add-on buys divided by your total invested at the end. In the default example, 51.92% of the $6,240.00 total is new money. The larger the share, the more later price moves affect the overall gain or loss, so read it as a measure of how big the add-on buys are within the whole position.

Why is the average cost with commission shown separately?

It adds the commission on new buys (default 0%) to your cost before dividing. Your existing average is used as you entered it, because you read it off your broker already. Brokers differ on whether the cost basis they show includes commissions, so the two figures can differ slightly. Selling commissions and taxes are not part of this calculator.

Does adding to a position increase my profit?

A single number cannot tell you that. Buying at a higher price raises the average cost and shrinks the gap to the current price, and if the price falls below the average, the loss grows with the money you put in. In the default example, a current price of $151.20 gives an unrealized result of -$192.00. The calculator shows figures at the prices you enter and says nothing about where the price goes next.