Stock Average Calculator

100% private — runs on your device, never uploaded. Works offline once loaded.

Add a row for each lot of shares you bought — its price and quantity — to calculate your weighted average cost per share, total shares held and total amount invested. Add or remove lots freely; everything is computed in your browser.

Weighted average cost, done right

When you buy the same stock in several purchases at different prices, your true cost basis is the weighted average — total money invested divided by total shares owned — not the plain average of the prices. Weighting matters because a large lot influences your cost far more than a small one.

For example, buying 10 shares at $100 and 90 shares at $50 gives a weighted average of $55, not the naive $75 midpoint. This calculator sums the cost of every lot (price × quantity), sums the shares, and divides one by the other to give the figure your broker would call your average cost per share.

Why your average cost matters

Your average cost is the break-even price for the whole position: sell above it and you are in profit, sell below and you are at a loss (before fees and taxes). Knowing it precisely helps you set targets, size positions and decide whether to add, hold or trim.

It is also the anchor for averaging down — buying more shares after a price drop to reduce your average cost. Adding a lower-priced lot pulls the weighted average down, which can lower your break-even point, but it also increases your exposure to a stock that is already falling. The breakdown table below the result shows each lot's contribution so you can see exactly how a new purchase shifts your average.

  • Weighted average = total invested ÷ total shares
  • Total invested = sum of (price × quantity) across all lots
  • Averaging down lowers your average cost but raises exposure
  • Your average cost is your break-even price before fees

Using the calculator well

Add one row per purchase lot. You can enter fractional shares (many brokers now support them) and any currency — the tool is unit-agnostic, so the average comes out in whatever currency you typed. Remove a lot to model selling it, or to see how your average would look without a particular purchase.

A few caveats: this tool calculates cost basis using the total-average method, which is common for informal tracking and is the default in many countries. Some jurisdictions require specific-identification or FIFO accounting for tax purposes, which can produce a different figure when you sell. It also excludes commissions, spreads and taxes — fold those into your prices if you want an all-in cost. For tracking, it is a fast, private way to keep your average current as you build a position.

Frequently asked questions

How do I average down my stock?

Add each of your existing lots, then add a new lot at the lower current price. The weighted average cost per share updates immediately, showing your new, lower break-even price.

Can I enter fractional shares?

Yes. The quantity field accepts decimals, so fractional-share purchases are handled correctly in the weighted average.

Why isn't the average just the midpoint of my prices?

Because lots usually differ in size. A weighted average accounts for how many shares you bought at each price; a plain midpoint would only be correct if every lot had identical quantity.

Does it factor in brokerage fees or taxes?

No. It uses your price and quantity inputs only. To include fees, add them to the price per share, or enter them as an extra small lot.

How many lots can I add?

As many as you need. Use the "Add lot" button for each purchase and "Remove" to delete one. The totals and average recalculate automatically.

Is my portfolio data private?

Yes. Every calculation runs locally in your browser. The prices and quantities you enter are never uploaded or saved anywhere.

Advertisement