On 1st July:

Orders Placed: 3

1st Order: Price = ₹200 | Quantity = 50 | Buy Order Value = ₹10,000

2nd Order: Price = ₹204 | Quantity = 50 | Buy Order Value = ₹10,200

3rd Order: Price = ₹208 | Quantity = 25 | Sell Order Value = ₹5,200

Calculations:

For the first and second orders:

Total Quantity = 100

Total Value: ₹20,200

Average Price = Total Value ÷ Total Quantity

₹20,200 ÷ 100 = ₹202

Sell Order Placed: 25 (out of 100)

Price: ₹208

Sell Order Value: ₹5,200

Applying FIFO Method:

Deduct 25 from the first trade (buy side), leaving a balance of 25.

After Applying FIFO:

Balance: 25 (50 - 25)

New Calculation:

1st Order: Price = ₹200 | Quantity = 25 | Buy Order Value = ₹5,000

2nd Order: Price = ₹204 | Quantity = 50 | Buy Order Value = ₹10,200

Total Order Value = ₹5,000 + ₹10,200 = ₹15,200

Total Quantity = 50 + 25 = 75

Average Price = Total Order Value ÷ Total Quantity

₹15,200 ÷ 75 = ₹202.67

The average price calculation remains consistent whether you are carrying a sell position or a buy position.