What Is a Stock Average Calculator?
A stock average calculator works out the weighted average price you paid for a stock when you bought it in more than one transaction, at more than one price. Instead of adding up every purchase by hand, the tool returns your average cost per share, also known as your cost basis, instantly.
That number matters because it becomes your personal break-even point. If the stock is trading above your average price, you're in profit. If it's below, you're at a loss, at least on paper.
Add each purchase
Enter the number of shares and the price per share for every separate time you bought the stock.
Set your currency
Pick your currency from the selector, and every figure updates instantly to match.
Compare a price
Optionally enter a current or target price to see your unrealized profit or loss.
Read your results
Average price, total shares, total invested, and break-even price update as you type.
The Stock Average Formula
The average price, also called the weighted average cost per share, is calculated by multiplying each purchase's price by its share quantity, adding those values together, then dividing by the total number of shares.
Average Price = [ (P1 × Q1) + (P2 × Q2) + ... + (Pn × Qn) ] ÷ (Q1 + Q2 + ... + Qn)
P = price paid per share in each purchase
Q = number of shares bought in each purchaseThis is a weighted average, not a simple average: a purchase of 500 shares affects your average far more than a purchase of 10 shares, even at similar prices. Averaging the prices alone, without weighting by share count, is the most common hand-calculation mistake.
Break-Even Price = Total Invested ÷ Total Shares
Unrealized P/L = (Current Price − Average Price) × Total Shares
P/L Percentage = [(Current Price − Average Price) ÷ Average Price] × 100Weighted Average vs. Simple Average
These two calculations sound similar but usually give different answers, and only one of them is correct for figuring out what you actually paid per share.
| Method | Formula | Best Used For |
|---|---|---|
| Simple Average | (P1 + P2) ÷ 2 | Only when share counts are identical at every price |
| Weighted Average | (P1×Q1 + P2×Q2) ÷ (Q1+Q2) | Any real portfolio, where share counts differ across purchases |
Why the Difference Matters: 10 Shares at $100, 100 Shares at $50
It's tempting to average the two prices directly. That's the wrong number, and the gap between the two methods gets bigger the more the share counts differ.
The simple average is $20.45 too high, because it treats the 10-share purchase and the 100-share purchase as equally important when they aren't. The weighted average correctly reflects that 100 of your 110 shares cost $50, not $100.
Real Numbers, Step by Step
Two Purchases: Averaging Down
| Purchase | Shares | Price / Share | Amount Invested |
|---|---|---|---|
| 1st Buy | 100 | $50 | $5,000 |
| 2nd Buy | 100 | $40 | $4,000 |
| Total | 200 | N/A | $9,000 |
Average price = $9,000 ÷ 200 = $45.00 per share
The average cost dropped from $50 to $45, so the stock now only needs to recover to $45, not $50, to break even.
Two Purchases: Averaging Up
| Purchase | Shares | Price / Share | Amount Invested |
|---|---|---|---|
| 1st Buy | 100 | $40 | $4,000 |
| 2nd Buy | 100 | $60 | $6,000 |
| Total | 200 | N/A | $10,000 |
Average price = $10,000 ÷ 200 = $50.00 per share
The average cost rose from $40 to $50 because the second purchase came in above the first. That's the tradeoff of averaging up: you're adding to a position that's already working, at a less favorable price than your first entry.
Three Purchases at Different Sizes
| Purchase | Shares | Price / Share | Amount Invested |
|---|---|---|---|
| 1st Buy | 50 | $100 | $5,000 |
| 2nd Buy | 30 | $80 | $2,400 |
| 3rd Buy | 20 | $60 | $1,200 |
| Total | 100 | N/A | $8,600 |
Average price = $8,600 ÷ 100 = $86.00 per share
Not the same as the simple average of $100, $80, and $60 (which is $80): because more shares were bought at the higher price, the weighted average pulls closer to $100.
Example 4: Adjusting for a Stock Split
Continuing from Example 2 above: you're holding 100 shares at an $86.00 average price ($8,600 total). XYZ Inc. announces a 2-for-1 stock split.
New average price = $86.00 ÷ 2 = $43.00 per share
Your total position value doesn't change from the split alone: you now own twice the shares at half the average price. Brokerages update this automatically, but if you're tracking purchases manually, remember to adjust both your share count and your average price, not just one.
Averaging Down vs. Averaging Up
Averaging Down
Buying more shares after the price has fallen from your original purchase, to lower your average cost and reduce the recovery needed to break even.
- Fundamentals haven't changed: the drop is broad-market, not company-specific
- You had a thesis before the drop and still believe it
- You're following a predefined plan, not reacting emotionally
- Buying more simply because it's cheaper, with no new supporting information
- The drop reflecting real business deterioration, meaning you'd just be losing money faster
- Using it to avoid admitting the first purchase was a mistake
Averaging Up
Buying more shares after the price has risen, because the stock is confirming your original thesis. Your average cost increases, but so does your conviction in a proven position.
- Adds to strength rather than weakness
- Confirms the thesis with real price action, not just belief
- Common among trend-following and momentum approaches
Averaging down vs. dollar-cost averaging: don't confuse them
Dollar-cost averaging is investing a fixed amount on a fixed schedule, regardless of price. It's a disciplined, pre-committed strategy. Averaging down is a reactive, discretionary decision made only because the price dropped. Use the calculator for both, but know they answer different questions. If you're investing a fixed amount on a schedule, our Dollar-Cost Averaging Calculator solves for shares bought automatically instead of asking you to work them out first.
What Is Cost Basis and Why Does It Matter?
Your cost basis is the average price you paid per share, adjusted for all purchases, and sometimes for reinvested dividends, stock splits, or fees. It matters for two reasons: it's your break-even benchmark, and in most jurisdictions it's the figure used to calculate capital gains or losses when you sell.
This calculator computes your average cost basis for planning purposes. Tax treatment of cost basis varies by jurisdiction and broker, so confirm the applicable method with a tax professional or your brokerage before filing. In the United States, the IRS's Topic 703, Basis of Assets covers how basis is determined for stocks and other property.
Common Mistakes When Calculating Average Price
Using a simple average instead of a weighted average
Adding up prices and dividing by the number of purchases ignores share quantity and produces the wrong number.
Forgetting brokerage fees and commissions
Fees add to your true cost basis; leaving them out slightly understates your real break-even price.
Not accounting for stock splits
A 2-for-1 split halves your per-share cost basis and doubles your share count, so recalculate after any split.
See a worked exampleAveraging down without re-checking the thesis
Buying more of a falling stock only helps if the reasons you bought it originally still hold true.
Confusing average price with current market value
Your average price is what you paid; it has no bearing on what the stock is worth today, since the market sets that independently.
Key Terms Explained
- Average Price / Average Cost Per Share
- The weighted average of all prices paid across every purchase of a stock.
- Cost Basis
- The total amount invested in an asset, used for break-even and tax purposes; often expressed per share.
- Break-Even Price
- The price at which selling would result in neither profit nor loss: it's equal to your average price.
- Averaging Down
- Buying additional shares after the price has dropped, to lower your average cost.
- Averaging Up
- Buying additional shares after the price has risen, increasing your average cost but often your conviction.
- Unrealized Profit/Loss
- The paper gain or loss on a position that hasn't yet been sold.
- Weighted Average
- An average that accounts for the relative size of each data point, rather than treating all points equally.