So, I was DCAing, and at some point in January, 2023 I had 350 CNS (some coins) at 45 USD in average. Then I sold 100 of CNS. So now I have 250 CNS. The question: is the average still 45 USD per CNS? Or how do I calculate average price per coin after selling 100 of them?
To calculate the average purchase price of your coins, when you have multiple transactions, you can use the weighted average method.
For example, let's say you purchased 10 coins at $100, sold 5 at $150, and then purchased 5 more at $90. The calculations would be as follows:
Transaction 1: Buy 10 coins at $100
Total cost = 10 x $100 = $1000
Transaction 2: Sell 5 coins at $150
Total cost = Total cost - $750 (5 x $150, but we will subtract that amount since you received money)
Transaction 3: Buy 5 coins at $90
Total cost = Total cost + $450 (5 x $90)
Total cost of all transactions = $1000 - $750 + $450 = $700
Total quantity of coins purchased = 10 - 5 + 5 = 10
Average purchase price = $700 / 10 = $70
Therefore, the average purchase price of your coins in this case would be $70.
Using this calculation method will provide a more precise average price compared to only calculating the purchase price. Essentially, each time you purchase coins at a price below the current average and sell them at a price higher than the current average, your overall average purchase price will decrease.