As we know in demat account we calculate the cost of share sold on FIFO basis My query is, Say if we purchase the 5000 share of XYZ LTD. for Rs.2,000/-on 01/01/2013 in our demat account then we purchase the share of ABC LTD. for Rs.25,000/- ltd on 30/06/2013 on ther same Demat A/C now suppose if we sell the share of 1,500 ABC LTD on 31/08/2016 . then will we take the cost of XYZ LTD or ABC LTD for the share sold(i.e. for the 1,500 share of ABC LTD.)