Average Cost Calculator
An average cost calculator works out what you paid per share across several purchases of the same stock, ETF or coin. Add each buy with its quantity and price, optionally include total fees and the current price, and see your average cost, total invested and unrealised profit or loss instantly.
- Average cost
- $46.73
- Total shares
- 150
- Total cost
- $7,010.00
- Unrealised P/L
- +$190.00 (2.7%)
Not investment advice. Results are arithmetic on the numbers you enter and ignore fees, slippage and gaps unless stated.
What is the formula?
Total shares = Sum of shares in every purchase Total cost = Sum of (Shares × Price) + Fees Average cost = Total cost ÷ Total shares Unrealised P/L = Total shares × Current price − Total cost
Worked example
- Buy 100 shares at $50 and 50 shares at $40, fees $10.
- Total cost = 5,000 + 2,000 + 10 = $7,010; total shares = 150.
- Average cost = 7,010 ÷ 150 = $46.73. At a current price of $48, P/L = 7,200 − 7,010 = +$190 (+2.7%). Illustrative numbers only.
Averaging down: what changes
Averaging down means buying more after the price falls. Example: 100 shares at $50 ($5,000) plus 100 shares at $40 ($4,000) gives 200 shares for $9,000, so the average cost is $9,000 ÷ 200 = $45 before fees.
The average falls by $5, but the money committed rises from $5,000 to $9,000. If the price drops another 10% to $36, the loss is $1,800 instead of $1,400 with the original lot alone. A lower average does not remove the risk of further losses.
Averaging up: what changes
Averaging up means buying more after the price rises. Example: 100 shares at $50 ($5,000) plus 100 shares at $60 ($6,000) gives 200 shares for $11,000, so the average cost is $11,000 ÷ 200 = $55 before fees.
Your break-even rises from $50 to $55 and exposure doubles. A fall back to $50 turns a $1,000 gain on the first lot into a $1,000 loss on the combined position. Past strength does not make the extra purchase suitable.
Common average cost mistakes
Averaging prices without weighting by quantity: $50 and $40 average to $45 only when both lots have the same number of shares. With 100 shares at $50 and 50 at $40, the correct average is $46.67, not $45.
Counting fees twice or leaving them out, mixing currencies, and entering the same purchase twice all distort the result. This calculator averages purchases only; it does not track tax lots after partial sales. A lower average cost is not evidence that a position has become safer.
How to use this with Market Scanner
- Momentum investing vs value investing — adding to winners versus averaging down
- ETF Momentum Scanner — ETFs often bought in several lots
- Drawdown — glossary definition
- Position sizing — glossary definition
Frequently asked questions
Does averaging down lower my risk?
It lowers the average price but increases the amount invested in the same position, so the total loss can grow if the price keeps falling.
Should I include fees?
Including commissions gives the true break-even price. Enter total fees across all purchases in one field.
Does this handle sales?
No. It averages purchases only. Tax rules for cost basis after partial sales differ by country.
Can I use it for crypto or fractional shares?
Yes. Quantities can include decimals, such as 0.25 coins or fractional shares.
Embed this calculator
Add this free calculator to your site. The embed keeps a visible “Powered by Market Scanner” link.
<iframe src="https://marketscanner.co/embed/tools/average-cost-calculator" title="Average Cost Calculator by Market Scanner" width="100%" height="640" style="border:0;max-width:720px" loading="lazy"></iframe> <p><a href="https://marketscanner.co/tools/average-cost-calculator">Average Cost Calculator</a> powered by <a href="https://marketscanner.co/">Market Scanner</a></p>