What is my profit here?

I have 19 shares of a company in my demat account at an average price of 114. I sold 12 shares at 157.10 and bought back 7 shares at 160 on the same day. Can someone explain the maths behind my profit here.

Did you sell the 12 shares at 157.10 and buy back the 7 shares at 160 on the same day?

Use the Zerodha brokerage calculator. It will show you a breakup of charges. Select intraday or delivery as per your trade.

Yes, I bought it back on the same day

Price will just get avaraged. No profit i guess.

19 shares in Demat at 114, sold 12 shares at 157.10 and bought back 7 shares at 160 on same day.

  1. 7 out of the 12 shares sold at 157.10 was bought back at 160, this accounts as an intraday trade with intraday loss of Rs.20.3

  2. 5 out of the 12 shares sold at 157.1 from the 19 shares in Demat bought at 114, this accounts for a realized holding profit of Rs.215.5

  3. The remaining 14 shares are are still present in the Demat account at 114.