When to sell and rebuy to harvest long-term capital gains in a low-income year

Trying to figure out the right timing here. My income is unusually low this year — took time off between jobs — and I've been told this is a good time to harvest long-term capital gains while they might be taxed at 0%. I have a few ETF positions I've held over a year with significant unrealized gains. I know there's a wash sale rule but I've seen conflicting things about whether it even applies to gains. I want to sell, potentially lock in the gain at a low rate, then immediately rebuy to step up my cost basis. My questions: does the timing of the sale within the year matter — like does it need to happen before a certain date? And is there anything about the rebuy that could cause a problem I'm not thinking of? I've tried reading Publication 550 but it gets complicated fast.

38 comments

The wash sale rule is only for losses — it does not apply when you're harvesting a gain. So you can sell and immediately rebuy the same ETF the next day and there's no IRS problem with that. Your new cost basis steps up to whatever you paid on the rebuy, which is the whole point. The timing question is real though: does your low income year end December 31? If so the settlement date doesn't matter, because for equities the trade date controls, not settlement. So trade on or before December 31 and you're in that tax year.

Beth F.

Author

Thanks, that clears up the wash sale confusion. So I can rebuy immediately without any waiting period — that's a relief. And yes, my low-income year is a calendar year so I just need to execute the trade before December 31.

Worth adding: the 0% long-term capital gains rate depends on your total taxable income for the year, including the gain itself. So if you sell a large position, the gain gets added to your income and might push part of it into a higher bracket. The rate that applies to each dollar of gain depends on where it falls relative to the threshold — check the Schedule D Tax Worksheet in the Schedule D instructions for how it layers. I ran into this last year. Had Taxr at taxr.ai read my draft return and it mapped out exactly which portion of the gain was sitting above the 0% threshold so I knew how much to harvest without crossing it. Saved me from selling too much.

Beth F.

Author

This is the part I hadn't thought through carefully. The gain itself lifts my income, so I need to know the threshold before I decide how many shares to sell. I'll look at the Schedule D Tax Worksheet.

How did you figure out the threshold before selling? Did you just estimate your year-end income and subtract from the limit?

Yeah basically. I estimated all my other income, subtracted deductions to get approximate taxable income, then figured how much room I had before hitting the next rate bracket. The Schedule D instructions walk through the layering — gains stack on top of ordinary income.

Are you sure the ETFs you hold are actually long-term? The holding period for securities traded on an established market starts the day after your trade date and ends on the trade date you sell. So if you bought something on say July 15 last year, you've been long-term since July 16 this year. Easy to be off by one day.

Something to watch: if you sell and rebuy right away, your broker will show a new lot at the new price. But make sure you tell your broker which lot you're selling if you have multiple purchases of the same ETF at different times. Some brokers default to FIFO. If the lot you want to sell isn't your oldest lot you need to specify it before the sale, not after.

Beth F.

Author

Good point, I do have a couple of purchases from different years. I'll confirm my broker's default and specify the lot I want.

This matters a lot. I've seen people assume they sold the right lot and found out later their broker used FIFO and they'd sold a short-term lot by mistake. Some brokers let you change lot selection after trade but most don't once it settles.

Does your state tax capital gains the same way the federal return does? Because even if you land in the 0% federal bracket, your state might tax the gain as ordinary income. That changes the net benefit calculation.

Beth F.

Author

Good catch. My state does tax capital gains so I need to factor that in. It won't eliminate the benefit but it lowers it.

One timing issue people miss: if you have capital loss carryforwards from prior years, those will offset your gains automatically before the 0% rate kicks in. So if you have a large carryforward sitting on Schedule D, some or all of your harvested gain might be absorbed by it rather than taxed at 0% — which you'd want anyway but it means you're not really "locking in" anything new, the carryforward was already there.

Beth F.

Author

I do have a small carryforward. So the gain would first be netted against that. If the remaining gain after netting still falls within the 0% bracket I still benefit, right?

Exactly. The carryforward absorbs gain first, then whatever's left is what gets rated at 0% or higher. You still benefit — you're stepping up basis on the full gain, the carryforward just means less of it is "newly" taxed at 0%.

How are you planning to report the sale? Just want to flag that even a 0%-taxed long-term gain still needs to be reported on Schedule D, either through Form 8949 Part II or directly on Schedule D line 8a if the basis was reported to the IRS and there are no adjustments (Exception 1). It doesn't disappear from your return just because the tax works out to zero. Your broker will send a 1099-B and the IRS will be looking for it.

Beth F.

Author

Makes sense — the gain is still reported, just taxed at 0%. I'll make sure it shows up on Schedule D correctly, through Form 8949 or directly on line 8a if it qualifies for Exception 1.

