Add up the total amount paid for all shares purchased
Add up the total number of shares purchased
Divide the total amount paid by the total number of shares
Use the formula: Average Share Price = Total Cost of Shares รท Total Shares Bought
If shares were bought at different prices, include every purchase in the total cost and total shares
If transaction fees or commissions matter, add them to the total cost before dividing
If selling shares, calculate the average only from the shares still being considered in the position
