How to calculate profit in f&o

What is the process for calculating profits in F&O trades?

Profit in F&O is calculated as the difference between the buy and sell price for futures, or the premium received/paid for options. Deduct transaction costs to get net profit.