If I have 100 shares of stock A bought at $10 ($1000), then if I sell it a year later at $20 I have to pay long term capital gain at 20% which means I have only $1600 (100 sh * $20 = $2000 - $400 tax) to buy stock B.
All depends on how much stock A goes up vs stock B. If stock B goes up a lot more than stock A then you make more money by selling A to buy B, if B only goes up slightly more than A then it might be better to keep stock A.
This only comes up with taxable account, not 401k or IRA of any kind.
Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.