Learn how the average price is calculated on Dhan!

If you buy/sell a stock at the different price levels you will see that the average price changes. So how does it change, and who decides it? Let’s understand with an example.

Assume you bought 10 shares of Tata Motors on 13/04/2022 and the other 20 shares on 15th April and sold 5 Qty on 17th and repurchased it on 20th at different prices as mentioned in the table.

Here the average price of the TAMO will be calculated as (Qty*price)

= (10400)+(20440)-(5463)+(25430) = 21235 divided by total Quantity i.e 50.

Your Avg price will be = 21235/50

= Rs. 424.70/-

Note:

  • This is applicable for all including delivery & intraday
  • This process of averaging follows the FIFO rule (First In First Out). Meaning, the shares which you have bought first would be considered first while selling
  • FIFO is followed even in BTST (Buy Today Sell Tomorrow)
1 Like

Hey @Sudhanshu,

It would be good idea to have an example with buy/sell over total of 5-6 transactions.

Hi, @amit noted your request. Doing it right away.

1 Like

Hey @Sudhanshu,

Not sure if sell transaction should be included in the weighted average formula to derive the average price…

Can you please take a look at following calculation and share your comments.

1 Like

Hi @amit Your sell price is also considered while calculating the average buy price of the security

@Sudhanshu ,

I see that you’ve updated the formula and now the average price is same as mine…

I’m glad that my calculation was useful… :slightly_smiling_face: