This is still a little confusing to me. Can anyone please help me with this?

Suppose today is expiry day. I buy 1 Lot BANKNIFTY 25800 PE (Put Option) at 160 and spot closes at 25720 on expiry. And I let my position to expire and do not square-off. How the profit and STT be calculated in the scenario.

If spot closes at 25720 it is in the money by 80 points. So it gets exercised automatically. STT is applied at the rate of 0.125% of the contract value. so 0.125% of 25720*40 = Rs 1290 per lot. So in the Rs 80 premium you get or Rs 3200 premium, you pay Rs 1290 as STT. Net making around Rs 1900.

So the option premium (paid) has no role whatsoever in the calculation of profit? I mean if I had bought the above contract at 160. It does not have any say in profit calculation but the difference between strike price and spot price multiplied by lot size thats it?

So only if the spot closes further down by 80 points(at 25640), then I will break-even.

buy cost: 160*40 = 6400

expiry cost: 3200 (as according to above calculation)

So gross loss of 3200 (6400-3200)

But thank you for the explanation. It will help me in choosing the right contract to buy.