How is crypto profit and loss calculated?

Updated