Can a married couple withdraw from 401k and brokerage tax-free at 0% capital gains?

My wife and I are both retiring early next year, no wages after that. We've been told we can live off our taxable brokerage account at 0% long-term capital gains and also pull from the 401k, but I'm not sure how those two interact on the same return. The brokerage throws off dividends and we'd sell positions we've held over a year. The 401k distributions would be ordinary income. Someone mentioned the 0% capital gains rate applies only if our total taxable income stays under a certain threshold, and that the 401k withdrawals count toward that total. Is that right? Can a married couple withdraw from 401k and brokerage tax-free at 0% capital gains in the same year if we plan the amounts carefully? We use Schedule D and Form 8949 for the brokerage side. Just trying to understand how these two income streams stack before I build a spreadsheet.

34 comments

You're right that the 401k distributions land as ordinary income first, and that matters a lot here. The 0% rate on long-term capital gains and qualified dividends applies only to the portion of your income that falls within the 0% bracket. The 401k withdrawals push the bottom of the stack up, leaving less room for the gains to sit at 0%. So yes, they interact directly on the same return and you have to plan both together, not separately.

Greg W.

Author

That's the piece I was missing. So the 401k income fills the lower brackets first and the gains sit on top of that stack. If the ordinary income already fills the 0% bracket zone, the gains get taxed at the next rate up even if the gains themselves are long-term.

We did exactly this planning two years ago. The key number to watch is your taxable income after the standard deduction, not your gross income. The standard deduction for married filing jointly reduces what you're working with before the stacking even starts. I'd build the spreadsheet around taxable income on line 15 of Form 1040, not the gross 401k and brokerage numbers.

Greg W.

Author

Good call on line 15. I was building it off gross and that was going to give me a wrong picture entirely.

Qualified dividends stack the same way as long-term gains for this purpose. They all sit on top of the ordinary income. Worth separating them in the spreadsheet so you can see the full picture.

I ran this exact scenario last filing season. I uploaded our draft 1040 and our brokerage statements to taxr.ai and it mapped out which income was ordinary and which was preferentially taxed, then showed me exactly where the stacking left us relative to the 0% threshold. That saved me from pulling too much from the 401k in December. The Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions is what actually computes whether you hit 0% or not — the rate doesn't appear on Schedule D itself.

Greg W.

Author

I didn't realize the rate is computed on a separate worksheet, not on Schedule D. That explains why my tax software didn't show a line that just said "0% rate."

That worksheet is the one buried in the Form 1040 instructions. A lot of people don't even know it exists because software runs it invisibly.

Worth noting that qualified distributions from a Roth 401k are a completely different animal — those don't count as ordinary income and don't push up the stack at all. If part of your 401k is Roth, that changes the math significantly. Traditional 401k distributions are fully ordinary income and do stack.

Greg W.

Author

Ours is all traditional so the full amount hits ordinary income. Good flag for anyone with a mix though.

One thing people get tripped up on: the 0% bracket isn't a fixed dollar amount that applies equally every year. The thresholds adjust annually. I'd point you to the Form 1040 instructions for the current year rather than any number floating around online, since people keep quoting old figures. The instructions walk through the worksheet computation step by step.

I pulled from my IRA and brokerage in the same year and underestimated how much the IRA distribution would crowd out the 0% room. Ended up with more of the gains taxed at 15% than I planned. Not catastrophic but it was avoidable. The fix going forward was running the worksheet before making any December distributions, not after.

That's the move. Run the worksheet in November or early December while you can still adjust the 401k withdrawal amount before year end.

Greg W.

Author

This is exactly the mistake I'm trying to avoid. I'll run the worksheet before we touch anything in December.

Also worth checking whether your dividends are actually qualified. Not all dividends reported on a 1099-DIV are qualified. Box 1a is total ordinary dividends, box 1b is the qualified portion. Only box 1b stacks with long-term gains at the preferential rates. If a fund pays a lot of non-qualified dividends those are ordinary income and also reduce your 0% room.

