We have updated the app to give you a better experience.

## If you’re using an older version of the Upstox app, read this.

Consider this,

On 1st July:

Order Placed - 1

Order: Quantity = 75 | Price = ₹10,000.00

Total value = 75*10,100 = ₹  7,57,500.00 | Average Price: ₹10,000.00

On 5th July:

Orders Placed - 2

first Order : Quantity = 75 , Sell Order | Price = ₹ 10,150.00

second Order : Quantity = 75 , Purchase Order | Price = ₹ 10,200.00

Here's what the numbers mean:

The same quantity was sold at ₹10,150 on 5th July and was bought again at ₹10,200 on the same day. Hence, this trade that took place on 5th July will be considered as an Intraday trade and will be visible in Positions.

Since Intraday trades are not considered in the calculation of average price, the average price remains as it was on first July (₹ 10,100).

## If you’re using the updated version of the Upstox app, read this.

Consider this,

On 1st July:

Orders Placed - 3

first Order : Price= ₹ 200  Quantity = 50 ,  Buy Order Value = ₹ 10,000

second Order : Price = ₹ 204 Quantity = 50 , Buy Order Value = ₹ 10,200

third Order : price = ₹ 208 Quantity = 25,  Sell Order Value= ₹ 5,200

Here's what the numbers mean:

For first and second Order

Total quantity = 100

Total value: ₹ 20,200

Divide total value by total quantity: ₹ 20,200 ÷ 100 = ₹ 202

₹ 202 is the average price.

Let us see what happens when you add a sell order to this:

Sell order 25 (out of 100)

Price: ₹ 208

Sell Order Value: ₹ 5,200

Now the FIFO method will be applied here. The method will check the first trade (on the buy-side). In this case, it is 50, and 25 will be deducted from 50. The balance left is shown below.

After applying the FIFO method,

Balance: 50 - 25 = 25

(Note: In case the sell quantity was more than 50 then it would have moved to the next trade to deduct the remaining quantity.)

first Order : Price= ₹ 200  Quantity = 25 ,  Buy Order Value = ₹ 5,000

second Order : Price = ₹ 204 Quantity = 50 , Buy Order Value = ₹ 10,200

Total order value= ₹ 5000+₹ 10200= ₹ 15200

Total Quantity= 50+25 = 75.

Average price = Total order value ÷ Total Quantity

Average price: ₹ 15200 ÷ 75 = ₹ 202.67

The Average price calculation remains the same even if you are carrying a sell position instead of a buy position.