Tax gain harvesting at 0% rate — can I rebuy the same securities immediately?

Trying to do some tax gain harvesting this year while I'm in the 0% long-term capital gains bracket. The plan is to sell appreciated ETF shares, realize the gain tax-free, and then immediately repurchase the same shares to step up my cost basis. My broker's platform lets me do it in the same session. I know the wash sale rule exists but I always thought it only applied to losses. Someone at work told me gains are different and there's no 30-day waiting period when you're harvesting a gain. But I want to make sure before I execute — if I sell at a gain and rebuy the same ETF the same day, does the wash sale rule block anything, or am I actually free to rebuy immediately without any tax consequences?

30 comments

Your coworker is right on the core point. The wash sale rule under Publication 550 explicitly applies to losses — it disallows a loss when you sell and repurchase substantially identical securities within 30 days before or after. When you're selling at a gain, the wash sale rule simply does not apply. You can rebuy the same ETF the same day with no issue from that rule.

Greg D.

Author

Thanks, that's the confirmation I needed. Going to proceed with the sale and immediate repurchase then.

Schedule D and Form 8949 are where this shows up on your return. The gain from the sale goes on Form 8949 (long-term, since you held more than one year — Part II), flows to Schedule D, and if you're truly in the 0% bracket, the tax owed on that gain comes out to zero. Your new shares then get a stepped-up cost basis equal to whatever you paid when you reacquired them. Pretty clean strategy when it works.

Greg D.

Author

Good to know exactly which lines it hits. I'll make sure my broker's 1099-B reflects the new cost basis correctly after the repurchase.

One real execution risk: confirm you're actually in the 0% bracket before you pull the trigger. The rate depends on your taxable income for the year including the gain itself. If realizing the gain bumps you into the next bracket, even a dollar over the threshold gets taxed at the higher rate — just that portion, not the whole gain. The thresholds are in the Schedule D instructions for the year you're filing.

This is the part people skip. I ran the numbers wrong once and ended up with a small taxable amount I wasn't expecting. Worth projecting your full-year income first.

Greg D.

Author

Yeah I ran a rough estimate in my tax software already. I have some buffer before the threshold but I'll double-check with the actual Schedule D worksheet before I sell.

Form 8949 instructions are worth reading closely here. I uploaded my brokerage summary and a draft of my Schedule D to taxr.ai last spring when I did this same move, and it flagged that my broker had used the wrong acquisition date for some of the shares I reacquired — which would have made them look short-term instead of long-term on the next sale. Had Taxr pull the holding-period timeline for each lot and list what the 1099-B should show versus what it did show. Caught it before filing.

Greg D.

Author

That's a real risk I hadn't thought about — the repurchased shares starting a new holding period. I'll watch the acquisition date carefully on the next 1099-B.

To be precise about the holding period: Publication 550 says you count starting the day after the trade date you bought and the day you sell counts as the last day. So your new shares acquired today start their one-year clock tomorrow. They'll be short-term until they cross that threshold. That doesn't affect the gain you're harvesting now, but matters a lot when you eventually sell the reacquired shares.

Good clarification. A lot of people do the harvest and then forget the repurchased lot is a fresh short-term holding and sell it too soon.

Greg D.

Author

Noted. I'm planning to hold the reacquired shares long-term anyway, but I'll mark the date.

Something people get tripped up on: if you hold the same ETF in multiple accounts — taxable, IRA, Roth IRA — the wash sale rule still doesn't apply here because you're harvesting a gain, not a loss. But keep it in mind if you ever flip this strategy around and harvest a loss. Buying substantially identical securities in an IRA within the 30-day window on a loss harvest triggers wash sale and the disallowed loss does not get added back to the IRA's basis.

The IRA trap on loss harvesting catches a lot of people. Worth flagging even in a gain harvesting thread.

Your broker should report the sale on a 1099-B with the gain. Box 1e is cost basis, box 1d is proceeds, and if the shares were covered securities held over a year, basis gets reported to the IRS (box A or D on Form 8949 depending on short vs. long-term). Make sure the basis shown matches your records, especially if you've had dividend reinvestments creating multiple lots.

Worth double-checking: are these ETF shares or shares of an actively managed fund where the underlying securities matter? For most broad-market ETFs it's straightforward. But if you're in a niche fund and your broker auto-reinvests dividends, you might have recently acquired shares at a small loss that could cause a wash sale problem if you sell everything and rebuy. That part would apply to the loss lots, not your gain lots.

Greg D.

Author

Good point — I do have DRIP enabled. I'll review the individual lots and make sure I'm only selling the gain lots, not any recent dividend reinvestment shares at a loss.

Publication 550's wash sale section is clear that the rule is loss-specific, so your gain harvest and immediate repurchase is fine on that front. When I did my own gain harvest last year I pasted my 1099-B preview and my cost basis spreadsheet into Taxr and had it cross-check every lot against my purchase confirmations — it listed the ones where the broker's basis was off and drafted a column (g) adjustment summary for Form 8949 for me to review. Saved me from reporting a larger gain than I actually had.

Greg D.

Author

Really useful — I'll do a lot-by-lot basis check before filing. I had no idea the broker could have errors like that.

Just to lay it out cleanly: gain harvesting at 0% rate works because capital gains tax on long-term gains at the 0% bracket is literally zero federal tax. You realize the gain, pay nothing, and your new basis resets higher. If the market drops after your repurchase, your loss potential on the new shares is smaller. That's the only real downside.

Form 3115 or any accounting method form has nothing to do with this — just making sure nobody sends you down that rabbit hole. This is purely Form 8949 and Schedule D territory.

The specific-identification method for cost basis matters here. If you have lots at different prices, tell your broker before the sale which lots you're selling (the highest-basis ones give you the smallest gain, or the lowest-basis ones give you the most gain to harvest at 0%). Once the trade settles it's usually too late to designate. Check your broker's rules on the deadline for lot selection.

This is the part that can really optimize the strategy. Harvesting the lowest-basis lots maximizes the step-up, as long as you stay inside the 0% threshold.

Greg D.

Author

I hadn't thought about lot selection. I'll call my broker before I execute to designate specific lots.

Another angle: if you're married filing jointly, the 0% bracket threshold is higher than for single filers — check the Qualified Dividends and Capital Gain Tax Worksheet in the Schedule D instructions for the exact number applicable to your filing status. Using the wrong threshold is an easy mistake.

Schedule D line 15 is where the net long-term gain ends up. If your total net capital gain stays below the 0% threshold, the tax on that line is zero. The worksheet walks through it. Nothing exotic here, just normal capital gain reporting.

Mostly correct, though the net long-term gain lands on line 15, not line 7. And the Qualified Dividends and Capital Gain Tax Worksheet, not just Schedule D itself, is what actually computes the rate — worth following it line by line.

One scenario to watch: if you have capital loss carryforwards from prior years, they'll offset your harvested gain on Schedule D before the rate calculation. That could mean you're harvesting a gain that gets zeroed out by old losses anyway, with no basis step-up benefit. Check Schedule D line 15 and your carryforward worksheet before deciding how much to harvest.

Greg D.

Author

I do have a small carryforward. Good to factor that into the math — I'll run through the Schedule D worksheet first.

To pull it all together: sell the appreciated shares, report the long-term gain on Form 8949 Part II with box D or E checked depending on whether basis was reported to the IRS, carry it to Schedule D, confirm the tax owed is zero via the rate worksheet, and rebuy the same day. No wash sale issue, clean basis reset. That's the whole move.