Should I sell brokerage investments or save in a HYSA to fund next year's Roth IRA?

Trying to figure out the best way to fund my Roth IRA contribution for next year. I have two options sitting in front of me: I could sell some brokerage investments (a mix of positions, some with gains, some roughly flat) or I could just keep parking money in my HYSA and use that cash. The HYSA is earning decent interest but it's not doing anything special. The brokerage positions have been held over a year so they'd be long-term if I sold now. I already maxed this year's contribution from cash on hand. My concern with selling is capital gains tax eating into what I actually deposit. With the HYSA route I lose the compounding but avoid any tax event. Is there a framework for thinking about sell brokerage investments or save in HYSA to fund next year's Roth IRA that actually accounts for the tax side?

33 comments

The core tradeoff is pretty straightforward: selling long-term brokerage positions triggers a capital gains event reported on Form 8949 (Part II, since they're long-term) and flows to Schedule D. The tax you owe on the gain reduces the net amount available to deposit. HYSA interest hits as ordinary income regardless (on Form 1040 line 2b, with Schedule B only needed if your taxable interest is over $1,500), but no basis or holding period to track. If your brokerage positions are sitting at a small gain or near flat, the tax drag on selling is minimal and you get the money into the Roth where future growth is sheltered. If the unrealized gain is large, the tax bill on selling could exceed what you'd lose keeping money in the HYSA for another year. The actual rates depend on your taxable income for the year — IRS Topic 409 covers the long-term capital gains rate tiers without locking you into a number before you know your full-year income.

Matt A.

Author

This is the framing I needed. My gains are modest on the positions I was considering, so the tax drag might actually be small enough that selling makes sense. I'll pull up Schedule D and run the numbers before I decide.

One angle people skip: if you have any positions sitting at a loss in the brokerage, you could harvest those losses to offset the gains on the positions you sell for Roth funding. Net it out on Form 8949 and Schedule D — losses in the same holding-period bucket offset gains first, then excess short-term loss offsets long-term gain. Just watch the wash sale rules if you plan to rebuy anything similar within 30 days before or after the sale. A disallowed loss gets code W on Form 8949 column (f) and the loss amount as a positive number in column (g), which means you don't get the offset you were counting on.

Matt A.

Author

Do the wash sale rules apply if I sell in the brokerage and don't rebuy there but my spouse buys the same stock in her account?

Yes — a wash sale also occurs if your spouse buys substantially identical stock within that 30-day window, or if a corporation you control does. The disallowed loss gets added to the cost basis of her new shares rather than yours, but you still can't claim it currently. Publication 550 covers this under the Wash Sales chapter.

HYSA interest is just ordinary income. You're paying your marginal rate on every dollar it earns, every year, and you can't shelter it. At least gains on appreciated stock held over a year get long-term treatment, which for most people is a lower rate than ordinary income. So from a pure tax-efficiency angle, the HYSA isn't some neutral safe harbor — it has its own tax cost.

This flipped how I was thinking about it. I always treated HYSA as the "no tax event" option but you're right, the interest is taxable each year whether you use it for the Roth or not.

I ran into almost this exact decision last spring. Had a taxable brokerage with a mix of long-term positions and wasn't sure which ones to sell or whether the gains would blow up my tax picture. I uploaded my year-end brokerage statement and my draft 1099-B to taxr.ai and Taxr flagged which positions had the smallest gain-to-proceeds ratio, estimated the Schedule D impact, and laid out what the net deposit into the Roth would look like after the estimated tax. Made the sell-or-hold call a lot easier when I could see the actual after-tax numbers position by position. End result: I sold the two flattest positions, kept the big winner, and funded the Roth fully from proceeds plus a small top-up from cash. No surprises on the return.

Matt A.

Author

Which line on the 1099-B were you mainly looking at to gauge the gain? Box 1d proceeds minus box 1e cost basis?

Exactly that. Box 1d minus 1e gives you the raw gain, and box 1b tells you the acquisition date so you can confirm long-term treatment. Box 1g shows a wash sale loss disallowed only when the shares were covered securities and the replacement shares had the same CUSIP and were bought in the same account. Purchases in another account, your IRA or Roth IRA, or by your spouse won't show there but still count, so check those yourself before you decide.

Worth knowing: if you have positions where the 1099-B will show basis NOT reported to the IRS (box B or E on Form 8949), your broker didn't track cost basis and you have to supply the correct number yourself in column (e). That's common for older positions or anything transferred between brokers without a full basis transfer. Selling those without knowing your real basis is risky — you could report a bigger gain than you actually have.

How do you figure out the correct basis if the broker never tracked it?

You go back to the original purchase confirmations, statements, or any DRIP records if it was a dividend reinvestment plan. Each reinvested dividend creates its own lot with its own basis and holding period. Publication 551 on the IRS site covers basis of assets and walks through how to reconstruct it.

The Roth angle matters too. Whatever you contribute goes in after-tax, grows tax-free, and qualified distributions are tax-free. So the question isn't just "what's the tax cost to fund it" but "how many years does that money compound inside the Roth before you need it." If you're decades from retirement, paying a little capital gains tax now to get money into the Roth earlier can easily come out ahead.

Losses in excess of gains can only be deducted against ordinary income up to the limit per year with the rest carrying forward — the specific limit is on Schedule D line 16 and then line 7a of Form 1040. So if you're harvesting losses to offset gains for this Roth funding plan, make sure you're not generating so much net loss that you're stuck with a multi-year carryforward when you could have just used the HYSA cash.

The carryforward itself isn't bad if you have future gains to absorb it. But you're right that harvesting more loss than you can use in one year doesn't accelerate any benefit — it just shifts it.

Had a similar question about whether selling some ETF positions would create a wash sale problem since I hold the same ETF in my Roth IRA. Turns out if you sell at a loss in the brokerage and within 30 days your Roth IRA acquires substantially identical shares, it's still a wash sale — but the disallowed loss doesn't get added to the Roth IRA's basis. It's just gone. I gave Taxr my brokerage transaction history and the Roth contribution records and it flagged two transactions I hadn't noticed were within the 30-day window and explained what code W would do to those lines on Form 8949.

Matt A.

Author

Wait, the loss is permanently lost if the wash sale purchase is inside the Roth?

Yes, that's the rule. When the substantially identical stock is acquired inside an IRA or Roth IRA, the disallowed loss can't be added to the new shares' basis because the IRA doesn't track basis that way. Publication 550's Wash Sales chapter spells this out specifically. It's one of the nastier traps in this whole sell-to-fund-Roth strategy.

Something to double-check before you sell: are any of your brokerage positions ISOs you exercised and haven't sold yet? Those have their own rules — no regular income at exercise but there's a Form 6251 AMT adjustment based on the spread. Selling those in the same year you exercised avoids the AMT adjustment but changes your holding period treatment. If you exercised in a prior year they're already past the AMT event.

The practical calendar piece: Roth IRA contributions for a given tax year can be made up until the tax filing deadline, not just December 31. So you're not necessarily racing against year-end to liquidate. That gives you more time to pick the right moment to sell if you want to manage which tax year the gain lands in.

Does that mean you could technically sell in January, recognize the gain in the new tax year, and still apply the contribution to the prior year's Roth limit?

Exactly right. The gain from the sale is a 2026 tax event if you sell in 2026, but you can designate the Roth contribution as a 2025 contribution if you make it before the 2025 return's due date. The two events are on separate tax years. That's actually a useful split if you're close to a rate threshold in the current year.

One scenario that changes the math: if your brokerage positions are in a taxable account and you're planning to eventually donate some of them, appreciated long-term stock donated directly to a qualified charity lets you avoid recognizing the gain entirely while deducting the fair market value. That's not a tax strategy for Roth funding directly, but if you were going to give anyway, you'd free up cash for the Roth without the capital gains hit.

Came back to flag a small error above — someone said the carryforward limit is on Schedule D line 16 going to Form 1040 line 7a, which is right, but to be precise: the deductible loss is the lesser of the Schedule D net loss or the annual limit ($3,000, or $1,500 if married filing separately), and the carryforward is figured using the Capital Loss Carryover Worksheet in Publication 550 or the Schedule D instructions. The limits are fixed numbers so I can state them here: $3,000 and $1,500 MFS.

Thanks for the precision. I had the lines right but didn't spell out the actual amounts or the MFS difference.

For what it's worth I had Taxr read through my 1099-B alongside my Schedule D draft last filing season. It cross-checked every short-term and long-term bucket, caught that one position was coded box B (basis not reported to the IRS) when I'd entered it as box A, and listed the specific column (e) and (g) adjustments I needed to make on Form 8949. Saved me from filing with the wrong box checked on Part I. For the sell-or-HYSA decision specifically, being sure your Form 8949 entries are right matters a lot — a wrong box means the IRS may not have matching basis data, which can trigger a notice.

Matt A.

Author

Which notice does a mismatched 1099-B box usually trigger?

Usually a CP2000, which proposes additional tax based on the proceeds reported without any basis subtracted. The IRS sees the gross 1099-B proceeds, doesn't have a matching basis on file, and assumes the whole amount is gain. You can respond with the correct basis but it's a lot easier to get the Form 8949 box right the first time.

If you're near the top of a long-term capital gains rate bracket, selling a large position in a single year could push some of the gain into the next rate tier. Splitting the sale across two tax years — partial sale this year, partial next — might keep more of the gain taxed at the lower tier. The thresholds depend on taxable income for the year, so IRS Topic 409 is the right place to check the current-year brackets before you pull the trigger.

The HYSA interest point is real but also: HYSA rates change. If rates drop between now and when you plan to fund the Roth, the "let it accumulate" strategy earns less than you modeled. Brokerage positions at least track the market. Neither is a sure thing, which is why the tax calculation is usually the more controllable variable in this decision.

To summarize the framework as I understand it from this thread: (1) identify which positions are long-term on the 1099-B; (2) estimate the gain per position using boxes 1d minus 1e; (3) check for any wash sale exposure, especially if you hold similar securities in an IRA; (4) net gains and losses on Schedule D to find actual tax cost; (5) compare that tax cost to what you'd pay in ordinary income tax on HYSA interest you'd earn over the same period; (6) pick the lower-tax path, keeping the Roth contribution deadline in mind so you don't have to do it all in December.

Matt A.

Author

This is exactly the checklist I was missing. Step 3 is the one I would have skipped without this thread — I do hold a similar ETF in my Roth and would have been trading in and out without thinking about the 30-day window.