Can I sell and rebuy same ETF same day for 0% capital gains?

So I've been sitting on some long-term ETF shares with big gains and I noticed my income this year is low enough that I might fall into the 0% long-term capital gains bracket. Someone told me I can sell and immediately rebuy the same ETF on the same day to "step up" my cost basis without paying any tax on the gain, since the rate would be 0%. I tried reading about this and couldn't find anything that said it was illegal, but I also couldn't find anything confirming it works. My broker lets me do it in one click basically. Is this actually allowed? Does the wash sale rule kill it? Or does something else go wrong? I want to make sure before I pull the trigger because the gains are pretty significant and I don't want an unexpected tax bill.

34 comments

I actually did this two years ago intentionally. The wash sale rule only applies to losses, not gains. So if you're selling at a gain and immediately rebuying, there's no wash sale issue at all. The IRS wash sale rules under Publication 550 are specifically about disallowing losses when you rebuy within 30 days — gains are completely outside that rule.

Monica J.

Author

Thanks, that's the key thing I needed to know. So the wash sale rule is off the table entirely since I'm selling at a gain, not a loss. That clears up a lot.

Went through this exact planning last year when my income dropped after leaving a job. The 0% rate is real but whether you actually land in it depends on your total taxable income for the year including the gain itself — the gain gets stacked on top of your other income when figuring which bracket it falls into. I uploaded my W-2 and brokerage statements to taxr.ai and it ran through my projected income, stacked the gain on top, and showed me exactly how much of the gain would hit 0% vs. the next rate up. That breakdown saved me from assuming the whole thing was tax-free when only part of it was.

Monica J.

Author

This is a huge point I hadn't thought about — the gain stacking on top. I could easily push myself into a higher bracket partway through the sale. I'll need to map that out carefully before I sell anything.

