I have a margin account for my stock trading.

I know capital gain from stocks held for more than one year is called long-term capital gain while capital gain from stocks held for less than one year is called short-term capital gain.

If I bought a stock at 100 dollars and sold it for 120 dollars two months later. Then, I used my original 100 dollars and the 20 dollars capital gain to buy another stock on the same day.

If I have never withdrawn the money from my brokerage account to my bank account, do I have to pay tax?

My question is that if the capital gain is never withdrawn, do I need to pay income tax? Or, do I just need to pay income tax when one day I finally withdraw cash from my account?

I am talking about this situation for a US citizen and income tax to IRS.

1 Answer 1


The IRS hears about when you sell a security, not when you move money around between your own accounts. The capital gain is realized when you sell, and that’s when you pay the tax. This is no different for short term gains, where you’ll pay the income tax rate, than for long term gains.

  • Is creating an IRA account a solution? Commented Apr 18, 2021 at 3:31
  • @jerryzhang Yes, this is one of the key advantages of either variety of IRA. Commented Apr 18, 2021 at 3:32
  • Thanks. Is traditional IRA or Roth IRA better for me in my situation? Commented Apr 18, 2021 at 3:42
  • @jerryzhang Well, that depends on your situation. I suggest you Google around a bit and do some of your own reading, there are hundreds of articles online by people who know much more about this than me. Commented Apr 18, 2021 at 4:37

You must log in to answer this question.

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