Stock average cost calculator
Type each purchase on its own line: number of shares, then price. Useful for buying in stages or dollar cost averaging.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter purchases (shares then price, one per line).
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Average price = sum of (shares × price) over all purchases ÷ total shares.
Example
Result: Average price per share: 20.6667; Total shares: 300 shares; Total amount paid: 6,200.00.
Limits and caveats
- Commissions are not added automatically; fold them into the price if you want them included.
- Partial sales and stock splits are not handled.
Questions about this tool
Why is this not the simple average of the prices?
Each price is weighted by how many shares you bought at it. A large buy at a low price pulls the average toward that price.
How do I type the numbers?
Put shares then price on each line, separated by a space or a comma. Arabic digits are accepted.
Should I include commissions?
For an exact cost basis, divide each commission by that purchase's shares and add it to the price.