The mechanics work like this: you sell, realize the gain, pay 0% on it (if you're actually in that bracket), and then your new shares have a stepped-up cost basis equal to what you paid that day. Future gains will be measured from the new, higher basis. No rule prohibits this. The holding period on the new shares starts fresh the day after the repurchase trade date, per Publication 550.

Worth noting the holding period restart. If you sell the new shares within a year you'd have short-term gains taxed as ordinary income, which would defeat the whole strategy pretty quickly.

Monica J.

Author

Good catch on the holding period. So I'd need to plan to hold the rebought shares for more than a year to keep future gains long-term. That's doable for me since I'm a long-term holder anyway.

I work in a brokerage and see clients do this every December. It's sometimes called a "gain harvesting" strategy. Totally legal. The only thing that trips people up besides the bracket stacking issue is state taxes — your state may tax capital gains as ordinary income regardless of the federal 0% rate, so your effective rate might not actually be 0% when you combine both.

Monica J.

Author

State taxes — hadn't even put that in the equation. I'm in a state with an income tax so I need to check what it does with capital gains specifically.

Does it matter which ETF? Like, two different ETFs that track the same index — could that create a wash sale issue if one is at a loss and one is at a gain in the same account?

If you're selling the one at a gain, no wash sale issue regardless. The wash sale only matters for the one you're selling at a loss. And even then, two ETFs tracking the same index are often considered not "substantially identical" — but that's a facts-and-circumstances question the IRS hasn't fully defined.

Got it, so I'd need to be careful if I had a losing position in a similar fund around the same time. Good to know.

I did this last spring and ran into a reporting question afterward — how to show the sale and repurchase on Form 8949 when both happened the same day. I pasted my 1099-B into Taxr and it walked through each row, matched the sale to the correct Part II box (box D in my case since basis was reported and it was long-term), and flagged that the rebuy starts a new short-term holding period with a fresh basis. Made it a lot clearer than staring at the form instructions alone.

Monica J.

Author

Really helpful to know what the 1099-B reporting looks like. I'll keep that in mind when filing — sounds like it goes on Form 8949 Part II with box D if the broker reported the basis.

The step-up strategy works but you need to watch your Modified Adjusted Gross Income for the year too. Certain deductions and credits phase out as income rises, and a large realized gain — even at 0% — can push you past thresholds on other parts of your return you weren't expecting.

This happened to me with a healthcare premium credit. I realized a gain thinking it was tax-free and lost part of my credit. The gain itself was 0% but the MAGI effect cost me money elsewhere.

Monica J.

Author

That's a scenario I really didn't anticipate. So the gain could be 0% federally but still cost me money by affecting other parts of my return. I'll need to look at the full picture, not just the capital gains line.

The settlement date vs. trade date distinction matters for year-end timing. 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 sold — not the settlement date. So same-day sell and rebuy is two separate trade dates triggering two separate tax events in the same tax year, which is what you want.

If you're doing a large transaction, worth confirming your broker won't temporarily put a hold on the proceeds before you can repurchase. Some accounts have settlement timing rules that could delay the rebuy, especially in a cash account vs. a margin account.

Monica J.

Author

Good practical point. I'm in a margin account so I think same-day is fine, but I'll double-check with my broker before doing it.

To be clear on the Form 8949 side: the sale goes in Part II (long-term, since you held more than a year), and if your broker reported the basis you check box D. The gain from the sale can go straight to Schedule D line 8a if there are no adjustments, or you list it on Form 8949 line by line if there are. The rebuy just establishes new basis — it doesn't appear on Form 8949 at all until you sell those shares later.

Mostly right, but it's line 8a, not 8b. Under Exception 1 in the Form 8949 instructions, if basis was reported and there are no adjustments, those transactions can go straight to Schedule D line 8a instead of flowing through Form 8949 individually.

I was nervous about whether I'd done the bracket math right after I sold, so I had Taxr go through my Form 8949 and Schedule D draft line by line. It flagged that part of my gain crossed into the next bracket because I'd forgotten to include some interest income, so the "0% gain" was actually split. Really glad I caught that before filing rather than after.

Monica J.

Author

Split gain across brackets is exactly what I'm worried about. I'll make sure I account for every income source before I execute the sale, not just my salary.

Nobody really talks about how this interacts with the Net Investment Income Tax. If your MAGI goes above the NIIT threshold (which isn't the same as the capital gains bracket threshold), you can owe the NIIT on the gain even if the regular capital gains rate is 0%. Check the Form 8960 instructions for where your situation falls.

This is a real trap. The NIIT threshold and the 0% long-term rate threshold are different numbers entirely. Someone can be in the 0% capital gains bracket and still owe NIIT if their MAGI crosses that separate line.

Monica J.

Author

Form 8960 — adding that to my research list. I had no idea NIIT had a separate threshold. This thread has uncovered way more complexity than I expected.

Practically speaking, if you want to do this cleanly: figure your projected ordinary income first, then calculate how much room you have before the 0% bracket ends, and only harvest gains up to that amount. Don't sell the whole position if the gain is bigger than the room you have.

Monica J.

Author

Partial harvesting — that's a smarter approach than all-or-nothing. I'll run the numbers on how much room I actually have before selling anything.

Something to double check: if your ETF paid dividends that were reinvested during the year, those reinvested shares have their own purchase dates and cost basis lots. When you sell, make sure your broker is using the right tax lots — highest basis first, or specific identification — so you're not accidentally triggering a short-term gain on a recently reinvested lot.

Specific lot identification is worth setting up explicitly with the broker before the sale, not after. Some brokers default to FIFO which could pull in a short-term lot you didn't want.

Monica J.

Author

Good reminder. I'll check my lot selection method with my broker before I execute. I think I'm on FIFO by default and that could be a problem given the dividend reinvestments.

The strategy is real and legal but between bracket stacking, state taxes, MAGI effects on credits, NIIT, and lot selection — there are enough moving parts that if the gain is significant, running it by a CPA or enrolled agent before you execute is worth it. They can model the full-year impact in a way that accounts for everything at once.

Monica J.

Author

Agreed. I came in thinking this was simple and it's clearly not. I'll put together the full income picture and probably take it to a CPA before I do anything. Thanks everyone — this thread was genuinely useful.