📊 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

  1. Enter the shares and price for each purchase; add rows as needed.
  2. Optionally enter the commission per trade.
  3. Enter the current price to see your gain or loss.
  4. 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

Formula and content last reviewed: September 2026. All calculations run in your browser — nothing you enter is sent to or stored on our servers.

⚠️ This calculator is for general informational and educational purposes only. It does not constitute financial, tax, legal, or other professional advice, and results are estimates that may not reflect your exact situation. GelirLab.com and its owners accept no liability or responsibility for any decision made or action taken based on this tool. Always consult a qualified professional (CPA, financial advisor, or attorney) before making financial decisions.
Spotted a wrong result or outdated figure? Let us know — it helps keep every calculator accurate. 🚩 Report a problem

More Finance calculators

See all →

✔ Reviewed by GelirLab Editöryal Ekibi · Last reviewed: September 2026 · How we check our calculators

🔗 Embed this calculator on your website

Free for blogs, news sites and schools. Paste this code into your page; the calculator stays up to date automatically.