📊 Stock Average Cost Calculator
Find your average cost per share across multiple purchases, your current profit or loss, and the shares needed to reach a target average.
How the Stock Average Cost Calculator Works
When you buy the same stock several times at different prices, your average cost per share is a weighted average: each purchase price is weighted by the number of shares bought. Buying 100 shares at 50 and 300 shares at 40 gives an average of 42.50, not 45. Commissions, if you pay them, are part of your cost and are included when you enter them.
Add the current price to see the position’s market value and unrealized gain or loss. The target average section shows, purely as arithmetic, how many shares at the current price would bring the average to a chosen level. It is not a recommendation to buy or sell. For tax purposes, cost basis rules (such as FIFO or specific identification) may differ from a simple average.
Formula
Average cost = (Σ shares × price + commissions) ÷ Σ shares Unrealized gain/loss = shares × current price − total cost Shares for target = shares × (average − target) ÷ (target − current price)
How to Use It
- Enter the shares and price for each purchase; add rows as needed.
- Optionally enter the commission per trade.
- Enter the current price to see your gain or loss.
- Optionally enter a target average to see the shares required.
Frequently Asked Questions
How do you calculate average cost per share?
Multiply shares by price for each purchase, add the results (plus any commissions), and divide by the total number of shares.
Does selling shares change my average cost?
Under the average cost method, selling shares reduces the share count but not the average cost of the remaining shares. Tax rules for cost basis can differ by account and country.
What does averaging down mean?
It describes buying more shares at a lower price, which lowers the average cost. The calculator shows the arithmetic only; it does not suggest whether doing so is appropriate.
Is average cost the same as cost basis?
They are related. Cost basis is the tax concept; depending on the rules that apply, it may be calculated by average cost, first-in-first-out, or specific lots.
Related Glossary Terms
Related Calculators
- 💹 Stock Profit Calculator — Profit or loss on a stock trade after commissions, return percentage, and break-even price.
- 💵 Dividend Yield Calculator — Estimate your passive income from dividend-paying investments.
- 📐 ROI Calculator — Return on investment, net gain, and annualized ROI — any currency.
- 📈 Capital Gains Tax Calculator — Compare short-term vs. long-term capital gains tax.
Formula and content last reviewed: September 2026. All calculations run in your browser — nothing you enter is sent to or stored on our servers.
More Finance calculators
See all →✔ Reviewed by GelirLab Editöryal Ekibi · Last reviewed: September 2026 · How we check our calculators