What brokerage are you using? The reason I ask is some brokers report the cost basis correctly on the 1099-B for the original lot (covered securities with basis reported to the IRS, so box A or D on Form 8949) but after a rebuy at the new price the new lot is also covered and they handle it cleanly. Others have messed up cost basis reporting in my experience, especially if you transfer assets between accounts. I had Taxr go through my 1099-B last spring alongside my prior year 8949 and it found two lots where the basis the broker reported didn't match what I'd actually paid — flagged them before I filed. Really useful when you have a bunch of transactions.

Beth F.

Author

I'm staying at the same broker so shouldn't be a transfer issue. But I'll definitely double-check the 1099-B when it arrives against my own records before I file.

Does December timing matter beyond the year-end deadline already mentioned? Only reason I'd think about it more carefully is dividends — if your ETF pays a year-end dividend, that gets added to your income too and could push you slightly over the threshold you calculated. Some ETFs pay big December distributions.

Beth F.

Author

Hadn't considered dividends. I'll check the ETF's distribution history to see if there's a large December payout that could affect my income estimate.

Qualified dividends layer into the same preferential rate calculation as long-term gains, so they compete for space in the 0% bracket too. Worth factoring in when you're measuring how much room you have.

To avoid overthinking the threshold question — your taxable income for this purpose is your adjusted gross income minus your standard or itemized deduction, same as normal. The long-term gain (and qualified dividends) then get the preferential rate on the portion that fits below the threshold, with ordinary income stacking first. The Schedule D Tax Worksheet in the Schedule D instructions shows the exact order. I'd dropped my Taxr my W-2, a draft of my other income, and my prior year Schedule D and it built out a projection of where my income would land after the sale — showed me the slice of gain above the threshold I hadn't planned for. Helped me decide how many shares to actually sell.

Beth F.

Author

This is exactly the kind of calculation I was trying to do manually and kept getting confused on. Having the stacking order laid out clearly helps.

The "ordinary income stacks first" point is what trips people up. Your wages, interest, nonqualified dividends all sit at the bottom, then long-term gains and qualified dividends sit on top. So even if your total income looks low, if ordinary income alone is already close to the threshold, there's not much room for 0%-rate gains.

Are these ETFs in a taxable brokerage account? Because if any of them are in a traditional IRA or 401k the whole analysis doesn't apply — gains inside those accounts aren't taxed on sale, they're deferred until distribution, which is ordinary income anyway. Just want to make sure we're talking about a taxable account.

Beth F.

Author

Yes, all taxable brokerage, no retirement accounts involved. Good clarification for anyone reading who might be confused on that point.

Worth knowing: Publication 550 at irs.gov confirms that the wash sale rules apply to losses, not gains. So selling at a gain and immediately rebuying is clean. The holding period of the new shares starts fresh on the day after you rebuy — so after you do this, your new lot is short-term again until you've held it another year.

This is an important follow-up point. After you step up the basis, your new lot clock resets. If you need to sell again within a year for some reason, that sale would be short-term.

Beth F.

Author

Good reminder. I'm planning to hold for the long term anyway but I shouldn't forget the new lot's holding period restarts.

One thing to double-check: are any of your ETFs holding futures or currency products underneath? The wash sale rules specifically don't apply to commodity futures or foreign currencies but some specialized ETFs are structured in ways that affect how gains are reported — sometimes as 60/40 (60% long-term, 40% short-term) under Section 1256 regardless of holding period. If you're in a plain equity ETF you're fine, but worth verifying.

Beth F.

Author

These are plain broad-market equity ETFs so I think I'm in the clear, but I'll check the fund prospectus to confirm the structure.

Has anyone done this across two years intentionally — like sell in December of the low-income year and rebuy in January, to avoid even one day of market risk while also being clean on the trade dates? Does that work?

Yes, that works and some people prefer it. You're out of the market briefly but you get a clean break with the sale's trade date in the low-income year and the rebuy in the new year. Only downside is a couple days of price risk.

The trade date is what determines the tax year, not the settlement date — that's confirmed in Publication 550 for securities on an established market. So selling December 31 and rebuying January 2 is clean: the gain is in the low-income year, the new lot starts in the new year.

Don't forget to track the new lot's cost basis separately after the rebuy. Even though your broker should handle it, keeping your own record of the trade date, shares, and price paid is good practice — especially if you ever switch brokers later and cost basis doesn't transfer cleanly.

Where do you stand on estimated taxes? If you've been in a low-income year and not making quarterly payments, a large realized gain in Q4 might create an underpayment issue even if the rate ends up being 0%. Worth checking whether the gain alone creates a liability or if the 0% rate truly brings your bill to zero before year-end.

Beth F.

Author

That's a good angle I hadn't looked at. If the rate is truly 0% the gain shouldn't create a liability, but I should confirm the whole picture before December. The Schedule D Tax Worksheet will show me if any part is taxed above 0%.