Average price per share calculation

Is this a loss of profit ?

trade_type quantity price
buy 10 74.15
sell 10 74.5
buy 84 79.35
buy 116 79.35
sell 200 79.4
buy 100 83.2
sell 100 84.15
buy 50 83.8
buy 100 70.5
buy 500 45.8
sell 80 52.8
sell 420 52.8
With 150@ 45.8 holdings .

It’s simple math you can do…

Buy : quantify * price ( add every trade, do this for all buy trades)
Sell : quantity * price ( add every trade, do this for all)

Profit = Buy in Rs.(total) - Sell in Rs (total)

If you have traded through zerodha just go to console.zerodha and check P&L statement

as @pankushri rightly pointed out, you have to multiply the price and qty and calculate.

Profit = Sell value - Buy value
Profit calculation for taxation purpose using the principle of “First In First Out”
If you follow the same for normal calculation it will also be helpful at the time of tax calculation.

I didnt understand the -3320, 2450 calculation groups.

that’s first in first out…
to calculate profit u need to deduct the shares first bought first from the sell price…
so 52.8150-(5083.8+100*70.5) for -3320
same way for the next one

Check this article.