Build your retirement plan for free.Explore Plan Builder →

Weighted Average Share Calculator

Enter your share transactions — quantity and price per lot — to calculate your weighted average cost per share, total cost basis, price spread, and more.
Luis GonzalezCreated by Luis GonzalezLast updated:

How to Use This Calculator

  1. 1

    Add each purchase transaction

    For every lot, enter Number of Shares Purchased and Purchase Price Per Share. Add one entry per transaction; the calculator weights each price by its share count.

  2. 2

    Review your combined cost basis

    Check the weighted average price, total shares, total cost basis, and price range. Only entries with positive shares and prices count as valid transactions.

Example Calculation

An investor buys 10 shares at $100, 5 shares at $120, and 15 shares at $80.

Transaction 1 — Number of Shares Purchased

10

Transaction 1 — Purchase Price Per Share

100

Transaction 2 — Number of Shares Purchased

5

Transaction 2 — Purchase Price Per Share

120

Transaction 3 — Number of Shares Purchased

15

Transaction 3 — Purchase Price Per Share

80

Results

Weighted Avg Price

$93.3333

Total Shares

30

Total Cost Basis

$2,800.00

Price Range

$40.00

Lowest Buy Price

$80.0000

Avg Shares / Transaction

10.0

Insights card shows how your average purchase price compares with your transaction prices.

Tips

Doubling the $80 purchase lowers the average to $88.8889

Change the third transaction from 15 to 30 shares at $80. The lower-priced lot then makes up a larger share of your holdings.

Adding shares at $120 raises the average to $97.1429

Change the second transaction from 5 to 10 shares at $120. Compare the new weighted average with the simple average of the three purchase prices.

A wide purchase-price range can hide different lot histories

Change the $120 transaction to $100 to see how a narrower spread affects Price Range without changing the other two lots.

What this calculator estimates

A weighted average share price is the average amount paid per share, with each purchase weighted by the number of shares in that transaction. This calculator also totals shares and purchase cost, and reports the difference between the highest and lowest valid purchase prices. It does not use the current market price, fees, dividends, or taxes.

How the weighted average is calculated

Weighted average price = Total purchase cost / Total shares
Total purchase cost = Σ (Shares in each transaction × Price per share)

For the example, the three transaction costs are 10 × $100 = $1,000, 5 × $120 = $600, and 15 × $80 = $1,200. Total cost is $1,000 + $600 + $1,200 = $2,800, and total shares are 10 + 5 + 15 = 30. The weighted average is $2,800 / 30 = $93.3333 per share.

The price range is the highest valid purchase price minus the lowest: $120 − $80 = $40. The range describes variation among your purchase prices; it is not a measure of investment risk or return.

How transaction size changes the average

A larger lot has more influence on the average because the formula counts every share. The table holds the first two transactions fixed and changes the third lot:

Third transaction Total shares Total cost Weighted average
15 shares at $80 30 $2,800 $93.3333
30 shares at $80 45 $4,000 $88.8889
30 shares at $120 45 $5,200 $115.5556

Use the average cost calculator for a general average, or the weighted average cost method calculator for cost accounting. To measure return across deposits made at different times, use the annualized weighted average return calculator.

When to use a different calculator

The average purchase price is a bookkeeping reference, not a recommendation to buy or sell. Before making a trade, check the investment's current price, fees, tax treatment, and how much of your portfolio it represents. The SEC's guide to researching investments outlines information investors can review.

Frequently Asked Questions

What is a weighted average share price?

A weighted average share price is the total amount spent on shares divided by the total number of shares purchased. Larger purchases have more influence on the average than smaller purchases.

How do I calculate my average cost per share?

1. Multiply each transaction's share count by its purchase price. 2. Add those costs and add all shares. 3. Divide total cost by total shares. The result is the weighted average price.

Does this calculate my investment return?

No, it calculates purchase cost, not investment return. To calculate return, you also need the current value or sale proceeds, and may need to account for fees, dividends, and taxes. The SEC's investor education resources explain how investment gains and losses work.

Does the weighted average include commissions or dividends?

No, the formula uses only shares purchased and purchase price per share. Add transaction fees to your cost separately if you need a more complete tax or accounting basis, and track dividends separately.

Is weighted average cost always the right tax method for shares?

No, the method used to track or report a securities tax basis depends on the asset and applicable tax rules. This calculator is an arithmetic estimate, not a tax-lot selection tool; review the IRS guidance on investment property basis before reporting a sale.