1. I buy 5000 shares of ABC on Jan/01/22 for $100,000 ($20.00/share)

  2. I buy 2500 shares of ABC on Feb/01/22 for $100,000 ($40.00/share)

  3. I now have 7500 shares with a cost basis of $200,000 ($26.66/share)

  4. I sell 2500 shares of ABC almost 1 year later on Jan/15/23 for $125,000 ($50.00/share)

My capital gain is approximately ($50.00 - $26.66) * 2500 = $58,350

But what day of purchase should I use? Jan/01/22 or Feb/01/22? Would it be considered short-term or long-term?

  • 1
    The keyword to use here is 'tax lot'. Your broker should have an option to see the tax lots somewhere.
    – Brady Gilg
    Commented Aug 22, 2023 at 16:16

1 Answer 1


Brokers default to FIFO (first in, first out), so unless you instructed your broker to sell the shares purchased on 2/1/22 they will have sold the ones you acquired on 1/1/22. Since the holding period on those is longer than 1 year it is long-term.

Your capital gain is not calculated using average cost, but actual for the shares sold, so in your example 30*2500 (assuming FIFO).

  • 1
    @AlanSTACK My understanding is that you generally have until the trade has settled to correct a FIFO/LIFO/specific lot selection. Otherwise, which shares are sold is determined at the time the order is executed and is irrevocable. This previous answer seems to support that: money.stackexchange.com/a/145639/121074
    – Stan H
    Commented Aug 22, 2023 at 0:05
  • 1
    @AlanSTACK Stan H is correct, has to happen before settlement. You'll have to check your broker's documentation, for mine it requires an email after the trade goes through that includes all relevant info.
    – Hart CO
    Commented Aug 22, 2023 at 0:20
  • 3
    @AlanSTACK It would depend on the broker, but the ones I'm familiar with are happy for you to specify specific numbers of shares from each lot, so essentially "all the policies" are available.
    – Sneftel
    Commented Aug 22, 2023 at 9:07
  • 3
    Unless you're loss harvesting, though, it rarely makes sense to choose anything other than FIFO.
    – Sneftel
    Commented Aug 22, 2023 at 9:08
  • 1
    You'll just have the same gains later.Unless cg pushes you over the tax bracket line, I consider this a difference that makes no difference.
    – keshlam
    Commented Aug 22, 2023 at 14:56

You must log in to answer this question.

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