Free Stock Average Calculator

Purchase 1
$
Purchase 2
$
$

Enter your stock purchases to calculate the average price

Understanding Stock Cost Basis

A stock average calculator (also referred to as a stock cost basis calculator or average stock price calculator) is an indispensable online tool for investors who purchase shares of the same company over time at different prices. It quickly determines the average price you paid per share—your cost basis—allowing you to assess the true cost of your position. Whether you are a day trader or a long-term investor using dollar‑cost averaging, knowing your cost basis is fundamental to measuring profit, loss, and investment performance.

What Is Stock Cost Basis?

Cost basis is the weighted average purchase price of all shares you own in a particular stock. It is not simply the average of the prices you paid; it accounts for how many shares you bought at each price level. This figure serves as the reference point for calculating capital gains and losses, and it is also used to determine dividend yield relative to your investment. A lower cost basis generally means a larger potential profit if the market price rises.

The Weighted Average Formula

To obtain the cost basis, you calculate the weighted mean of the purchase prices, where the weights are the number of shares bought in each transaction:

Cost basis=p1q1+p2q2+⋯+pmqmn\text{Cost basis} = \dfrac{p_1 q_1 + p_2 q_2 + \dots + p_m q_m}{n}

Here:

  • pip_i = price per share of the ii-th purchase,
  • qiq_i = number of shares in the ii-th purchase,
  • n=q1+q2+⋯+qmn = q_1 + q_2 + \dots + q_m = total shares held.

The same equation works whether you have two purchases or dozens. Once you know the cost basis, the profit (or loss) is simply:

Profit=(Current market price−Cost basis)×n\text{Profit} = (\text{Current market price} - \text{Cost basis}) \times n

and the percentage return is:

Profit %=Current price−Cost basisCost basis×100%\text{Profit \%} = \dfrac{\text{Current price} - \text{Cost basis}}{\text{Cost basis}} \times 100\%

Example with Equal Purchases

Imagine you accumulate AMD shares over several days, buying one share each time at the following prices: 85.00,85.00, 84.00, 83.00,83.00, 75.00, 77.00,and77.00, and 75.50.

DateTransactionPrice per Share
2021-02-25Buy 1 AMD$85.00
2021-02-26Buy 1 AMD$84.00
2021-02-27Buy 1 AMD$83.00
2021-03-05Buy 1 AMD$75.00
2021-03-08Buy 1 AMD$77.00
2021-03-09Buy 1 AMD$75.50

All purchases are one share, so total shares n=6n = 6. The total investment is 85+84+83+75+77+75.5=479.5085 + 84 + 83 + 75 + 77 + 75.5 = 479.50, giving:

Cost basis=479.506≈$79.92\text{Cost basis} = \dfrac{479.50}{6} \approx \$79.92

If AMD later trades at 100,yourabsoluteprofitis100, your absolute profit is (100 - 79.92) \times 6 = $120.48$. The percentage profit is:

100−79.9279.92×100%≈25.1%\dfrac{100 - 79.92}{79.92} \times 100\% \approx 25.1\%

Example with Unequal Purchases (Weighted Average)

Now suppose you vary the number of shares bought at each price:

  • First: 2 shares at $50 each,
  • Second: 3 shares at $45 each,
  • Third: 5 shares at $48 each.

Total shares: 2+3+5=102 + 3 + 5 = 10. Total cost: (2×50)+(3×45)+(5×48)=100+135+240=475(2\times50) + (3\times45) + (5\times48) = 100 + 135 + 240 = 475.
Cost basis: \displaystyle \dfrac{475}{10} = \47.50$ per share.

If the stock climbs to 55,yourprofitis55, your profit is (55 - 47.50) \times 10 = $75.00$, or a percentage return of:

55−47.5047.50×100%≈15.8%\dfrac{55 - 47.50}{47.50} \times 100\% \approx 15.8\%

This example illustrates why the share average calculator must use weighted‑average logic to give an accurate cost basis.

Including Brokerage Fees and Dividends

For a more precise calculation, some stock profit calculators allow you to enter commissions and other fees. The formula then becomes:

Cost basis (with fees)=∑(piqi)+feesn\text{Cost basis (with fees)} = \dfrac{\sum(p_i q_i) + \text{fees}}{n}

Similarly, if you have received dividends, you can adjust your cost basis downward (in some accounting methods) or simply use a dividend calculator together with your cost basis to compute your yield.

Why Knowing Your Cost Basis Matters

  1. Performance measurement: Compare your cost basis to the current market price to gauge unrealized gains/losses.
  2. Tax reporting: Capital gains taxes are based on the difference between sale price and cost basis.
  3. Strategy refinement: When you buy additional shares at a lower price (averaging down), your cost basis decreases, potentially reducing risk. Many investors use the dollar cost average calculator approach to systematically lower their average entry price.
  4. Dividend yield calculation: Yield = (annual dividend per share) / (cost basis per share) – not the current market price.

Using the Online Stock Average Calculator

A dedicated stock average calculator makes these computations effortless. You simply enter each purchase’s price and quantity, and the tool returns:

  • Your average stock price (cost basis),
  • Total shares owned,
  • Total money invested,
  • Current profit/loss in dollars and percent.

The calculator handles any number of transactions and can include optional fields for fees. It is particularly useful for position traders, swing traders, and anyone who wants a clear snapshot of their stock cost basis.

If you need to dive deeper into a company’s financial health, complementary tools such as a revenue growth calculator or operating cash flow calculator can provide context on why the stock price moves.

Final Thoughts

The stock cost basis is the cornerstone of investment tracking. Whether you call it an average stock price calculator, a stock portfolio calculator, or a share average calculator, the underlying math is the same: weighted averaging and simple subtraction for profit. By using a reliable online stock average calculator, you can stay on top of your portfolio’s true cost and make informed decisions about when to add, hold, or exit a position.

FAQ

1. What is the average stock price (cost basis), and how is it calculated?

The cost basis is the weighted average price you paid per share, calculated by dividing the total cost of all purchases by the total number of shares owned. The online stock average calculator performs this automatically.

2. How can I compute my profit percentage using the stock average calculator?

After entering your purchases and the current market price, the calculator subtracts the cost basis from the current price, multiplies by total shares for dollar profit, and divides the difference by the cost basis to show the percentage return.

3. Does the calculator support different purchase quantities and brokerage fees?

Yes, the calculator handles any quantity of shares per purchase and can optionally include brokerage fees, which are added to the total cost before computing the average.

4. Why is it important to know my cost basis for tax and investment decisions?

Your cost basis is used to measure unrealized gains/losses, report capital gains taxes accurately, and calculate dividend yield based on your actual investment cost.

5. Can I use a stock average calculator for dollar cost averaging?

Yes, the stock average calculator is well-suited for dollar cost averaging (DCA). By entering each periodic purchase, you obtain the average price per share over time, which is exactly the information needed to evaluate a DCA strategy.

How to Use

  1. Enter the number of shares and price per share for each stock purchase.
  2. Optionally enter the current stock price to calculate your profit or loss.
  3. View your average stock price (cost basis), total investment, and profit instantly.