1. There is no need to calculate the profit and loss of the stock. You can directly enter the stock trading system and log in to your personal stock trading account. The stock trading account will automatically add the price of buying the stock plus the handling fee = cost price. As long as you buy and sell the same stock (the price difference in the middle), the account will automatically calculate the cost price, and how much you have earned and how much you have lost will be displayed. The profit and loss are only based on the accounts, the red ones have earned and the blue ones have lost.
2. Stock profit and loss calculation: commission and other expenses will be paid when selling, which is not included in the guaranteed price. It should be: profit and loss = (current price-guaranteed reserve price-commission and other expenses) × number of shares.