Can I withdraw from brokerage tax-free using standard deduction and 0% capital gains?

So I've been trying to figure out if I can withdraw from brokerage tax-free using standard deduction and 0% capital gains together. My situation: I'm single, retired early, living off savings. My only income this year is from selling some index fund shares I've held over 5 years. I pulled up the Schedule D instructions and I know there's a 0% long-term capital gains bracket, and I also know the standard deduction reduces my taxable income. What I can't figure out is whether these two things stack the way I think they do — like, does the standard deduction come off first and then the 0% bracket applies to whatever's left? I tried reading Publication 550 and Topic 409 but neither one spells out the interaction clearly. No other income, no dividends, nothing. Am I missing something that would mess this up?

34 comments

Retired a few years ago and worked through exactly this. The standard deduction does come off your gross income first to get to taxable income, and then the 0% long-term capital gains rate applies to however much of that taxable income falls within the 0% threshold. So yes, they stack. The rate bracket thresholds are in the Schedule D Tax Worksheet in the Schedule D instructions — they adjust each year so check the current year's version rather than relying on any number someone posts here.

Derek S.

Author

Next step I'm on: pulling the Schedule D Tax Worksheet now. This is what I needed to hear — that the deduction comes first. Thank you.

Worth being careful about one thing: if you have any qualified dividends in that brokerage account, they go into the same 0% bucket as your long-term gains. They don't displace the gains but they do use up the room in the bracket. Worth zeroing out dividends in the account or using a fund that minimizes them if you're trying to maximize how much gain fits at 0%.

Derek S.

Author

No dividends this year, I specifically moved to a fund that doesn't distribute much. Good point though for future years.

This is correct and something a lot of people miss. The qualified dividends and long-term capital gains share the same preferential rate layer. The unqualified ordinary income, if any, fills the bracket from the bottom first.

I ran this same scenario last year — single filer, only long-term gains from an index fund sale. I uploaded my draft 1040 and my 1099-B to taxr.ai and it walked through how the Schedule D Tax Worksheet actually stacks the standard deduction against my gains, then flagged that my state would still tax the gain even though federal came out at zero. That state piece was what I'd completely missed. Worth checking your state's rules separately because the federal 0% doesn't carry over automatically.

Derek S.

Author

State piece is a good catch. I'm in a state with a flat income tax so I need to look at how they treat capital gains specifically.

Some states don't have a preferential rate for capital gains at all — they just tax it as ordinary income at the state rate. Definitely state-specific.

The mechanics work like this on the actual return: your long-term gains flow from Form 8949 to Schedule D, then to line 7a of Form 1040 as part of total income. The standard deduction brings that down to taxable income on line 15. Then the Schedule D Tax Worksheet (not the regular tax table) figures your actual tax using the 0% rate on the portion of gains that falls in the 0% bracket. The key is you use the Tax Worksheet, not the tax table, when you have qualified dividends or long-term capital gains.

Derek S.

Author

Next step I'm on: I see Form 8949 feeds the long-term lines 8b–10 of Schedule D, which then flows to Form 1040 line 7a, got it. I'll make sure my software uses the Tax Worksheet and not the table.

My returns this year were entirely long-term gains, similar situation. One thing that tripped me up: short-term gains are taxed as ordinary income and do NOT get the 0% rate. So if you have any short-term sales mixed in, those eat into your standard deduction headroom before the preferential rate kicks in. Check your holding periods carefully — the IRS counts starting the day after you bought, and the sale date counts as a disposal day.

For inherited shares just want to flag for anyone reading: inherited stock is automatically long-term regardless of how long the estate or beneficiary held it, per Publication 550 (the one exception is property from someone who died in 2010 whose executor elected to file Form 8939). That doesn't apply to your situation OP but it's a common question in these threads.

I realized after I filed last year that I had sold some shares in December and bought very similar ones in January — triggered wash sale rules even on gains? No wait, wash sales only apply to losses. I confused myself. Carry on.

Wash sale rules only apply when you sell at a loss and repurchase substantially identical securities within 30 days before or after. Gains aren't affected by wash sale rules at all.

Yeah I figured that out after I posted, was second-guessing myself. The loss disallowance was what I was thinking of.

