Selling brokerage investments to fund 529 — can I avoid capital gains tax?
We have two kids starting college in the next few years and I want to liquidate part of a taxable brokerage account to fully fund their 529s. The holdings have appreciated a lot — some positions I've held for 6+ years, some I bought last year. My tax software is already showing a big number on Schedule D and I'm wondering if there's a way to structure this to avoid or at least reduce the capital gains tax. I've read vague things about "gifting" shares or timing the sales around income, but nothing concrete. For context we file jointly, one income this year. Is there any legal way to reduce what I owe when selling brokerage investments to fund 529 contributions, or is a capital gain just a capital gain no matter what you do with the proceeds?