There are multiple ways to calculate the average cost of your shares. The main purpose of cost price calculations are for tax.
Hatch: First in First out
Hatch uses the ‘First in, First Out’, or ‘FIFO’ method to calculate your portfolio returns. This method assumes that your oldest shares are sold first and often results in the average cost for each holding changing after you sell shares.
So, for example if your trading history for Company A looked like this:
01 Jan 2019: Buy 2,000 shares @ $10.00 a share
01 Jan 2020: Buy 1,000 shares @ $15.00 a share
01 Mar 2020: Sell 1,500 shares @ $20.00 a share
On 02 March 2020, you'd see 1,500 shares in your portfolio with an average cost price of $13.33. Hatch's calculation assumes you sold 1,500 of the shares you bought on 01 Jan 2019 @ $10.00 a share - because these were the First In, so are now the First Out
Sharesight: All time average price
Sharesight takes the average cost price of all shares you've ever bought for each holding. Even if you sell every single share you own in company A, and then buy more later, Sharesight will still include the cost price of every share every to calculate the average cost price.
Using the same example from above, on 02 March 2020, you'd see 1,500 shares in your portfolio with an average cost price of $11.66. Sharesight's calculation assumes you sold 50% of each group of shares you bought, so you sold 50% of the shares you bought on 1 Jan 2019 and 50% of the shares you bought on 1 Jan 2020.