Average Share Cost Calculator

Calculate weighted average share cost, total shares, cost basis, and unrealized gain.

Results will appear here.
Calculation details
Every figure above is calculated locally in your browser from the assumptions shown. No inputs are sent anywhere. See the methodology section below for the formulas used.
Use this resultShare the current inputs, or ask ChatGPT to explain the calculation in context.
Ask an AI to explain this result
Share this result

Planning estimate only, not financial, tax, or legal advice. Verify assumptions and current rules before making decisions.

This tool runs in your browser. Your calculator inputs and results are never transmitted to us or to ad/affiliate partners. Ads and sponsored links may set third-party cookies to serve and measure them, but they never receive your calculation values. If you explicitly save a scenario, its permitted fields stay in local browser storage until you clear them. See our Privacy Policy.

Use this result

Share the current inputs or ask ChatGPT to explain the calculation in context.

More options
Report a calculation issue
Direct answer

What does this calculator estimate?

100 shares at $50 plus 100 shares at $60 gives an average cost of $55 per share: (100 x 50 + 100 x 60) / 200 = $55. It tracks the blended basis after multiple buys.

  • Average cost per share = total cost / total shares (Wikipedia).
  • The IRS average-cost method is allowed for mutual fund shares.
  • Average cost smooths the basis versus specific-share identification.

Why average cost matters

Buying the same stock at different prices creates a blended basis — the number that determines your profit and taxable gain. The calculator totals the cost of every purchase and divides by the shares held.

Limitations to watch for

The tool handles simple buys; splits, dividends, and fees adjust the true basis. Tax rules allow specific-share identification in some cases. Average cost is per holding, not per account — keep records consistent.

How to use it in practice

Log every buy (shares × price) and the tool gives the blended basis. Compare the current price against it for gain/loss. Add fees to the cost for accuracy. Use it before selling to plan which lots to sell (if your broker allows specific-lot selection).

['Enter shares and price for each purchase.', 'Add more purchases as needed.', 'Read the average cost per share.']

How average cost is calculated

The average cost per share is total dollars invested divided by total shares owned: buying 100 shares at $50 and another 100 at $60 gives a $5,500 cost basis across 200 shares — $27.50 average per share. Every purchase, including reinvested dividends, adds to both the numerator and denominator, so the average is a running number, not a one-time figure.

Why the average matters for decisions

The average cost is the break-even price for the position: selling above it realizes a gain, selling below realizes a loss. It also matters for tax purposes because it is one of the allowed cost-basis methods (average cost is common for mutual funds; most brokers default to specific identification for individual stocks). Knowing the number keeps selling decisions rational instead of emotional.

Average cost vs. market value

Average cost is historical; market value is current. A position bought at $40 average that trades at $55 is up 37.5 percent regardless of what the price did in between. The calculator shows both the average and the implied gain or loss, so you can see the position's real performance rather than its most recent price movement.

Common mistakes in tracking

Forgetting that commissions and fees add to cost basis understates the true average. Mixing share lots without noting purchase dates can create tax problems when you sell. Reinvested dividends are purchases too — they raise the share count and adjust the average. The calculator treats every entry as a purchase, which is the correct bookkeeping habit.

When to sell below average cost

Tax-loss harvesting deliberately sells below average cost to realize a deductible loss, then reinvests in a similar position after the wash-sale window. The average cost gives you the loss amount; the decision depends on your tax situation and conviction in the position. The tool informs the number, not the strategy.

Transparent methodology

How this calculator works

Reviewed 2026-08-25 · BoringToolsKit Editorial Team

Formula

Average cost per share = (shares₁ × price₁ + shares₂ × price₂ + …) ÷ total shares. It tracks the blended basis after multiple buys.

Worked example

100 shares at $50 plus 100 shares at $60: average cost = $55 per share.

Assumptions to verify

  • No splits, dividends, or fees are modeled.
  • All purchases are of the same stock.
  • Simple average-cost basis applies.

Frequently asked questions

How do I calculate average cost per share?

Total cost ÷ total shares: (100×50 + 100×60) ÷ 200 = $55.

Why does average cost matter?

It's your blended basis — what you compare against the selling price for profit and taxes.

Do fees affect it?

Yes — add trading fees to the cost for an accurate basis.

What about splits and dividends?

Splits divide the basis per share; reinvested dividends add shares. The tool models simple buys.

Is this the same as DCA?

Related — DCA is the strategy of buying regularly; average cost is the resulting basis.

Should I sell the highest-cost or lowest-cost lots?

Tax-wise it depends: selling high-cost lots realizes less gain (or a loss) now; low-cost lots defer more gain. Check your broker's lot selection.

Can I use it for crypto?

Yes — the same math applies to coin purchases at different prices.

How do I calculate my average stock cost?

Divide total dollars invested (including fees) by total shares owned — each purchase updates both numbers.

Do reinvested dividends count?

Yes — they buy more shares, so they raise the share count and adjust the average cost.

Is average cost the same as break-even?

For a full position, yes: selling above average cost realizes a gain; below, a loss.

Can I use average cost for taxes?

Yes — it is an allowed cost-basis method, common for mutual funds; check your broker's default for stocks.

Cite this tool

BoringToolsKit. “Average Share Cost Calculator.” boringtoolskit.com/stock-average-cost-calculator/ (reviewed 2026-08-25). Free to reference in articles, syllabi, and answer posts with a link.

Privacy: Inputs and results stay in this browser. Any future sponsored recommendation or advertisement will be clearly labeled and kept separate from the calculation.