Stock Average (Cost Basis) Calculator
Calculate your average cost per share across multiple purchases at different prices.
Calculate your average cost per share across multiple purchases at different prices.
How Stock Average (Cost Basis) Calculator Works
Each purchase lot contributes its own cost (shares times price), and the calculator divides the total amount spent across all lots by the total number of shares owned — a weighted average, so a larger purchase pulls the average price more toward its own price than a smaller one does.
See It In Action
Who Uses Stock Average (Cost Basis) Calculator and Why
- Calculating the weighted average cost per share across multiple purchases of the same stock made at different prices over time.
- Working out cost basis for tax purposes ahead of selling shares, to determine the taxable gain or loss.
- Checking how much a recent additional purchase (like buying more shares during a dip) shifted the overall average cost basis.
- Comparing the current average cost basis against the current market price to see an at-a-glance unrealized gain or loss position.
Mistakes to Avoid
- Assuming a large recent purchase moves the average cost proportionally to how recent it was rather than how large it was — the average is weighted by number of shares in each lot, so a bigger purchase pulls the average toward its own price more than a smaller purchase does, regardless of timing.
- Including shares that were already sold in the lot list — this calculator only handles currently-held purchase lots; if shares were sold and rebought, the cost basis of remaining shares needs to be worked out first using your brokerage's accounting method (like FIFO) before entering only the lots still held.
- Confusing average cost basis with break-even price — average cost basis doesn't account for any dividends received or trading fees paid, so the true break-even point can differ slightly from the raw average cost figure.
Tips for Best Results
- Before entering purchase lots, confirm with your brokerage which accounting method (like FIFO) applies to any shares you've already sold, so the lots you enter accurately represent what's currently still held.
- Recalculate average cost basis every time a new purchase is made, rather than doing rough mental math, especially once purchases span very different price points.
Fixing Common Problems
My average cost doesn't match what my brokerage shows. — Check whether any shares were sold and rebought in between purchases — this calculator only works with currently-held purchase lots, so partial sales need to be accounted for separately using your brokerage's accounting method (like FIFO) before entering the remaining lots.
Terms Explained
Cost basis: The average price paid per share, used for tax purposes to determine capital gain or loss when the shares are eventually sold.
Purchase lot: A single batch of shares bought at one time and price — the building block used to calculate a weighted average cost across multiple purchases.