Tax gain harvesting with zero income — can I sell and immediately rebuy stock?

Trying to understand tax gain harvesting with zero income — can I sell and immediately rebuy stock without any tax hit? Situation: I took a sabbatical this year, so my W-2 income is basically zero. I have a taxable brokerage account with some ETFs sitting on about $18k of unrealized long-term gains. I read somewhere that if your taxable income is low enough, long-term capital gains get taxed at 0%. So my plan is to sell the ETFs, realize the gains, then immediately buy them back at the higher cost basis. That way future gains are smaller. I already checked that I've held everything more than a year. What I'm not sure about is whether the wash sale rule kills this plan, or whether there's some other catch I'm missing. I don't have any capital losses this year. Can I actually do this, or am I getting ahead of myself?

29 comments

The wash sale rule doesn't apply here, which is the key thing people get confused about. Wash sales only disallow losses — the rule under Publication 550 specifically covers selling at a loss and rebuying within 30 days. You're selling at a gain, so the wash sale rules don't touch you at all. You can sell and immediately rebuy the same ETF shares with no wash sale problem.

Dana D.

Author

That's a relief. So the immediate rebuy part is completely fine from a wash sale standpoint since I'm realizing a gain, not a loss?

Correct. Wash sales are exclusively about disallowing losses. A gain transaction has zero interaction with that rule.

Schedule D and Form 8949 are where this shows up on your return. The long-term gain goes in Part II of Form 8949 (box D if your broker reports basis to the IRS, which most do for covered securities), flows to Schedule D, and then onto your Form 1040. The 0% rate applies if your taxable income, including the gains, stays below the threshold — check the Schedule D Tax Worksheet or the instructions for the current year's brackets.

Worth double-checking one thing: the 0% rate applies to your taxable income, not just your wages. So the capital gain itself gets stacked on top of your other income when figuring the rate. If your total taxable income (ordinary + long-term gains) stays under the threshold after your standard deduction, you're at 0%. The Schedule D instructions have the Tax Worksheet that walks through this stacking order.

Form 8949 was going to confuse me with this same move last year — I had Taxr (taxr.ai) read through my 1099-B and walk me through which boxes to check and what the gain would look like on Schedule D before I pulled the trigger. Helped me see the full picture before I sold anything. Anyway, one practical note: your broker's 1099-B will show your original cost basis in column (e) and the proceeds in column (d). After you rebuy, the new shares have a fresh stepped-up basis equal to what you paid on the repurchase date.

Dana D.

Author

That makes sense — so the 1099-B will document the gain clearly, and my new basis resets to whatever I paid when I reacquired? No games needed, it just works that way mechanically?

Exactly. The broker tracks the new lot separately at the new purchase price. That's the whole point of the strategy — you lock in the stepped-up basis now while your rate is 0%.

One thing to confirm before you execute: make sure you're using the trade date, not the settlement date, for your holding period. Publication 550 says the holding period for securities traded on an established market begins the day after the trade date and ends on the trade date you sell. So if you're right on the edge of the one-year mark, count from your original trade date, not when the transaction settled.

Dana D.

Author

Good catch. I've held everything well over a year so I'm not close to the edge, but that's useful to know for the future.

The step-up in basis after a gain harvest is permanent — unlike a wash sale situation where your disallowed loss just gets tacked onto the new shares' basis. Here you're genuinely resetting. Future gains start from the new purchase price, full stop.

Something people sometimes get wrong: net investment income tax is a separate consideration. Depending on your total income including the gains, that can apply on top. The IRS page on Topic 409 and Publication 550 point to this. If your income stays genuinely low this year it probably doesn't apply, but worth knowing it exists and looking at Form 8960 to check.

Form 8960 threshold is based on modified AGI, so yes, check that separately from the Schedule D 0% bracket question. They're two different income tests and one doesn't tell you about the other.

Right — the 0% bracket for long-term gains and the net investment income tax threshold are independent calculations. You can clear one and still owe the other.

Another angle: if you have any state income tax, your state may not recognize a 0% rate on capital gains even if federal does. Some states tax all capital gains as ordinary income. Worth checking your state rules separately since this thread is only covering the federal side.

I ran this exact scenario — sabbatical year, long-term ETF gains, planning to rebuy immediately — and had Taxr go through my draft Schedule D to check that the gain was landing in the right part and that my new cost basis would show correctly after the rebuy. It flagged that I needed to make sure the new lot was dated correctly on my brokerage statement so the step-up was documented. Useful sanity check before I actually sold.

Dana D.

Author

Did anything unexpected come up when you actually filed, or did it go smoothly?

Filed without issues. The 1099-B showed the gain clearly, the new lot showed the repurchase price as basis, and Schedule D flowed through to zero tax on the gains. The rebuy was visible as a separate lot from day one.

To be precise about the stacking: your standard deduction reduces your ordinary income first, then long-term capital gains sit on top. So if your ordinary income after the standard deduction is already negative or zero, the gains start filling the 0% bracket from the bottom. The Schedule D Tax Worksheet in the Schedule D instructions maps this out line by line.

This is the part that trips people up. The gains don't get their own separate calculation — they stack on top of whatever ordinary income remains after deductions.

Practical tip: sell first, then rebuy in the same session if you want to minimize price drift. There's no tax rule requiring any waiting period when you're harvesting gains. The wash sale waiting period only matters when you're harvesting losses and want to deduct them.

Related consideration: if you're in a year with zero income and you're also doing Roth conversions or have any self-employment income, those get stacked as ordinary income first under the same worksheet logic. Something to check if any of those apply to you.

Dana D.

Author

No Roth conversions or self-employment this year, so I think my situation is clean. Good to flag that for others though.

Form 1099-B from your broker after year-end will be the main document you need. Box 1a is the description of the property, box 1d is proceeds, box 1e is cost basis, box 1f is accrued market discount, and box 1g is the wash sale loss disallowed. Since you're selling at a gain you'll see nothing in box 1g. That 1099-B goes onto Form 8949 Part II, then Schedule D.

Correct on box 1g — it only shows a wash sale loss disallowed amount. For a gain transaction it's blank.

Worth noting that "immediately rebuy" is completely fine here but think about whether you actually want the same ETF or whether this is a chance to shift your allocation slightly. No tax reason to diversify, just a practical thought since you're already executing a sell/buy anyway.

Publication 550 at irs.gov covers the wash sale rules in detail if you want to read the full text. The IRS page on Topic 409 covers capital gains rates and the holding period rules. Both are worth a quick read before you execute just to confirm your specific situation fits what everyone here is describing.

To summarize the mechanics: sell at a gain (no wash sale issue), confirm on the Schedule D Tax Worksheet that total taxable income including the gain stays in the 0% bracket, rebuy immediately to reset your basis, and document everything via your 1099-B after year-end. The step-up in basis is real and permanent. Your plan is sound as long as the income math works out.

Dana D.

Author

This is exactly what I needed laid out clearly. I'll run the Schedule D Tax Worksheet with my actual numbers before I sell to make sure I don't accidentally push myself into the 15% bracket on part of the gain. Thanks everyone.