How to use this calculator
Add each purchase lot by entering the number of shares and the price per share you paid. Click the add button to include additional lots. The calculator computes your weighted average cost per share across all entries, along with your total shares and total amount invested.
Optionally, enter the current market price of the stock to see your unrealized gain or loss in both dollar and percentage terms. This helps you understand your position at a glance without logging into your brokerage.
Use this tool when you have made multiple purchases at different prices and want to know your breakeven point. It is especially useful for dollar cost averaging strategies or when deciding whether to add to a position at current prices.
Understanding average cost basis
Your average cost basis is simply your total dollars invested divided by your total shares. If you buy 50 shares at $20 and later buy 50 more at $30, your total investment is $2,500 for 100 shares, giving you an average of $25 per share.
This number matters when you sell because your gain or loss is calculated as the selling price minus your cost basis. A lower average cost means higher profit when you sell at the same price.
Frequently asked questions
What is average cost basis?
It is the weighted average price per share across all your purchases. Divide your total amount invested by your total shares owned.
How does averaging down work?
Buying more shares at a lower price reduces your average cost. This can be useful if you believe in the long term value, but it also increases your risk if the stock continues declining.
Does average price include fees?
For tax purposes, yes. Add any commissions or fees to your cost basis. Most modern brokerages are commission free, making this less of a concern.
FIFO vs average cost for taxes?
FIFO sells oldest shares first (default for stocks). Average cost uses a blended price (common for mutual funds). The method affects your taxable gain. Consult a tax professional for your situation.