Should I sell taxable investments for college and move them to a 529?

We have about 8 years until our oldest starts college. Right now we have a decent chunk sitting in a taxable brokerage — a mix of ETFs we've held for several years, all with significant gains. Someone at work said we should sell taxable investments for college and move them to a 529 to get the state tax deduction going forward. I ran some numbers but I'm stuck on the capital gains piece. The ETFs are all long-term holds. I guess my question is whether the tax hit on selling now is actually worth it compared to just leaving them in the brokerage and paying for college from there, or doing both. Has anyone actually worked through this math? Our state does offer a 529 deduction but I don't know the annual limit off the top of my head.

36 comments

What state are you in? That matters a lot here. Some states let you deduct contributions up to a pretty generous cap, others give you nothing, and a few states let you contribute and immediately withdraw for a prior-year deduction which changes the calculus entirely.

Raj C.

Author

We're in a state with a deduction, I just don't know the exact cap. I'll look it up. But yeah I figured state rules would matter.

Worth thinking through the federal capital gains side carefully before you move anything. When I was in almost this exact spot I uploaded my 1099-B and my brokerage's gain/loss summary to taxr.ai and had Taxr estimate what my actual federal tax hit would be on each lot if I sold, then rank the lots by tax cost per dollar moved. That list made it really obvious which ones to sell first and which to leave alone. Your rate on the long-term gains depends on your taxable income that year — the Instructions for Schedule D walk through the Qualified Dividends and Capital Gain Tax Worksheet if you want to do it by hand.

Raj C.

Author

This is exactly the approach I needed. I hadn't thought about ranking lots by tax cost — obviously selling the ones with the smallest embedded gain first makes more sense. I'll try that before I do anything.

The lot-by-lot point is real. I had two funds that looked similar but one had twice the embedded gain per share. Would have been a bad move to sell the wrong one first.

Are you factoring in that the 529 earnings grow federal income-tax-free when used for qualified education expenses? That's the main long-run argument for moving money there. The deduction is nice but the tax-free growth over 8 years is usually the bigger number.

Raj C.

Author

I actually hadn't put a number on the tax-free growth piece. That's probably the stronger argument than the state deduction alone.

Have you checked whether your state has recapture rules? A handful of states will claw back the deduction if you roll the money out or change beneficiaries in a way they don't like. Worth reading your state's 529 plan disclosure before you assume the deduction is clean.

One thing I'd flag: if you sell now and your gains push you into a higher bracket for that year, your long-term rate could change on other income too. The Qualified Dividends and Capital Gain Tax Worksheet on Schedule D is the place to see this — it stacks ordinary income first, then long-term gains on top. So a big sale can move more of your gains into a higher rate band than you'd expect from looking at a bracket chart alone.

This is the part most people miss. The stacking order matters. I sold a large lot one year thinking I was safely in the 0% long-term band and ended up with a chunk taxed at the next rate because my ordinary income was higher than I'd estimated.

Raj C.

Author

Okay this stacking thing I genuinely did not understand. So I need to actually run the whole worksheet, not just look at where my income falls on a bracket table. Got it.

Does your brokerage let you do specific lot identification? If so you can cherry-pick the lots with the smallest gains, pay the least tax now, and leave the high-gain lots in the taxable account to either hold longer or donate later if that ever makes sense for you.

Raj C.

Author

Yes they do, I've used it before for tax-loss harvesting. Good reminder that I can apply the same logic here.

Eight years is a decent runway but not unlimited. I'd think hard about what happens if markets drop significantly two or three years before you need the money — in a 529 you control the asset allocation, in a taxable brokerage you can also do that, so the account type itself isn't the risk difference. The real difference is the tax treatment on the way out. When I was sorting through this last year I gave Taxr my Schedule D draft and the projected sale amounts and had it check whether my column (g) adjustments on Form 8949 were right for the lots I was planning to sell. Caught an error in how I'd carried forward a wash sale code from the prior year.

The wash sale carryforward thing is easy to mess up. If you triggered a wash sale in December and bought back in January the disallowed loss attaches to the new lot's basis and shifts its holding period — a lot of people just drop it.

Raj C.

Author

