Calculate your weighted average cost per share across multiple stock purchases. Track your total investment, unrealized profit or loss, break-even price, and cost basis — instantly and for free.
A weighted stock average (also called weighted average cost or cost basis) is the average price you paid per share across multiple purchases, where each purchase price is weighted by the number of shares bought. It reflects your true cost-per-share more accurately than a simple average of purchase prices.
Your average cost determines your break-even price — the minimum price the stock must reach for you to break even. It’s also essential for calculating capital gains taxes when you sell. Without knowing your true average cost, you can’t accurately assess your investment performance or tax liability.
Cost basis is the total amount you paid for your shares, including brokerage fees. The IRS uses cost basis to calculate your capital gains or losses when you sell. If you bought 100 shares at $50 ($5,000) and 50 shares at $60 ($3,000), your total cost basis is $8,000 and your average cost per share is $53.33.
A simple average: ($50 + $60) ÷ 2 = $55.00. The weighted average: (100×$50 + 50×$60) ÷ 150 = $53.33. The weighted average is $1.67 lower because you bought more shares at the cheaper price. Weighted average always reflects reality; simple average does not.
The formula multiplies each purchase price by how many shares you bought at that price, sums all the costs, and divides by total shares. This weights each price by the quantity purchased, giving larger purchases more influence on your average cost.
Enter the price per share for each stock purchase. Use the actual price you paid at the time of each buy order — check your brokerage trade confirmations for exact prices.
Enter the number of shares you bought in each purchase. Fractional shares are supported if your broker allows them.
Click “Add Purchase” for each additional buy order. There’s no limit — add as many purchases as you need. Use the preset buttons for quick scenarios.
Enter brokerage commissions and transaction fees for a more accurate cost basis. These fees increase your true average cost per share.
See your weighted average cost, total investment, unrealized P/L (if you entered market price), break-even price, and visual breakdowns of your purchase history.
See the effect of adding more shares at a given price on your average cost and break-even.
Know exactly what you paid per share across all purchases. This is critical for tax reporting, performance evaluation, and making informed buy/sell decisions.
Compare your average cost to the current market price to see if you’re in profit or loss. This context helps you decide whether to buy more, hold, or sell.
Track how your regular purchases at different prices smooth out volatility over time. DCA is one of the most effective long-term investing strategies, and this calculator tracks its impact.
Your break-even price is the minimum the stock needs to reach for you to recover your investment. This calculator shows it instantly and updates as you add purchases.
Use the Portfolio Impact Simulator to see how buying additional shares at different prices would change your average cost. This helps you plan DCA contributions, decide whether to average down on a dip, or evaluate the impact of adding to a winning position.
Averaging down means buying more shares when the price drops below your average cost. This lowers your average cost per share, reducing the break-even price. It’s a strategy that works if the stock recovers, but amplifies losses if it continues declining.
Lowers your average cost per share, reduces break-even price, and increases potential profit if the stock recovers. Works well for fundamentally strong companies experiencing temporary dips.
If the stock continues to fall, you increase your total loss. Never average down blindly — only on stocks with strong fundamentals and a clear thesis for recovery. Set a maximum position size to limit risk.
Averaging up means buying more shares as the price rises above your original purchase. This increases your average cost but allows you to build a larger position in a winning investment.
Adds to winning positions, captures momentum, and aligns with trend-following strategies. You’re investing in proven winners rather than catching falling knives.
Averaging up works when a stock is in a confirmed uptrend with strong fundamentals, earnings growth, or institutional support. Many legendary investors like William O’Neil advocate buying more as stocks prove themselves.
Under the weighted average method, selling shares does NOT change your per-share average cost. You simply have fewer shares at the same average cost. Under FIFO (First In, First Out), selling removes the earliest-purchased shares first, which can change the remaining cost basis.
You own 300 shares at $138.33 average. You sell 100 shares at $155. Your remaining 200 shares still have a $138.33 average cost. Your realized gain is (155 - 138.33) × 100 = $1,667. The remaining 200 shares have unrealized gain based on current market price.
FIFO sells oldest shares first, which may have a different cost than your average. If your first purchase was at $150 and second at $130, FIFO sells the $150 shares first — resulting in a smaller gain (or larger loss) than the weighted average method. The weighted average method uses the same average cost for all shares regardless of purchase order. Check with your broker which method they use for tax reporting.
Use SUMPRODUCT to calculate the weighted average in Excel:
Where column A contains purchase prices and column B contains share quantities.
Google Sheets uses the same SUMPRODUCT function:
Works identically to Excel. You can also use the named range approach for cleaner formulas.
SUMPRODUCT multiplies each price by its corresponding share count, sums all products, then you divide by total shares. Example: Prices in A2:A4 are $50, $45, $60. Shares in B2:B4 are 100, 200, 50. SUMPRODUCT = (50×100 + 45×200 + 60×50) = $17,000. SUM(B2:B4) = 350. Average = $17,000 ÷ 350 = $48.57.
A simple average of $50 and $100 gives $75, but if you bought 100 shares at $50 and only 10 at $100, your true average is $54.55. Always weight by share quantity.
The number of shares bought at each price is critical. Buying 1,000 shares at $10 dominates your average far more than buying 10 shares at $100. Quantity is the “weight” in weighted average.
Brokerage commissions and transaction fees increase your true cost basis. A $10 commission on a 100-share purchase adds $0.10 per share to your average cost. Include fees for accurate tax reporting.
Using estimated prices instead of actual trade prices leads to inaccurate averages. Always check your brokerage trade confirmations for the exact fill price and quantity.
Knowing your average cost without comparing to the current market price is incomplete. Always enter the current price to see unrealized P/L and break-even status.
Don’t put all your money in one stock. Spread across sectors, asset classes, and geographies to reduce risk. Use this calculator for each position to track individual cost bases.
Don’t panic-sell during dips or FOMO-buy at peaks. Use your weighted average cost as an anchor — if the stock is above your average, you’re profitable. Stick to your strategy.
Recalculate after each purchase. Your cost basis changes with every new buy order. Regular tracking helps you make informed decisions about adding to or reducing positions.
Invest a fixed amount at regular intervals regardless of price. DCA removes the pressure of timing the market and naturally builds a favorable weighted average over time.
Set position size limits (e.g., no single stock exceeds 10% of portfolio). Use stop-loss orders if appropriate. Know your maximum acceptable loss before entering any position. Your weighted average cost helps you calculate exactly where you stand and how much risk you’re carrying.
New to investing? Track your cost basis from day one. Understanding your average cost per share is fundamental to evaluating investment performance.
Buy-and-hold investors who accumulate shares over months or years need to track their evolving average cost as they add to positions during DCA.
Traders who scale into positions over multiple entries need precise cost tracking to set profitable exit targets and manage risk-reward ratios.
ETF investors making regular contributions need to track their weighted average NAV per share across multiple purchases at different prices.
Track your cost basis across multiple mutual fund purchases, especially for tax lot management and capital gains reporting.
Track cost basis for dividend reinvestment (DRIP) shares purchased at different prices. Each reinvestment creates a new tax lot that affects your average cost.
A weighted stock average calculator computes your average cost per share across multiple purchases by weighting each price by the number of shares bought. It gives you a single cost basis that accurately reflects what you paid per share.
Multiply each purchase price by the number of shares, sum all products, then divide by total shares. Example: (100×$50 + 200×$45) ÷ 300 = $46.67.
Weighted Average Price = Σ(Price_i × Shares_i) ÷ Σ(Shares_i). Each price is weighted by the number of shares purchased at that price.
Simple average treats each price equally. Weighted average accounts for how many shares you bought at each price. If you bought 100 shares at $50 and 10 at $100, simple avg is $75 but weighted avg is $54.55.
Averaging down (buying more when price drops) lowers your average cost, reducing the break-even price. Buying 100 shares at $50 then 100 at $40 gives $45 average instead of $50.
Averaging up (buying more as price rises) increases your average cost but builds a larger position in a winner. Your average stays between your lowest and highest purchase prices.
Cost basis is the total amount paid for your shares including fees. It's used by the IRS to calculate capital gains/losses. A lower cost basis means higher profit when selling.
Yes. Enter each purchase with its price and quantity. The calculator handles unlimited purchases and computes the weighted average across all of them.
Yes, for accurate tax reporting. The IRS requires including commissions and fees in your cost basis. Use the fees field to include them in your calculation.
Yes. Enter the current market price to see unrealized P/L in both dollar amount and percentage.
Under the weighted average method, selling does NOT change your average cost per share. Under FIFO, it can, because the earliest (potentially different-priced) shares are removed first.
Yes. ETFs and mutual funds work the same way. Enter price per share/unit and quantity for each purchase.
Yes. Enter each crypto purchase price and quantity. Works for Bitcoin, Ethereum, or any cryptocurrency.
Use: =SUMPRODUCT(PriceRange, SharesRange) / SUM(SharesRange). For example: =SUMPRODUCT(A2:A5, B2:B5) / SUM(B2:B5).
Yes, 100% free. No registration needed. All calculations happen in your browser — no data stored or sent anywhere.
Specialized purpose-built weighted average calculators — each tailored to a specific domain with unique inputs, outputs, and interactive visualizations.