Stock Average Calculator
Buying 10 shares at $50 and 15 shares at $42 gives a weighted average cost of $45.20 per share. This stock average calculator combines two or more completed purchase lots into total shares, total purchase cost, and one weighted average price. Each lot is weighted by its share count, so a larger purchase affects the result more than a smaller one. The figure is a simplified purchase-cost estimate before commissions, taxes, corporate actions, sales, and broker adjustments unless those effects are already included in the entered prices.
Quick answer
Each purchase affects the average based on how many shares you bought at that price.
Purchase 1
Purchase 2
This estimate combines purchase lots only. It does not adjust for fees, taxes, stock splits, wash sales, or partial sales.
What this tells you
- •Each purchase affects the average based on how many shares you bought at that price.
- •A larger purchase pulls the average more than a smaller purchase does.
- •The result is your weighted average cost per share before fees, taxes, and broker adjustments unless you already built those into your lot prices.
- •The calculator requires at least two positive buy lots and accepts fractional shares.
- •Total purchase cost is the sum of shares times price for every entered lot.
- •Average cost is rounded to 4 decimal places, total shares to 4 places, and total purchase cost to cents.
- •A lower-price purchase can reduce the average, while a higher-price purchase can raise it.
- •The result does not show profit or loss because no current market price is entered.
How to Use
- 1Enter the positive share count and execution price per share for the first completed purchase.
- 2Enter the second purchase, then add any additional buy lots for the same security and position.
- 3Use the actual filled price rather than an unfilled limit order or a planned purchase.
- 4Calculate to see average cost per share, total shares, total purchase cost, and lot count.
- 5Compare the result with your broker record and identify fees, wash-sale adjustments, transfers, splits, or sales that the calculation omits.
- 6Do not use the new average alone as a reason to buy more. Position size, risk, taxes, and suitability require separate judgment.
How It Works
Formula
Total cost basis = Σ(shares × price per share)
Total shares = Σ(shares)
Average cost per share = total cost basis ÷ total sharesEach lot contributes a purchase cost equal to its shares multiplied by its price per share. Add those lot costs, add all shares, then divide total purchase cost by total shares. For 10 shares at $50 and 15 at $42, the lot costs are $500 and $630. Total cost is $1,130 and total shares are 25, so $1,130 / 25 = $45.20. A simple midpoint of $50 and $42 would be $46, but that is wrong because the lower-priced lot contains more shares. The formula uses entered purchase prices only and does not apply current market value.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
Average down after a lower-price buy
The total cost basis is $500 + $630 = $1,130. Divide $1,130 by 25 shares to get a weighted average cost of $45.20 per share.
Three-lot dollar-cost averaging example
These three lots add up to $2,625 of cost basis across 25 shares. Dividing $2,625 by 25 gives you a $105 average cost per share.
Larger lower-price purchase
The lots cost $2,000 and $1,750. Their combined $3,750 cost divided by 150 shares gives $25. The result sits closer to $20 because twice as many shares were bought at that price.
Fractional-share purchases
The first lot costs $250.625 and the second costs $154.70, for an unrounded total of $405.325. Dividing by 4.25 gives $95.370588, displayed as $95.3706. Total cost is displayed as $405.33.
Average rises after a higher-price buy
The first lot costs $500 and the second costs $400. Dividing the $900 combined cost by 30 shares gives $30, showing that a later purchase can raise rather than lower the average.
How the weighted stock average works
The average moves toward the lots with more shares.
| Purchase | Shares | Price per share | Lot cost |
|---|---|---|---|
| Lot 1 | 10 | $50 | $500 |
| Lot 2 | 15 | $42 | $630 |
| Combined | 25 | $45.20 average | $1,130 |
The combined row is not a simple midpoint between $50 and $42. It is weighted by the share count in each purchase.
What this average does and does not tell you
Weighted average cost summarizes how much was paid per share across the entered buys. It can help reconcile a position or test the arithmetic of another purchase, but it does not measure whether the investment is attractive. A lower average does not remove the possibility of further losses.
Profit or loss needs a separate market price and, for an actual account, relevant costs and tax adjustments. This calculator stops at the purchase average because unrealized return, realized gain, and reportable tax basis can follow different rules.
Sales make the remaining-position calculation depend on the accounting method used. Broker records should remain the source for official adjusted basis after sales, transfers, wash sales, splits, mergers, and reinvested distributions.
Common mistakes
- Using a simple midpoint between prices instead of weighting each lot by share count
- Leaving out fees or commissions when you want a true adjusted cost basis
- Mixing buys, sells, stock splits, or wash sale adjustments into one average without checking broker records
- Averaging listed prices without weighting by shares, which is wrong whenever lot sizes differ
- Entering a planned order as if it executed, even though the final share count or fill price may change
- Treating a lower average as proof that buying more is suitable, without reviewing risk and concentration
- Rounding every lot cost before adding, which can create small differences for fractional shares
Limitations
This calculator combines positive purchase lots for one security and assumes each entered price is the cost per share for that lot. It does not process sales, short positions, options, multiple currencies, commissions, fees, taxes, reinvested dividends, return of capital, stock splits, mergers, spin-offs, transfers, wash-sale adjustments, or partial-lot accounting. It rounds average price and shares to 4 decimal places and total purchase cost to 2. Broker and tax records may use adjusted basis rules that differ from this arithmetic.
Embed this calculator on your site
Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.
<script src="https://calctide.com/embed.js" data-tool="stock-average-calculator" async></script>Preview the embed at /embed/stock-average-calculator/.