Tax gain harvesting at 0 percent long-term capital gains rate gotchas everyone should know

Finally in a year where my income is low enough that I might qualify for the 0% long-term capital gains rate, so I figured I'd do some tax gain harvesting — sell appreciated shares, realize the gain tax-free, and immediately rebuy to step up my cost basis. Sounds clean on paper. But I've been reading around and it seems like there are traps that can blow the whole thing up. I already know the wash sale rules don't technically apply to gains, but what else can push me out of the 0% bracket or cause unintended consequences? My situation: W-2 income plus some dividends, filing single, holding ETFs and a few individual stocks with significant unrealized gains. I'm trying to do this before year-end. What are the gotchas people actually run into?

35 comments

The biggest one that caught me off guard: the harvested gain itself counts toward your taxable income for the bracket calculation. So you might start the year thinking you're comfortably in the 0% zone, harvest a big chunk, and that added income pushes you into the 15% bracket for the portion above the threshold. The 0% rate only applies to the gains that land within the bracket ceiling, not all of them automatically.

This is the one I was most worried about. So I basically need to calculate exactly how much room I have between my ordinary income and the top of the 0% bracket before I sell anything.

Uploaded my brokerage year-end summary and my draft 1040 to taxr.ai and had it map out exactly how much long-term gain I could realize before crossing into the 15% bracket. It flagged that my qualified dividends were already consuming part of the 0% space, which I hadn't accounted for. Worth doing that math before you sell anything, not after. Also: qualified dividends stack in the same preferential rate calculation. They fill the bracket from the bottom alongside your LTCG, so if you have a lot of them, your room for harvested gains shrinks.

The qualified dividends point is exactly what I missed. I kept thinking of them separately but they sit in the same stack.

Yes, and it compounds if you hold funds that throw off a lot of qualified dividends in December — you don't always know the amount until after the distribution date.

Net investment income tax is a separate thing to watch. If your modified adjusted gross income crosses the NIIT threshold, the gain gets hit with an additional tax even if it's technically in the 0% bracket for the regular rate calculation. The two calculations run independently. Check the Form 8960 instructions for how MAGI is figured there — it's not the same number as on Schedule D.

Hadn't thought about NIIT at all. My income shouldn't be near that range but I'll double-check.

Good point. NIIT threshold is well above the 0% rate ceiling, so most people doing gain harvesting aren't there, but if you're close it matters a lot.

State taxes are the one people forget. The 0% federal rate doesn't mean your state agrees. Several states don't have a preferential rate on capital gains at all — they tax them as ordinary income. So you could owe nothing federally and still have a real state bill. Worth running your state's numbers separately before assuming the harvest is free.

I'm in a state that taxes capital gains as ordinary income so this is real for me. Probably still worth doing but it changes the math.

California, Minnesota, and a few others — no preference at all. This tripped me up the first time I tried it.

Timing within the year matters more than people think. If you harvest in January and then your income spikes — a bonus, freelance work, anything — by December you might be over the threshold retroactively for the year. The bracket is based on your total year income, not what you expected when you sold. I try to do any gain harvesting in November or December once I have a pretty solid picture of the year.

November/December timing makes a lot of sense. I'm actually trying to do this now so I have a cleaner view of what the full year looks like.

Had Taxr go through my Schedule D and 1099-B from last year after I'd already done a harvest that partially went sideways — it traced which lots I'd sold, recalculated the gain by lot, and showed me where I'd miscounted the room. Helped me understand what I'd done wrong so I could plan better this year. The specific gotcha I hit: I sold shares I'd held almost a year. Thought they were long-term. They weren't — I was counting from the purchase date, not the day after, and I sold before the one-year mark. Short-term gains are taxed as ordinary income and don't qualify for the 0% rate at all.

The holding period thing is a real trap. The rule is the holding period starts the day after the trade date you bought and ends on the trade date you sold. So if you bought on September 15 last year, September 15 this year is still short-term — you need September 16 at the earliest.

Yes, Publication 550 on the IRS site spells this out. For exchange-traded securities it's trade date to trade date, and the day you bought doesn't count — you start counting the following day.