I haven't had any wash sales in these particular lots so I think I'm okay there, but good to know for future.

What's your plan if your child ends up not going to college, or gets a full scholarship? The 529 rules on non-qualified withdrawals mean the earnings portion gets taxed as ordinary income plus a penalty. Worth having an answer to that before you lock a lot of money in there.

There are some outs — transferring to another beneficiary, rolling a limited amount to a Roth IRA for the beneficiary under rules that started in 2024, or just sitting on it for graduate school. But you're right that it's not as flexible as a brokerage account.

Raj C.

Author

We have two more kids so worst case we'd shift the beneficiary. But I hadn't thought through the Roth rollover option, I'll look at that too.

Curious whether anyone here has actually compared holding the taxable account through college and just paying capital gains at sale versus the 529 route. For someone in the 0% long-term rate that year — which is possible if income is lower — the taxable account might not cost much in federal tax at all.

That's actually a real scenario. If the year you need the money your income is low enough, the federal rate on long-term gains could be zero. The break-even versus a 529 flips pretty fast in that case. The Qualified Dividends and Capital Gain Tax Worksheet is where you see how the rates apply to that year's income, so run it with the actual numbers rather than a dollar figure that could go stale.

Are you in a community property state? That can affect how joint brokerage accounts are treated for basis purposes if you ever inherit the shares or gift them, though for the sell-and-move question it's probably not the main issue.

Don't overlook the step-up in basis question either. If those long-term ETFs stay in your taxable account and you never sell them, whoever inherits them gets a basis stepped up to fair market value at death. That embedded gain could disappear entirely. Moving them to a 529 means you pay tax on the gain now and give up that potential step-up. For an 8-year college horizon that's probably not the driving factor, but for gains you might not need for college it's worth noting.

This is a real consideration for the high-gain lots specifically. If you have some lots with enormous gains that you realistically might not need for college, holding them in taxable and earmarking other funds for 529 contributions could make more sense.

Raj C.

Author

This is new information for me. I didn't know the step-up applied to ETFs held in a regular brokerage the same way. So the high-gain lots might actually be the ones I should leave alone.

What does your state actually give you for the 529 deduction — is it a deduction or a credit? Credits are dollar-for-dollar off your state tax, deductions just reduce your state taxable income. The value is very different depending on which one your state uses.

Good distinction. Some states also let you deduct contributions to any state's plan, others only their own. If your state only allows its own plan, make sure you're looking at that plan's investment options too — they vary a lot in fees.

How much are we talking roughly? The answer honestly changes if the gains are modest versus very large. A smaller gain might be almost painless to realize now; a large one might take years to recoup through 529 tax-free growth, especially if the state deduction cap is low.

Raj C.

Author

Gains are meaningful — probably closer to the larger end. Which is part of why I'm hesitating to just sell everything at once.

Worth running the scenario where you do it over multiple years rather than all at once. You could sell enough each year to stay within a comfortable rate band, contribute to the 529 each year, and spread the tax hit over 3 or 4 years instead of taking it all in one.

Multi-year spreading is usually the right move for large embedded gains. It also gives you flexibility to pause if something changes — income spike, job change, whatever.

Raj C.

Author

This is probably what we'll actually do. Sell the low-gain lots first this year, see where we land, and revisit next year.

Any lots you're close to crossing the one-year mark on deserve a careful look, and Publication 550 on irs.gov has a solid section on holding periods that's useful here. Short-term gains are taxed as ordinary income, so if you're 10 months into a position, waiting until you've held it more than one year — a little past two more months, not exactly two — to sell changes the rate entirely.

For the holding period: the count starts the day after you bought and includes the day you sold, based on trade date not settlement date, per Publication 550. Easy to be off by a day or two if you're counting manually.

Are you working with a financial planner or CPA on this? The interaction between state deductions, federal capital gains, your overall income picture and the 529 rules is genuinely complicated enough that for large amounts it's worth an hour with a fee-only CPA or CFP who can model the actual numbers for your situation.

Raj C.

Author

Not currently, but I think you're right. I wanted to understand the structure first so I'm not walking in cold, but yeah, for the actual decision I'll probably get a CPA involved.