About this calculator
A stock average cost calculator computes cost basis per share across multiple purchases (weighted average).
Who should use it: Investors tracking positions built over time.
When to use it: Use it after each buy to refresh average cost before measuring gains.
Weighted average cost per share
Each purchase lot contributes its own cost basis (price × shares). Average cost is the total of all cost bases divided by total shares — a weighted average, not a simple average of the entered prices.
Step-by-step
Add every purchase lot
Enter the price you paid and the number of shares for each separate buy.
Let the calculator total your investment
Each lot's cost basis (price × shares) is summed into your total investment.
Divide by total shares
Total investment ÷ total shares gives your weighted average cost per share.
Add a current price (optional)
Enter today's market price to see unrealized gain or loss versus your average cost.
Worked example: Two purchases of the same stock
You buy 10 shares at $100, then later buy 15 more shares at $80, with the stock now at $95.
- Lot 1 cost basis: 10 × $100 = $1,000
- Lot 2 cost basis: 15 × $80 = $1,200
- Total investment: $1,000 + $1,200 = $2,200 across 25 shares
- Average cost: $2,200 ÷ 25 = $88.00 per share
- Unrealized gain: ($95 − $88) × 25 = $175
Your average cost is $88.00 per share, with a $175 unrealized gain at a $95 current price.
How to interpret the result
Unrealized gain compares market price to average cost × shares — lots may still matter for taxes.
Key definitions
- Average cost (cost basis)
- The weighted average price paid per share across all purchase lots.
- Break-even price
- The price at which selling all shares returns exactly your total investment — equal to average cost.
- Unrealized gain/loss
- The paper profit or loss on shares you still hold, based on the current market price.
- Averaging down
- Buying additional shares after a price drop to lower your average cost per share.
Common use cases
- Tracking cost basis across multiple buys of the same stock
- Deciding whether averaging down makes sense at a new price
- Estimating unrealized profit or loss before selling
- Preparing cost-basis figures for tax record-keeping
Tips
- Add every lot, including reinvested dividend purchases, for an accurate average.
- A lower average cost means a lower break-even price, but does not guarantee the stock will recover.
- Keep your own purchase records — brokers may compute cost basis differently (e.g. FIFO or specific lot).
Common mistakes
Averaging the purchase prices instead of weighting by shares
Fix: Always weight by shares: a large lot at a low price affects the average more than a small lot at a high price.
Forgetting to include a lot, which skews the average
Fix: List every purchase of the position, even small or older ones, to get an accurate cost basis.
Treating average cost as guaranteed break-even after fees
Fix: Average cost ignores commissions and taxes — your real break-even price is usually slightly higher.
Limitations
- Tax lot methods (FIFO, specific ID) can differ from average cost.
- Not tax advice.