UTILS.
100% in-browser
⌀$

Stock Average Price Calculator

Weighted average cost per share across multiple buys, unrealized P/L, and shares needed to hit a target average.

About this tool

Stock Average Price Calculator is a free, in-browser tool that computes your weighted average cost per share across any number of purchases. Enter the quantity and price of each lot — add rows as needed — and the average, total shares and total invested update live.

The average is Σ(quantity × price) ÷ Σ quantity. With a current market price entered it also shows your position's value and unrealized profit or loss in absolute and percentage terms, and with a target average it solves how many shares to buy at the current price to pull your average to that level: x = (invested − target × shares) ÷ (target − current).

It is the classic averaging-down helper for retail investors juggling several fills of the same stock or fund. All prices are typed in by you and every calculation runs locally — nothing is uploaded.

Frequently asked questions

How is the average price calculated?
It is the weighted average: total money invested (Σ quantity × price across all lots) divided by total shares — a big cheap lot pulls the average down more than a small one.
Why is the target average sometimes not reachable?
Buying at the current price can only move your average toward that price, so the target must lie strictly between your current average and the market price; otherwise the tool notes it cannot be reached.
Are fees and taxes included?
No. The math uses only quantity × price; if you want brokerage fees in your cost basis, fold them into the price you enter for each lot.
Does the tool fetch live stock prices?
No. You enter every figure yourself, including the current price, and all calculations run locally in your browser on this static page.

More tools