<prompt> Human: Lets say I buy 25 shares of a stock for 25share. A month later, I buy more of the same stock at 30share. Then, another month later, I sell 25 shares of the stock for 35share. For the purposes of capital gains tax, is this considered a 250 gain or a 125 gain?If it is the 250 gain, is it because that was the first price it was bought at? Or because it is the higher gain?What if 30 shares were sold? Would it count as a gain of 30x35 - 25x25 5x30 ?Assistant: Generally it is FIFO first in, first out unless you specify otherwise. Human: Ah so by specifying otherwise do you mean that some brokerages allow you to specify which shares to sell? I use Robinhood, and I just specify a number of shares to sell.  <response>: I believe you have to specify to the broker which shares to sell, yes, either at or before the time of sale. Otherwise its FIFO. 