I had Taxr read through my 1099-B and my draft Schedule D side by side when I was planning this exact withdrawal strategy. It put together a summary of which lots were long-term vs short-term and estimated how much room I had left in the 0% bracket after accounting for my standard deduction. Helped me decide how many shares to sell in December vs waiting until January to split across two tax years. Really useful for the planning side.

Derek S.

Author

Splitting across two years is clever. I hadn't thought about that as a tool — if I'm close to the edge of the 0% bracket, spreading the sales across December and January could keep me under it both years.

Does the Net Investment Income Tax (NIIT) complicate this at all? I know there's a surtax on investment income above certain income thresholds. If your total income is low enough to be in the 0% capital gains bracket, you're probably well under the NIIT threshold too — but worth confirming in the instructions because the threshold and the capital gains rate bracket are separate calculations.

Correct — the NIIT is figured separately on Form 8960 and uses a different income threshold than the capital gains rate brackets. At the income levels where you'd be in the 0% capital gains bracket, you are almost certainly below the NIIT threshold as well, but confirm with the Form 8960 instructions for your filing status.

What software are most people using to run this? I've been doing it manually with the worksheet but I keep second-guessing whether the program is using the Tax Worksheet or just the tax table lookup.

Most major programs use the Tax Worksheet automatically when there are long-term gains or qualified dividends. You can usually find it in the "tax computation" section of the forms view to confirm it's there and not a table lookup.

Next step I'm on: checking the forms view in my software. I didn't know that section existed, good tip.

Worth noting: if you have any carryover losses from prior years, those offset your gains before the 0% rate calculation. So a $10k gain reduced to $7k by a carryover only uses $7k of your 0% bracket room. The carryover goes on Schedule D and the worksheet handles it automatically, but keep track of your carryovers from year to year with the Capital Loss Carryover Worksheet in Publication 550 or the Schedule D instructions.

Derek S.

Author

No carryover losses for me but that's a helpful detail — the carryover reduces the gain that hits the worksheet.

I want to make sure one point is clear for anyone reading: the 0% rate only applies to the portion of your taxable income that falls within the 0% threshold. If your gains push taxable income above the threshold, only the amount above it gets taxed at the higher rate. It's not a cliff where going $1 over the threshold taxes everything at 15%. The Schedule D Tax Worksheet handles this automatically.

Retired two years ago and have been doing this exact thing. What I'd add: look at whether your brokerage account generates any interest income from cash sweeps or money market funds. That income is ordinary income, not capital gains, and it stacks on top of your gains taking up standard deduction room before the preferential rates even apply. I moved my cash to T-bills instead, which still produce interest but let me manage the timing better.

Derek S.

Author

Cash sweep interest is something I didn't even think about. I have some cash sitting in a default sweep account. Need to check what it's generating.

Next step I'm on: looking at whether the sweep is a money market fund (ordinary dividends) or something else. The 1099-INT or 1099-DIV from your broker will show it.

Covered securities sold from a brokerage account will come on a 1099-B with cost basis reported to the IRS. Those go in Part II of Form 8949 (long-term) with box D checked, since basis is reported. Under Exception 1 in the Form 8949 instructions, if there are no adjustments needed, long-term transactions with basis reported can go straight to Schedule D line 8a — you don't have to list every lot separately on 8949 in that case.

This is correct, with long-term ones going on line 8a (line 1a is for short-term). Exception 1 is a real time-saver for a simple situation with clean 1099-B data and no wash sales or basis corrections.

Went back and looked at my own return from last year after reading this thread. I had forgotten that I'd done a small sale in February that was technically short-term (bought the prior March). The gain was small but it was ordinary and took up some of my deduction room. The holding period really matters — the day after purchase through the trade date of the sale, per Publication 550.

Something worth checking if you're doing this for years to come: ACA marketplace insurance subsidies (the Premium Tax Credit) are based on your modified adjusted gross income, and capital gains count in that calculation even if they come out at 0% federal tax. If you're using marketplace coverage in early retirement, gaining too much income can claw back subsidies. That's a whole separate calculation from the capital gains tax itself.

Derek S.

Author

I'm on Medicare so not an issue for me, but this is exactly the kind of thing someone doing this younger needs to know. Good flag.

Yeah Medicare makes it cleaner. For anyone under 65 on a marketplace plan this interaction is real and can be significant — worth modeling before you sell.