One price for many buys
Buying the same shares at different times leaves you with a mix of prices. To know where you stand, you need one number: the average cost per share, sometimes called the cost basis per share. It is the price the shares would have to reach for you to break even.
This stock average calculator combines up to 30 buys, fees included, into that average, and shows the gain or loss at a price you type. The second mode works out the profit and percentage return on a single buy and sell, and the break-even sell price after fees.
How to use it
- For each buy, enter the number of shares and the price per share. Add fees if your broker charged any.
- Add more rows with + Add a buy; leave a row empty to skip it.
- Type today’s price to see the value and the gain or loss.
- For a single trade, choose Profit on a sale and enter the buy and sell prices and the fees.
The formulas
average cost = total spent (shares × price + fees, for every buy) ÷ total shares
gain or loss = shares × price now − total spent
return = gain ÷ total spent × 100%
Including fees in the cost gives the true break-even price. An average weighted by shares is not the same as averaging the prices: a large buy at one price pulls the average toward it far more than a small one.
Worked example: three buys
| Buy | Shares | Price | Cost |
|---|---|---|---|
| 1 | 10 | $50.00 | $500.00 |
| 2 | 20 | $40.00 | $800.00 |
| 3 | 10 | $30.00 | $300.00 |
| Total | 40 | $1,600.00 |
The total cost is $1,600.00 for 40 shares, so the average cost is $40.00 a share. Averaging the three prices instead would give the same $40.00 only by chance; here the larger buy at $40 happens to sit in the middle. At a price of $45.00, the 40 shares are worth $1,800.00, a gain of $200.00, or 12.5%.
Keep good records
Brokers usually show an average cost on their own screens, but it can be worked out in different ways, especially after splits, transfers or partial sales. Keeping your own list of buys, with the date, the number of shares, the price and the fees, lets you check their figures and answer questions later.
Buying more at a lower price
Buying more shares after the price falls lowers your average cost, which is often called averaging down. It also puts more money into the same company. A lower average only helps if the price recovers; the calculator shows the numbers, not whether the company is a good choice.
- The average changes only when you buy; selling some shares does not change the average cost of the rest.
- Rules for tax on gains differ by country and by account. Keep records of every buy, with dates and fees.
- For simple percentage changes, use the percentage change calculator.
Frequently asked questions
How do I calculate my average cost per share?
Add up everything you spent on the shares, including fees, and divide by the total number of shares you own. Buying 10 at $50, 20 at $40 and 10 at $30 costs $1,600 for 40 shares, so the average is $40 a share. Enter your buys above to see yours.
Why not just average the prices?
Because each buy can be a different size. A large buy at one price should pull the average toward it more than a small one. Averaging $50, $40 and $30 gives $40, but if you had bought 100 shares at $30 and 10 at $50, the true average would be about $31.82.
How do I work out profit on a share sale?
Multiply the shares by the sell price and take off the selling fees, then subtract what you paid, including the buying fees. Buying 100 shares at $25 with $5 in fees and selling at $31.50 with $5 in fees gives a profit of $640, a return of about 25.55%.
What is a break-even price?
It is the sell price at which you neither gain nor lose after fees. In the single sale mode, it is the total cost plus the selling fee, divided by the number of shares. For an average across buys, your average cost per share is the break-even price before any selling fees.
Related calculators
More free tools from CloveDesk
CloveDesk gives freelancers and small teams one place for quotes, e-signatures, invoices, files and a portal for each client.
Last updated: