If you choose the average cost method to calculate your total profit or loss (P/L), your P/L will be divided into two types: Unrealized P/L and Realized P/L, and calculated as:
● Realized P/L = (Exit Price - Cost Per Share) * Quantity Closed
● Unrealized P/L = (Current Price - Cost Per Share) * Quantity Held
● P/L = Realized P/L + Unrealized P/L