How to Calculate Average Price Using FIFO?

5 mins read
by Angel One
Having a comprehensive idea of how the average traded price is calculated can be helpful in understanding the profitability of your trades. Read on to know average traded price calculation in detail.

What is Average Traded Price?

When you buy multiple units of an asset, such as the stock of company, the price of each unit may differ. In that case, the average traded price is the average price at which these units were bought overall.

For example, if I bought TCS stocks at different prices on different days, such as 10 stocks at ₹3,000, 20 stocks at ₹3,100 and 5 stocks at ₹3,200, then the average traded price of the 35 stocks in total will be:

[(3000*10) + (3100*20) + (3200*5)] = ₹3,085.71

What is FIFO in Average Traded Price Calculation?

First In, First Out (FIFO) is a method in accounting, whereby the impact of assets that came in first in our books is counted first, while the impact of those assets that came in later our books, is counted later.

In the context of average traded price, FIFO is a method used to choose the particular stocks whose prices will be considered for the calculation of the average traded price at a point of time, especially after the sale of some of the stocks. The FIFO method is used to report profit and loss (P&L) in your income tax filings.

Note: Shares of intraday trades are not considered at all while calculating average trading price of holdings, as intraday shares are not technically part of your holdings.

Examples of Average Price Calculation Using FIFO

Example 1:

Suppose, you have made the following buy transactions of a stock named XYZ, as per the data in this table:

Trade Date Symbol Type Qty Rate (in ₹)
1/8/2023 XYZ Buy 50 444
3/8/2023 XYZ Buy 30 439
9/8/2023 XYZ Sell 20 443

In the above table, 20 shares have been sold on 9th August (in the third row). As per the FIFO method, these 20 shares are out of the first 50 shares that had been bought at ₹444 on 1st August (in the first row). Therefore, on 10th August, 30 shares will be remaining from the first batch of 50, and 60 shares will be remaining overall.

Let us now understand this example in terms of the price:

Average traded price on 4th August of your XYZ holdings:

[(₹444*50)+(₹439*30)]/(50+30) = ₹442.12

Average traded price on 10th August of your XYZ holdings:

[(₹444*30)+(₹439*30)]/60 = ₹441.5

Notice: The reduction of 20 shares has happened out of the shares priced ₹444 and not the shares priced ₹439, as the shares priced ₹444 were bought first. This is because of the FIFO method.

Example 2:

In the above example, the quantity of shares sold was less than the quantity of shares bought on the first day. Let us now see how the average price will change if the sell quantity is larger than the quantity that was bought first.

Trade Date Symbol Type Qty Rate (in ₹)
1/8/2023 XYZ Buy 50 444
3/8/2023 XYZ Buy 30 439
9/8/2023 XYZ Sell 60 443

In this situation, all the 50 shares bought on 1st August as well as 10 of the 30 shares bought on 3rd August will be considered sold. Therefore, only 20 of the shares bought on 3rd August will be considered to be remaining.

Thus, the new average trading price on 10th August will be:

(₹439*20)/20 = ₹439

Example 3:

Now, let us look at an example where the quantity sold is equal to the quantity bought in the first two days. Notice that there has been a third day when  shares were bought and a second day when shares were sold.

Trade Date Symbol Type Qty Rate (in ₹)
1/8/2023 XYZ Buy 50 444
3/8/2023 XYZ Buy 30 439
9/8/2023 XYZ Sell 80 443
10/8/2023 XYZ Buy 40 440
16/8/2023 XYZ Sell 10 438

In this case, on 17th August, there will be only 30 shares left with the average traded price of ₹440. This is because all the shares bought at ₹444 and ₹439 will have been considered sold already on 9th August.

Why are Average Traded Price of Some Shares Not Shown Correctly?

Issues in showing the correct average trading price may rise due to the following reasons:

  1. Those shares were transferred from a different broker other than Angel One. In that case, the average traded price will have to be manually entered.
  2. If the stock has been obtained via an ESOP, then the average price will be shown as 0. You can fix it by contacting us.
  3. If the company is undergoing a corporate event like a bonus or a stock split, then the buy average will go through an adjustment. The average traded price will be automatically updated within a few days after the record date. A stock going through such an adjustment may also temporarily show an outdated price. But not to worry, as the price will soon be updated in a matter of a few days.
  4. It may also take a while to update the average traded price and P&L of stocks received as gifts.
  5. For off-market transactions, the average trading price is taken to be the closing price in the market on the day the stocks were transferred. You can however, edit the price.

Final Words

Now that you know what average traded price is and how it is calculated, it will be easier for you to understand how the profits and losses from your trades are calculated. Join the Angel One Community page to know more about the latest features on the Angel One Super App!