Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
When you buy shares of the same stock at different prices over time, your true cost basis is a weighted average, not a simple average of the prices you paid — buying more shares at one price pulls the average toward that price more than a smaller purchase would.
This calculator finds your weighted average cost per share across up to five separate purchase lots, with a full step-by-step solution.
How it works
Enter the price and number of shares for each purchase lot (up to five). The calculator multiplies each lot's price by its share count, sums the total cost and total shares across all lots, then divides to find the weighted average cost per share.
- Enter lot 1 — price per share.
- Enter lot 1 — number of shares.
- Enter lot 2 — price per share (optional).
- Enter lot 2 — number of shares (optional).
- Enter lot 3 — price per share (optional).
- Enter lot 3 — number of shares (optional).
- Enter lot 4 — price per share (optional).
- Enter lot 4 — number of shares (optional).
- Enter lot 5 — price per share (optional).
- Enter lot 5 — number of shares (optional).
- Click Calculate to see your results.
Examples
Two purchases at different prices
Buying 10 shares at $100 and 5 shares at $90 gives a total cost of $1,450 across 15 shares, for an average cost of $96.67 per share.
Who should use it
- Finding your true average cost basis after buying shares of the same stock at different times.
- Understanding your actual breakeven price before deciding whether to sell.
Industry applications
- Personal investing and portfolio tracking
- Tax preparation and capital gains reporting
Advantages
- Correctly weights each lot by its share count rather than simply averaging prices.
- Includes a complete, formula-based step-by-step solution.
Limitations
- Limited to five purchase lots — positions built from more than five separate purchases need to be combined manually first.
Common mistakes to avoid
- Simply averaging the purchase prices without weighting by the number of shares in each lot, which gives an incorrect result whenever lot sizes differ.
- Forgetting to include a lot (like a dividend reinvestment purchase) that also affects the true average cost.
Best practices
- Include every purchase lot for the position, even small ones like dividend reinvestments, for an accurate average cost basis.
Tips
- Dollar-cost averaging (investing a fixed amount on a regular schedule) naturally produces a lower average cost per share than investing the same total amount at a single high price — this calculator can help you see that effect across your own actual purchases.