Share difference in actual and tally data

ABHIJIT MANNA (ACCOUNTANT) (447 Points)

30 August 2018  

I purchased a share four times but there purchase rate in every time was different, When I sold the shares the profit shows different in tally and actual. In tally the profit amount show in basis of Closing Stock avarage basis but actual purchasr value was different

For Example  I purchased 200 share by four part of Rs. 44576.50 and sold 152150.00 , so profit will be 107573.50 but tally shown the profit amount 102264.32

So how could  I correct in tally with actual calculation 

Please help me. I also attached a excel sheet for details.