How the Stock Average Calculator works
When you buy shares of the same stock at different prices over time, your "average price" (also called cost basis per share) is not a simple average of the two prices — it's a weighted average, weighted by how many shares you bought at each price. This calculator applies that formula to your existing position and a new purchase to show your new average cost, total shares, total money invested, and how that position stands against the current market price.
The formula
For an existing position of Q1 shares bought at an average price P1, plus a new purchase of Q2 shares at price P2, the new average price is:
New Average Price = (Q1 × P1 + Q2 × P2) / (Q1 + Q2)
The numerator is your total dollars invested (existing cost basis plus new cost basis); the denominator is your total share count. Dividing the two gives the average dollar amount you paid per share across every purchase.
Worked example
Say you own 100 shares at an average price of $50 (a $5,000 cost basis), and the stock drops to $30. You buy 50 more shares for $1,500. Your new average price is ($5,000 + $1,500) / 150 shares = $43.33 per share. You now hold 150 shares for $6,500 total, and the stock only needs to recover to $43.33 — not back to $50 — for you to break even.
Averaging down vs. averaging up
- Averaging down: buying more shares below your current average price pulls the average down and lowers your breakeven point. It does not reduce your dollar risk — it increases both your total investment and your total shares exposed to further price moves.
- Averaging up: buying more shares above your current average raises your average price. Some investors do this deliberately when a position is working and they want to add to a winner, accepting a higher breakeven in exchange for a bigger stake.
Reading the unrealized gain or loss
Unrealized gain or loss = (current market price − new average price) × total shares. It's called "unrealized" because it only becomes a real, locked-in gain or loss when you actually sell the shares — until then it moves with the market price you enter. This calculator does not account for commissions, taxes, or dividends received; add commissions to your purchase prices first if you want a true net cost basis.