1. Two years ago, I bought 100 shares of XYZ.

  2. Yesterday, I bought another 100 shares of XYZ.

  3. Today, I sold 100 shares of XYZ.

  4. Which 100 shares did I actually sell? If it were the 100 shares from 2 years ago, then that contributes to my long term capital gains tax. If it were the 100 shares from yesterday, then that contributes to my short term capital gains tax.

1 Answer 1


At the time of the sale, you can designate what shares you want sold. The IRS requires that your broker verifies that those specific shares were sold. The IRS calls this "specific share identification." Without that confirmation, the IRS will default to FIFO (First In, First Out).

  • 3
    FIFO means that the first 100 shares I bought are sold, right? just to be sure. Commented Jan 2, 2021 at 18:20
  • 3
    That is correct. Commented Jan 2, 2021 at 18:28
  • 5
    Interesting - can I ask why this is ever relevant? Naïvely, a share is a share is a share - a representation of a proportion of the ownership of a company, and two shares of the same type are identical. I would guess that there are tax implications though? And if there are different types of shares, those are obviously different! Commented Jan 3, 2021 at 11:46
  • 14
    @NeilTarrant point #4 in the original question addresses that: whether it is considered "short term capital gains" or "long term capital gains" can make the taxes different.
    – Moshe Katz
    Commented Jan 3, 2021 at 12:49
  • 8
    @tparker It's almost always advantageous (taxwise) to sell long-term shares. But if the price of the stock had been rising, you would usually want to sell the youngest long-term shares, not the oldest, because they'll have the least gain. Of course, you may just be postponing the big tax hit -- eventually you may need to sell the oldest shares.
    – Barmar
    Commented Jan 3, 2021 at 16:26

You must log in to answer this question.

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