If I sell stocks and bonds and have a capital gain, and rebuy different stocks within a certain time frame, will I still be paying the capital gains tax from the original sale? ( just want to change my portfolio Thanks

  • 3
    What country are you in? What kind of account are you trading in? Commented Dec 8, 2011 at 3:06

4 Answers 4


Yes- you do not realize gains or losses until you actually sell the stock. After you sell the initial stocks/bonds you have realized the gain. When you buy the new, different stocks you haven't realized anything until you then sell those.

There is one exception to this, called the "Wash-Sale Rule". From Investopedia.com:

With the wash-sale rule, the IRS disallows a loss deduction from the sale of a security if a ‘substantially identical security' was purchased within 30 days before or after the sale. The wash-sale period is actually 61 days, consisting of the 30 days before and the 30 days after the date of the sale. For example, if you bought 100 shares of IBM on December 1 and then sold 100 shares of IBM on December 15 at a loss, the loss deduction would not be allowed. Similarly, selling IBM on December 15 and then buying it back on January 10 of the following year does not permit a deduction. The wash-sale rule is designed to prevent investors from making trades for the sole purpose of avoiding taxes.

  • While this is accurate, I think it's a bit misleading - if you buy stock on 12/1 and sell it on 12/15 at a loss, you can claim the deduction from the loss - it's just a short-term loss and that's fine. It's designed more to prevent people from selling (at a loss) and immediately re-buying a stock right at year end, counting the loss as a deduction (though they're essentially lowering their cost basis, meaning they'll just pay the same taxes later).
    – SqlRyan
    Commented Dec 8, 2011 at 4:37
  • @SqlRyan - in your example, a broker may very well report this as a wash sale which only is avoided with the passing of 30 days, i.e. 1/15. I personally find this a bit convoluted, my own claim is that a buy/sell isn't a wash unless the new purchase is made, but it's a matter of semantics, I recognize when actual wash sales occur. Commented Mar 28, 2013 at 3:07

Yes. As long as the stock is in a taxable account (i.e. not a tax deferred retirement account) you'll pay gain on the profit regardless of subsequent purchases.

If the sale is a loss, however, you'll risk delaying the claim for the loss if you repurchase identical shares within 30 days of that sale. This is called a wash sale.


Yes (most likely). If you are exchanging investments for cash, you will have to pay tax on that - disregarding capital losses, capital loss carryovers, AGI thresholds, and other special rules (which there is no indication of in your question). You will have to calculate the gain on Schedule D, and report that as income on your 1040. This is the case whether you buy different or same stocks.

  • No, this is not the case if you buy the same kind of stock (including the same stock), within 30 days before or after the sale, if the sale was at loss.
    – littleadv
    Commented Dec 8, 2011 at 1:33
  • 2
    You are correct; there is a "wash sale" rule that applies to capital losses. But OP gives no indication of that in his question.
    – Daniel
    Commented Dec 8, 2011 at 13:53

Probably. It sounds like you're looking for a 1031-exchange for stocks and bonds. From the wikipedia page for 1031-exchanges:

To qualify for Section 1031 of the Internal Revenue Code, the properties exchanged must be held for productive use in a trade or business or for investment. Stocks, bonds, and other properties are listed as expressly excluded by Section 1031 of the Internal Revenue Code, though securitized properties are not excluded.

1031-exchanges usually are applicable in real estate.

You must log in to answer this question.

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