AbraCalc

Stock Average Cost Calculator

Calculate your blended average cost per share after buying a stock in two separate lots at different prices, plus your total shares and total cost.

Embed this tool on your site

How to use this tool

  1. Enter the shares and price of your first purchase.
  2. Enter the shares and price of your second purchase (use 0 shares if none).
  3. Read your blended average cost per share.
  4. Check the total shares and total invested for the combined position.
  5. Compare the average cost with the current price to gauge your gain or loss.

Bought a stock twice at different prices? Your average cost is a share-weighted blend, not a midpoint. Enter both lots to get your average cost per share, total shares, and total invested.

Formula

Total shares = Shares in lot 1 + Shares in lot 2.

Total invested = (Shares 1 × Price 1) + (Shares 2 × Price 2).

Average cost per share = Total invested ÷ Total shares. This is a share-weighted average, so the lot with more shares pulls the average toward its price.

How it works

When you buy the same stock more than once at different prices, your average cost per share is a share-weighted blend of those prices, not a simple average. Buying more shares at a lower price (often called 'averaging down') pulls your average cost toward that lower price in proportion to how many shares you bought.

This calculator multiplies each lot's shares by its price to get the dollars invested, sums those across both lots, and divides by the total number of shares. The result is the break-even price per share: the stock must trade above this figure for your combined position to show a gain.

The model covers two lots and ignores trading commissions, dividends reinvested, wash-sale rules, and tax-lot accounting methods (FIFO, specific identification) that may matter at sale time. For more than two purchases, add the lots in pairs or use brokerage cost-basis records. Reviewed by the AbraCalc Investing Desk. This tool provides general information, not investment advice; verify figures and consult a licensed professional before investing.

Worked example

100 shares at $50, then 50 shares at $40

  1. Total shares = 100 + 50 = 150.
  2. Total invested = (100 × $50) + (50 × $40) = $5,000 + $2,000 = $7,000.00.
  3. Average cost per share = $7,000 ÷ 150 = $46.67.

Average cost per share: $46.67 — 150 total shares for $7,000.00 invested.

Average cost when adding 50 shares to an initial 100 @ $50

Second-lot priceTotal sharesAverage cost
$30150$43.33
$40150$46.67
$50150$50.00
$60150$53.33
$70150$56.67

Key terms

Average cost
The share-weighted mean price you paid across all purchases of a stock.
Cost basis
The total amount invested in a position, used to compute gains, losses, and taxes.
Averaging down
Buying additional shares at a lower price to reduce the average cost of a position.
Tax lot
A group of shares bought in a single transaction at one price, tracked for tax purposes.

Frequently asked questions

How do I calculate average cost per share?
Multiply each purchase's shares by its price, add those amounts to get total invested, then divide by the total number of shares. The result is your average (break-even) cost.
Is the average just the midpoint of the two prices?
Only if you bought the same number of shares in each lot. Otherwise the average is weighted toward the lot with more shares.
What is averaging down?
Averaging down means buying more shares after the price falls, which lowers your average cost. It increases your position size and risk, so it is not always wise.
Does this include commissions?
No. For exact cost basis, add any commissions or fees to the total invested before dividing by shares.

References & sources