This is specific to Indian Stock Market but I'd like to know about other markets as well if it works differently there.

Here's the scenario:-

I bought 10 units for INR 10 each.

The stock went up by 10, now each of my purchased unit is worth INR 20 each.

I bought another 10 units at INR 20 each.

After this, the stock went down by 5, so I sold 12 units, now I have 8 remaining.

Question: How many units did I sell of which purchase price? Is it 10 of the ones bought at INR 10 and 2 of the ones bought at INR 20 (Account Balance +40) or is it the other way around (Account Balance -40)? Just to confirm, what happens if I had another set of 10 that were purchased at INR 5?

Please let me know if this is a dumb question and I'm missing something obvious.

1 Answer 1


It depends on which ones you sold, and there are names for the choices:

  • FIFO: first-in-first-out, meaning you sold the oldest ones first,
  • LIFO: last-in-first-out, meaning you sold the newest ones first,
  • Weighted Average: meaning you sold a (theoretical perfect) mixture of all you had,
  • Selected Lots: meaning you explicitly specify which shares you sell, mixed as you like from any lot.

I cannot tell you what your provider uses as default, but usually, you can set either one as your default, and you can additionally change the applied procedure after each sale, but only until it is settled.
If you don't ever set or change anything, most providers will use FIFO - but again, yours might have another default.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .