<prompt> Human: Have a 1 month old. I opened a 529 with gift money from grandparents. Ive set up monthly contributions as well. I have some stock that I could sell for a decent profit. I know Id be paying capital gains on that. But are there not some situations where if you roll the profit into another type of investment account, you dont pay the taxes? Thanks!  <response>: You will owe capital gains tax on whatever profit you get from the sale. 529s are tax deferred, but are funded with after tax money. 