When there are several transactions made for the same stock, StocksCafe uses Weighted Average for computation (read about the different methods out there on this page).
StocksCafe chose Weighted Average for a few reasons:
- You can then average up or average down.
- Averaging is the simplest to understand in all scenarios.
- It is what most, if not all, brokerages use.
My Average Share Price is Wrong!
There’s a good chance it isn’t wrong, just different from how you think it is calculated. The following example might help you better understand how Weighted Average works.
Example:
Action | Quantity | Transacted Price | Total Cost | Total Shares | Average Price |
Buy | 2,000 | 21.92 | 43,840 | 2,000 | 21.92 |
Buy | 1,000 | 20.54 | (43,840 + 1000*20.54) = 64,380 | 3,000 | 21.46 |
Buy | 1,000 | 18.31 | 82,690 | 4,000 | 20.6725 |
Sell | 1,000 | 17.92 | (82,690 – 1000*20.6725) = 62,017.5 | 3,000 | 20.6725 |
To put it simply, when a Buy transaction occurs, the average price is recalculated.
When a Sell transaction occurs, it is the latest average price used in calculations, not the transacted price. The transacted price is irrelevant in calculating average price of shares.
We hope this helps you better understand how StocksCafe calculates average price. Feel free to reach out if you have any further questions.