CCalculate.Studio

⚖️ Stock Average Calculator (Average Cost Basis)

When shares of the same stock are bought in multiple lots at different prices, the average cost per share is the total dollars spent divided by the total shares acquired — a weighted average, not a simple average of the purchase prices. This calculator takes a list of share quantities and their matching purchase prices and computes the resulting weighted-average cost basis.

آخر مراجعة: 2026-07-07

Understanding your average cost result

ScenarioEffect on average cost
Later purchases at a lower price than earlier onesAverage cost per share decreases, pulling the blended cost down toward the lower price
Later purchases at a higher price than earlier onesAverage cost per share increases, pulling the blended cost up toward the higher price
Purchase lots of very different sizesThe larger lot (by dollar amount) has proportionally more influence on the average than the smaller lot
  • This calculator produces a simple weighted-average cost basis; some brokerages and tax jurisdictions use other cost-basis accounting methods (such as first-in-first-out or specific-lot identification), which can produce different results for tax purposes.
  • Average cost basis does not account for dividends, stock splits, corporate actions, or transaction fees on the purchases — enter net share counts and effective prices if those adjustments are relevant.
  • This is a mathematical average, not investment advice on whether adding to a position (sometimes called averaging down when done after a price decline) is an appropriate strategy in a given situation.

What is average cost basis for stocks?

Average cost basis is the total amount spent acquiring shares of a stock across all purchase lots, divided by the total number of shares acquired, producing a single average price per share that reflects the true blended cost of the position. It is a weighted average because larger purchases (in dollar terms or share count) influence the result more than smaller ones, unlike a simple average of the purchase prices alone.

This distinction matters most when purchase lot sizes differ significantly: buying a small number of shares at a high price and a much larger number at a low price produces an average cost per share much closer to the low price, because the weighting reflects the actual dollars and shares involved rather than treating each purchase price equally.

Average cost basis is a common method used for tracking the cost of a stock position built through multiple purchases, such as via periodic buying or dollar-cost averaging, and it is also relevant for determining capital gains or losses when shares are eventually sold.

How to use this stock average calculator

  1. Enter the number of shares purchased in each lot, separated by commas, in the order the purchases occurred.
  2. Enter the purchase price per share for each corresponding lot, separated by commas, matching the same order as the shares.
  3. Ensure both lists have the same number of entries — each share quantity must correspond to exactly one purchase price.
  4. Read the resulting weighted-average cost per share, the total shares held across all lots, and the total dollar cost basis.
  5. Example: buying 100 shares at $50 and then 50 shares at $40 produces an average cost of $46.67 per share, on a total of 150 shares and a total cost basis of $7,000.

The formula behind average cost basis

Total cost basis = Σ (Sharesᵢ × Priceᵢ), across all lots i
Total shares held = Σ Sharesᵢ, across all lots i
Average cost per share = Total cost basis ÷ Total shares held

The calculator multiplies each lot's share quantity by its purchase price to find that lot's dollar cost, sums those dollar costs across all lots for the total cost basis, sums the share quantities for total shares held, and divides total cost by total shares to produce the average cost per share.

Common mistakes

  • Calculating a simple average of the purchase prices instead of a weighted average, which produces an incorrect result whenever lot sizes differ.
  • Entering share quantities and prices in mismatched order, which pairs the wrong price with the wrong share quantity.
  • Forgetting to include purchase fees or commissions in the effective price per share if a precise after-cost average is needed.
  • Assuming average cost basis is the same method used for tax-lot reporting by a specific brokerage, when some brokerages default to first-in-first-out or allow specific-lot identification instead.
  • Treating a lower average cost after adding shares at a lower price as automatically a sound decision, without separately evaluating the investment thesis for the additional purchase.

الأسئلة الشائعة

How do you calculate average stock price across multiple purchases?

Average stock price is calculated as a weighted average: multiply the number of shares in each purchase lot by its price to find each lot's dollar cost, sum those costs for the total amount spent, then divide by the total number of shares purchased across all lots. This differs from simply averaging the purchase prices, which ignores how many shares were bought at each price.

Why is average cost basis a weighted average rather than a simple average?

A simple average of purchase prices treats every price equally regardless of how many shares were bought at it, which misrepresents the true blended cost when lot sizes differ. A weighted average instead reflects the actual dollars spent relative to shares acquired, so larger purchases have proportionally more influence on the result, matching how the total cost basis was actually built.

What is 'averaging down' on a stock position?

Averaging down refers to buying additional shares of a stock after its price has fallen, which lowers the position's weighted-average cost basis. This calculator can compute the resulting blended average cost, but it does not evaluate whether adding to a position after a price decline is a sound decision for any particular situation.

Does average cost basis include transaction fees?

This calculator computes average cost from the share quantities and prices entered only; it does not separately add transaction fees or commissions. To include fees in the average, add the fee's per-share equivalent to that lot's purchase price before entering it, or enter net effective prices.

Is average cost basis the method used to calculate capital gains tax?

It can be, but it depends on the brokerage and tax jurisdiction — some allow or default to average cost basis for certain security types (particularly mutual funds), while others default to first-in-first-out or permit specific-lot identification for individual stocks. Check with your broker or a tax professional regarding which cost-basis method applies to your account.

المراجع

  1. U.S. Securities and Exchange Commission (SEC), Investor.gov. Cost basis basics — tracking the cost of your investments. investor.gov.
  2. Internal Revenue Service (IRS). Publication 550, Investment Income and Expenses — cost basis methods. irs.gov.
  3. Financial Industry Regulatory Authority (FINRA). Understanding dollar-cost averaging and average cost basis. finra.org.
  4. CFA Institute. CFA Program Curriculum — Portfolio Management: Cost Basis and Position Tracking.

الاستثمار · جميع الحاسبات

حاسبات ذات صلة