Another one: AMT. If you have ISOs and you've been thinking about exercising them in the same year as gain harvesting, the ISO spread is an AMT adjustment on Form 6251 line 2i, and that can push your AMT liability up in ways that interact badly with everything else. These are two separate planning exercises that need to be done together.

Not in an ISO situation right now but useful to know for people who are. The Form 6251 adjustment is real and tends to surprise people.

Watch which specific lots you're selling. Brokers default to FIFO or their own method unless you specify. If you have a mix of lots with different holding periods and different basis, letting the broker choose can result in short-term lots getting sold when you wanted long-term ones, or realizing more gain than you planned. Tell them explicitly which lots before the trade, and confirm in writing or through the platform's lot selection tool.

Yes — and confirm the lot selection appears on your trade confirmation. Some platforms apply it, some require an extra step to lock it in.

I always do specific ID but I've never double-checked the confirmation. Going to do that going forward.

The rebuy part of gain harvesting isn't a wash sale problem for gains, you're right about that. But if you sell at a gain, rebuy immediately, and the stock then drops, your new higher basis means a bigger loss if you eventually sell at a loss — and that future loss could trigger wash sale issues if you rebuy again within 30 days. It's not a problem today, it's a future-state problem people don't think about.

Yes, and the wash sale clock matters for losses specifically: within 30 days before or after a sale at a loss, buying substantially identical shares disallows the loss. The disallowed amount gets added to the cost basis of the new shares instead.

Social Security recipients should check whether the harvested gain increases their provisional income and causes more of their SS benefits to become taxable. It's not a capital gains rate question, it's a separate income inclusion calculation. Realizing a gain that looks free on the LTCG side can still cost you on the SS taxation side.

Same logic applies to anyone on Medicare — the IRMAA surcharge on Medicare premiums uses MAGI from two years prior, so a big harvested gain this year could raise your Part B and Part D premiums two years from now.

I'm not in either situation right now but these are real gotchas for people who are. Good callouts.

Gave Taxr my 1099-B and my W-2 and had it draft out a worksheet showing each lot's holding period, the gain per lot, and how the total stacked against the 0% ceiling given my W-2 income and estimated dividends. It flagged two lots that looked long-term but had a holding period of exactly 365 days — and pointed out those were short-term because the count starts the day after purchase. What I'd add on the gotchas: if you have capital loss carryforwards, they offset your gains first before the rate even matters. So harvesting gains to step up basis when you have a large carryforward might be less useful than it looks — the carryforward absorbs the gain, so you still get the higher basis on the rebought shares, but you pay for it with carryforward you could have used against future gains instead of getting it free at 0%.

The carryforward absorbing the gain first is something I hadn't thought through. I do have a small carryforward. I need to figure out whether harvesting still makes sense or whether I'm just burning the carryforward faster than I would otherwise.

Worth running both scenarios. Using up the carryforward isn't always bad — it converts it to stepped-up basis. But if the carryforward is large and you were planning to use it against future gains at 15% or more, spending it at 0% is a less efficient use of it.

The 0% rate also doesn't apply to unrecaptured Section 1250 gain or collectibles gain — those have their own rate ceilings. If you're harvesting gains on real estate funds or other assets that might include those components, the flat 0% assumption breaks down.

Practical thing I do: I run the numbers in a spreadsheet before touching anything. W-2 YTD, estimated dividends, estimated other income, then calculate the remaining room under the 0% ceiling. Then I check each lot I'm considering — holding period first, then the gain. I only sell what fits cleanly under the ceiling with margin to spare, because December always brings surprises.

Yes — a margin of safety is smart. If you try to harvest right up to the penny and get one more dividend you forgot about, you've spilled into 15%.

Don't overlook the step-up benefit calculation either. If your basis is already high relative to current price, the tax-free gain is small and the transaction costs (spread, possible short-term price movement before rebuy) eat into the benefit. Run the break-even on how long you'd need to hold the new higher-basis lot before the step-up actually saves you something meaningful.

Kiddie tax can apply if you're trying to do this for a dependent child or a young adult still subject to those rules. The unearned income above a threshold is taxed at the parent's rate, which can be much higher than 0%. The 0% rate strategy basically doesn't work for someone in kiddie tax territory.

Not relevant to my situation but it's a real gotcha for people who try to shift gains to a child's return to get the 0% rate.