Foreign dividends especially can be non-qualified depending on the treaty situation. Worth checking box 1b against the fund's own year-end notice.

My situation last year was similar — retired couple, brokerage plus IRA draws. I used Taxr to check the stacking before we filed. I pasted in our 1099-DIV and 1099-B and it laid out the ordinary income layer and the preferential income layer separately, then flagged that we were about $800 of ordinary income away from pushing some gains to 15%. We adjusted the December IRA pull and stayed within the 0% range. The Qualified Dividends and Capital Gain Tax Worksheet is what it was checking against.

Greg W.

Author

Catching an $800 problem before filing is exactly what I need to do. I'll be doing the worksheet run in November.

Don't forget state taxes. A lot of states don't have a 0% rate on capital gains — they tax gains as ordinary income at the state level regardless of what the federal return shows. So even if you get to 0% federal, your state may still take a cut on the same gains.

Yes, this. Nine states have no income tax so it doesn't matter there, but most others will tax those gains. Very state-specific question.

Greg W.

Author

We're in a state with income tax so I need to run the state side separately. Good reminder.

The Form 8949 and Schedule D work is for reporting the brokerage transactions. You still have to report every covered and noncovered sale. The 0% rate doesn't mean you skip the reporting — it just means the tax on the net long-term gain comes out to zero when the worksheet runs. I see people think 0% means nothing to file and that's wrong.

Greg W.

Author

Understood. Everything still gets reported on Form 8949 and flows to Schedule D, the worksheet just results in zero tax owed on that portion.

The 401k side also has a withholding rule that can trip you up. The plan custodian is required to withhold 20% federal on distributions that are eligible rollover distributions, and you can't opt out of it. If you've planned to stay at 0% and they withhold 20%, you get a refund but you've lost the use of that money. A withholding election form won't reduce or waive that 20% even if you're confident you owe nothing; only a direct rollover avoids it.

We learned this the hard way. The 20% couldn't be waived, so we planned the following year's cash flow around getting it back as a refund and it made things much smoother.

Are you accounting for any Social Security income? Even if you're retiring early and might not be drawing Social Security yet, if you are, up to 85% of SS benefits can be included in gross income depending on your combined income, and that would be additional ordinary income pushing up the stack. Worth knowing for future years.

Greg W.

Author

Not drawing SS yet so it's not a factor this year, but good to flag for when we do start. That would change the whole calculation.

Publication 550 on irs.gov covers holding period rules in detail if you need to verify which of your positions are actually long-term. The holding period starts the day after you acquired the shares and includes the day you sell, with the trade date — not the settlement date — being what counts for securities on an established market.

The worksheet that actually computes the 0% vs 15% split is the Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions, not inside Schedule D itself. Schedule D just feeds the totals to that worksheet. If you're doing this by hand it's worth pulling the 1040 instructions specifically to get the right worksheet.

Correct. And tax software fills it out invisibly so a lot of people don't realize the computation is happening on a separate page. Worth running manually at least once to understand it.

If your capital gains planning gets complex — a lot of lots, different acquisition dates, some positions with carryover losses from prior years — it might be worth a session with a CPA or enrolled agent before year-end to run the numbers together. The worksheet math isn't hard but the basis tracking and loss carryover interaction can make the inputs messy.

Greg W.

Author

We do have a loss carryover from 2022 that I need to factor in. I'll probably take this to a CPA for the year-end session just to make sure the inputs are right before I make the final 401k pull.

Loss carryovers from prior years reduce your net capital gain on Schedule D, which can actually help you here — they reduce the taxable gain before the worksheet runs, leaving you more room at 0%. Topic 409 on irs.gov covers the carryover deduction rules and the interaction with the annual limit if losses exceed gains.

Greg W.

Author

So the carryover could actually work in our favor this year by reducing the net gain that needs to fit in the 0% room. That changes my spreadsheet significantly.