Stock Average Calculator

Stock Average Calculator
Calculate Weighted Average Price
Purchase Order
Shares
Purchase Price ($)
1st Purchase
2nd Purchase
3rd Purchase
4th Purchase
Results:
Average Price Per Share: $0.00
Total Shares: 0
Total Cost Basis: $0.00
function calculateResult(){var totalShares=0;var totalCost=0;var detailText="Calculation Breakdown:
";for(var i=1;i<=4;i++){var s=parseFloat(document.getElementById('s'+i).value);var p=parseFloat(document.getElementById('p'+i).value);if(!isNaN(s)&&!isNaN(p)){var subtotal=s*p;totalShares+=s;totalCost+=subtotal;detailText+="Purchase "+i+": "+s+" shares @ $"+p.toFixed(2)+" = $"+subtotal.toFixed(2)+"
";}}if(totalShares<=0){alert("Please enter at least one valid share quantity and price.");return;}var avg=totalCost/totalShares;document.getElementById('avgPrice').innerHTML=avg.toLocaleString(undefined,{minimumFractionDigits:2,maximumFractionDigits:4});document.getElementById('totalShares').innerHTML=totalShares.toLocaleString();document.getElementById('totalCost').innerHTML=totalCost.toLocaleString(undefined,{minimumFractionDigits:2,maximumFractionDigits:2});if(document.getElementById('steps').checked){detailText+="
Total Cost ($"+totalCost.toFixed(2)+") / Total Shares ("+totalShares+") = $"+avg.toFixed(4);document.getElementById('stepDetail').innerHTML=detailText;document.getElementById('stepDetail').style.display='block';}else{document.getElementById('stepDetail').style.display='none';}}

Calculator Use

The stock average calculator is an essential tool for investors who make multiple purchases of the same stock at different price points. By using this calculator, you can quickly determine your weighted average price per share, which represents your true "break-even" point excluding commissions and fees.

Whether you are "averaging down" on a falling stock to lower your cost basis or "averaging up" during a momentum trade, knowing your exact average is vital for risk management and profit taking.

Shares
The number of units or shares purchased in a specific transaction.
Purchase Price
The price paid per single share during that specific transaction.
Total Cost Basis
The total dollar amount spent on all combined purchases.

How It Works

This tool uses a weighted average formula. A simple average (adding prices and dividing by count) doesn't work for stocks because you might buy different amounts of shares at each price level. The formula for the stock average calculator is:

Average Price = (Σ (Shares * Price)) / Total Shares

  • Multiply the number of shares by the price for each individual purchase.
  • Sum all these values together to find the total investment (Cost Basis).
  • Divide that total investment by the sum of all shares purchased.

Calculation Example

Example: An investor buys Apple stock twice over the course of a month.

Step-by-step solution:

  1. Purchase 1: 50 shares at $150.00 (Total: $7,500)
  2. Purchase 2: 20 shares at $130.00 (Total: $2,600)
  3. Combine Total Cost: $7,500 + $2,600 = $10,100
  4. Combine Total Shares: 50 + 20 = 70
  5. Calculate: $10,100 / 70 = $144.2857
  6. Result = $144.29 per share

Common Questions

What is averaging down?

Averaging down occurs when an investor buys more shares of a stock as its price declines. This lowers the average purchase price, allowing the investor to reach a profitable position sooner if the stock rebounds.

Does this calculator include brokerage fees?

This specific tool calculates the pure share price average. To include fees, you should add the commission paid for each trade to the "Total Cost" of that specific purchase before dividing by the shares.

Why is the weighted average important for taxes?

While many brokers use "FIFO" (First In, First Out) for tax reporting, understanding your total average cost basis helps you estimate your overall capital gains or losses before you sell your position.

Leave a Comment