Weighted purchase average

Stock Average Calculator

Combine up to five share purchases to estimate total cost, total shares, and the weighted average price per share.

Purchase history

Enter share quantities and prices

Average cost
shares
shares
shares
shares
shares
Position summary

Weighted average stock cost

Your average cost will appear here

Enter at least one purchase. Additional purchases and the current market price are optional.

What Is a Weighted Average Stock Price?

A weighted average stock price divides the total cost of purchases by the total number of shares bought. This Stock Average Calculator combines up to five purchases and optionally compares that average with a supplied current price to estimate unrealised gain or loss.

One purchase is enough to use this form. It weights prices by share quantities rather than taking a simple average of the prices. The result is an arithmetic purchase average, not automatically the cost-basis method permitted for your tax reporting, and it does not recommend buying more shares to reduce an average.

How to Enter Share Purchases and an Optional Current Price

  1. Enter a positive share quantity and price for Purchase 1. Use the same share class and an adjusted share basis across all purchases.
  2. Add up to four optional purchases, completing both quantity and price for every row you use. Leave unused pairs empty rather than entering zero purchases.
  3. Choose one matching currency for the prices. The selectors synchronise, but no exchange conversion occurs.
  4. Optionally enter a positive Current market price for an unrealised comparison, then calculate. If omitted, gain/loss and status cards state that the comparison was not calculated.

Quantities and prices must be positive and no more than one quadrillion. Visible minima are 0.01, fractional shares are accepted, and optional current price must be positive when supplied. PKR, USD, EUR and CAD are labels only. Incomplete quantity/price pairs and mismatched currencies are rejected.

This form has no sells, fees, dividend cash flows, split adjustments or lot selection. Prepare purchases on a coherent share basis before combining them. Cases below supported numeric precision or with a nonfinite current-price comparison receive a validation response rather than a misleading zero or infinite return.

Weighted Average Share Price and Gain Formulas

Total shares Q = Σ purchase quantity qᵢ

Total purchase cost K = Σ(qᵢ × purchase price pᵢ)

Weighted average price P̄ = K ÷ Q

Unrealised gain/loss = (current price M − original P̄) × Q

Unrealised percentage = (M − original P̄) ÷ original P̄ × 100

The calculator uses unrounded totals and average for the optional comparison, then rounds returned totals, shares, price and percentages independently to two decimals. Reconstructing a gain from the rounded average or share count can therefore differ slightly. Very small quantities or prices can also display as zero at that precision.

The chart shows entered purchase prices, returned average price and returned current price when present. It does not weight the visual bar widths by shares or show a price history. The visible position status follows rounded monetary gain/loss, so a tiny nonzero gain can display as break-even.

IRS Publication 550 discusses basis methods and conditions for average basis. This arithmetic tool does not apply those rules, commissions, elections or adjusted lot records; check the method relevant to your holdings and jurisdiction.

Share Quantities, Purchase Prices and Results

Purchase quantities qᵢ
Positive full or fractional share counts, not the money spent.
Purchase prices pᵢ
Positive price per matching share, in one currency.
Total shares Q and cost K
Original sums, independently rounded in the output.
Average price P̄
Featured quantity-weighted price, not a simple mean of purchase prices.
Optional current price M
Positive comparison price supplied by the user; no market feed.
Unrealised gain and return
Comparison with original unrounded average, without sales, fees, tax or dividend effects.
Position status
Rounded gain/loss sign when a current price is entered, otherwise explicitly not calculated.

Stock Average Calculation Example

Illustrative example. Buy 80 shares at 25 each and another 120 at 35 each, in one currency. The first purchase costs 2,000 and the second costs 4,200. Together they cost 6,200 for 200 shares.

The weighted average is 6,200/200 = 31 per share, rather than the simple price average of 30. The second purchase carries more weight because it contains more shares.

With an optional current price of 38, the unrealised difference is (38−31)×200 = 1,400. Relative to the entered purchase cost, that is 22.58%. Without a current price, the calculator still returns an average but leaves the gain comparison uncalculated.

These hypothetical figures omit fees, dividends, sales, corporate actions and taxes. They illustrate a weighted average, not a tax-basis election.

Calculation check. These illustrative values were checked independently against the formula and calculator response. Retain unrounded intermediate values when checking approximations.

Stock Average Calculation Example
Purchase or resultQuantity or calculationAmount
First buy80 × 252,000
Second buy120 × 354,200
Total cost2,000 + 4,2006,200
Average price6,200 / 20031.00
Unrealised gain(38−31) × 2001,400.00
Unrealised percentage1,400 / 6,200 ×10022.58%

Average Share Price Versus Tax Cost Basis

An arithmetic average helps describe the purchases entered. A permitted tax basis depends on the applicable rules, account, security, records and method. Do not infer a tax election from this result.

IRS Publication 550 describes US investment-basis rules, including conditions for average basis. It does not establish a method for every country or every security.

Average Share Price Versus Tax Cost Basis
Record or measureWhat it needsCalculator scope
Weighted purchase averageShare quantities and matching pricesCalculated
Adjusted tax basisApplicable adjustments and permitted methodNot determined
Remaining position after salesDisposal quantities and lot recordsNo sale input
Unrealised comparisonOptional price for all entered sharesExcludes tax and transaction costs

How to Interpret Your Average Price and Unrealised Return

A purchase with more shares has more influence on the average. Buying below the existing average reduces that arithmetic average, while buying above it raises the average. Neither change alone proves that the new purchase is a good decision or reduces investment risk.

The optional gain compares all entered shares with one current price. It assumes those shares still form the position on a consistent basis and excludes transaction costs and taxes. A missing current price is different from a zero return; the interface leaves the comparison unavailable.

If shares were sold or changed through corporate actions, a simple sum of all original buys may not describe the remaining holding. Keep appropriate records and use the applicable lot and basis method rather than treating this average as a complete brokerage statement or realised tax gain.

Common Stock Average Mistakes

  • Averaging purchase prices without weighting share quantities.
  • Entering purchase value where the row expects number of shares.
  • Combining different share classes or unadjusted pre-split/post-split quantities.
  • Completing only one half of an optional purchase pair.
  • Treating a missing current price as a calculated zero gain.
  • Using the arithmetic average as an automatically permitted tax basis or a reason to buy more.

Frequently Asked Questions

How do I calculate a weighted average stock price?

Multiply each purchase quantity by its price, add those costs and divide by total shares. A larger purchase quantity carries more weight than a smaller one.

Can I calculate an average from one purchase?

Yes. This form requires the first quantity and price, then permits up to four additional complete purchase pairs. With one purchase, the average equals that purchase price before rounding.

Can I enter fractional shares?

Yes. Positive fractional quantities are accepted. Returned quantities and amounts round to two decimals, so very small holdings may display as zero.

Do I have to enter a current stock price?

No. Without it, the calculator returns purchase totals and average price while marking the unrealised comparison as not calculated. It does not fetch a market quote.

Why is my average different from the simple average of prices?

The calculator weights each price by shares bought. A simple mean is correct only when the purchase quantities give equal weight to each price.

Does the calculator include fees, dividends or share sales?

No. It uses the purchase quantities and prices supplied, plus an optional current price. It does not track fees, dividends, disposals or corporate actions.

Is this average automatically my tax cost basis?

No. Tax-basis methods depend on applicable rules and records. IRS Publication 550 discusses US conditions, but this arithmetic result does not choose or validate a tax method.

Does averaging down guarantee a profit?

No. Buying additional shares below the existing average lowers the arithmetic average but increases the shares committed. Future prices and investment risk do not follow from that average.

Sources and References