I'm a little uncertain on how capital gains tax applies to this scenario. Will it be considered a long term or a short term gain?

  1. I bought 100 shares of XYZ for a few years ago
  2. The stock does does well in October so I sell 50 shares
  3. After a few weeks, the stock prices drops and I buy another 50 shares

Does this count as a long term gain because I'm only selling stocks I bought a while ago?

What if I buy more stocks before I sell some?

  1. I bought 100 shares of XYZ for a few years ago
  2. The stock price drops so I buy 50 more shares
  3. The price goes up and I decide to sell 100 shares

If I sell no more than my original number of shares, does it still count as a long term gain?

  • Welcome to Money.SE! Good first question.
    – C. Ross
    Dec 19, 2012 at 14:11

2 Answers 2


In the first case, you have a long-term capital gain when you sell the 50 shares for a higher price than when you bought them. Rebuying the shares in 3. at a lower price has no tax consequences.

In the second case, the answer will depend on which shares you sold. If the shares are of a mutual fund, you can also use the average cost per share and have a mix of long-term and short-term gains.

  • 1
    If the 100 shares sold in scenario 2 are lower than when purchased, the wash rule may come into play. Without prices and time elapsed, the question cannot be fully addressed. Nov 25, 2012 at 4:40
  • @JoeTaxpayer Yes indeed. I didn't say anything about wash sales since Scenario 2 did not mention "a few weeks" as Scenario 1 did (where the exact number of days meant by "a few weeks" is irrelevant). Nov 25, 2012 at 12:40
  • Hmmm, I wonder which part of my answer the down-voter felt was "not useful" Nov 25, 2012 at 19:19
  • @DilipSarwate at what point in time (ie, how many days) would it take before the wash rule become relevant. AFAIK, and I may be wrong, it doesn't apply if you sell at a profit.
    – wag2639
    Nov 26, 2012 at 19:14
  • @wag2639 The wash rule applies for sales and purchases made within 30 days of each other (doesn't matter which occurs first) and also applies to "essentially identical securities" e.g. a sale of shares in one S&P 500 index fund and a purchase in another S&P 500 index fund run by a different company. Yes, the sale must be for a loss. In scenario 2, the sale of 100 shares could be the original shares sold for a loss. As Joe Taxpayer commented, without prices and times elapsed between 2. and 3., the question for scenario 2 cannot be fully addressed. Nov 26, 2012 at 21:10

In the first scenario, the 50 shares you sold are subject to long term capital gains taxes in the event you do not buy anymore. However, if you repurchase those 50 shares at a lower price than what you sold them, within 30 days, it essentially doesn't count that you sold in the first place. See page 59 of IRS Publication 550.

In the second scenario, it all depends on which shares you sell, which may or may not be confusing to sell. Most trading houses have the option for you to select how you want to sell your shares (First In/First Out, Last In, First Out, etc). In the case that you sell the first 100 shares you bought, then it would be considered a long term gain (because it was a few years ago). Assuming you recently bought those 50 share (say 3 months ago) and then sell 100 shares, 50 being from your purchase several years ago and 50 from your purchase 3 months ago, then you would pay long term capital gains on 50 shares and short term capital gains on the other 50.

  • Unfortunately, this answer is mostly wrong. In the first scenario, you do have long-term capital gains, but buying replacement shares at a lower price within 30 days does not trigger the wash sale rule of "essentially does not count". The wash sale rules apply if you sell for a loss and then repurchase the shares: the loss is not deductible. In the first scenario, the sale is not for a loss. In the second scenario, selling the first 100 shares could be for a long-term capital loss and if the repurchase was withing 30 days, the wash sale rules could make the loss non-deductible. Nov 29, 2012 at 16:59

You must log in to answer this question.

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