Can I sell winners and rebuy to use capital loss carryover?

Trying to figure out if I can sell winners and rebuy to use capital loss carryover I've been sitting on for two years. The carryover came from a rough year in crypto and individual stocks. I know the wash sale rules apply to losses, but I'm wondering if the same logic applies when I'm deliberately realizing gains to absorb a carryover. My plan was to sell appreciated positions, recognize the gains, let the carryover offset them on Schedule D, then immediately rebuy those same positions. No 30-day wait because I'm not selling at a loss. Is that actually allowed or am I missing something? Already checked Publication 550 but didn't find anything that directly said yes or no for this direction.

31 comments

Schedule D is where this plays out. Your carryover flows into Schedule D as either a short-term or long-term carryover (lines 6 and 14 respectively), and it offsets gains of the same character first, then crosses over if one side has a net loss. So yes, recognizing gains deliberately to absorb a carryover is a real and legal strategy. The wash sale rule only applies to losses — it blocks you from claiming a loss when you rebuy the same security within 30 days. When you're realizing a gain, there's no wash sale issue at all.

Wes H.

Author

Does the character of the carryover matter here? My carryover is mostly short-term from crypto trades. If I sell long-term stock winners, does the short-term carryover offset those long-term gains?

Yes, character matters. On Schedule D, short-term and long-term net out separately first. Short-term carryover goes against short-term gains first. If short-term still has a net loss after that, it can offset long-term net gains. So selling long-term winners when you have only short-term carryover can still work, just not dollar-for-dollar in the most efficient way.

Worth being precise: the wash sale rule (Publication 550, chapter 4) specifically applies to selling at a loss and rebuying substantially identical securities within 30 days before or after. You're doing the opposite — selling at a gain. The IRS has no rule that penalizes rebuying a position you just sold at a gain. Your only real concern after the rebuy is that your new cost basis resets to whatever you paid when you rebought, so future gains or losses are measured from that new basis.

Wes H.

Author

Right, that's actually what I want — reset the basis higher so future gains are smaller. Good point about the new basis.

Did this last spring with some index fund positions I'd held over a year. Sold enough to generate long-term gains that matched my carryover, then reloaded the same ETFs the next day. Schedule D came out clean — the carryover wiped the gains and I owed nothing on those sales. Only wrinkle was making sure I tracked the new purchase date carefully so I didn't confuse it with the old lot's holding period.

Form 8949 is where you'll actually report each sale, then it flows to Schedule D. I ran my own version of this last year and uploaded my 1099-B and the carryover worksheet to taxr.ai — it mapped each lot to the right part of Form 8949 (Part I or Part II depending on holding period), carried the short-term and long-term amounts to the right Schedule D lines, and showed me exactly how much gain I needed to realize to zero out the carryover without overshooting. Saved me from having to do the cross-netting by hand.

Wes H.

Author

How did it handle the crypto side? My carryover originated from crypto losses reported on 8949.

For 2025 digital asset transactions there are new boxes on Form 8949 — G through I for short-term and J through L for long-term — separate from the boxes used for stock. My situation was all stock so I didn't test the crypto side, but the carryover itself just flows into Schedule D the same way regardless of what generated it originally.

One thing worth checking: are your winners short-term or long-term? If they're short-term, the gains get stacked on top of your ordinary income and the carryover offsets them, but you're essentially trading lower long-term rates for higher short-term rates on the gains you're recognizing. Sometimes it's better to wait until a position clears the one-year mark before you sell, so the gain qualifies as long-term.

Wes H.

Author

Most of mine are long-term at this point, so I think I'm okay on that. But good flag for anyone with mixed holding periods.

Capital loss carryover retains its character year to year — short-term stays short-term, long-term stays long-term. Topic 409 on the IRS site covers this. When you're planning how much to sell, net each bucket separately before you assume the full carryover absorbs your gain.

The rebuy timing question people sometimes ask about — there's no required waiting period when you're selling at a gain. You can sell and rebuy in the same session if your broker allows it. The wash sale 30-day window is purely about loss transactions.

Is there any step-transaction or substance-over-form argument the IRS could make about doing this?

The IRS hasn't successfully applied those doctrines to straightforward gain harvesting followed by repurchase. It's a recognized planning technique. The wash sale statute is the specific Congressional response to the loss side of this strategy, and no equivalent exists for the gain side.

Don't forget state taxes. Your federal carryover doesn't automatically carry into every state return. Some states have their own capital loss carryover rules that may differ in how they compute or limit the offset. Worth checking your state's Schedule D equivalent before you finalize how much gain to trigger.

Wes H.

Author

Good point — my state follows federal pretty closely but I'll double check the carryover treatment there.

Schedule D lines 6 and 14 are where the carryovers land, and the carryover worksheet in the Schedule D instructions tells you exactly how much carries from the prior year. I had Taxr read through my prior-year Schedule D and the carryover worksheet together — it identified that I had more long-term carryover than I'd realized because one year's worksheet hadn't flowed forward correctly in my software. That kind of cross-year check is easy to miss if you're just trusting the software import.

Wes H.

Author

How would I even catch that if the software had it wrong?

Pull your actual prior-year Schedule D and check line 16 — that's the net capital gain or loss. If it was a loss, the carryover worksheet shows how much goes forward. Compare that number to what your current-year software imported as the carryover. If they don't match, the software pulled the wrong figure.

Something I'd add on the rebuy: if you're buying back into the same mutual fund or ETF, check whether the fund itself made capital gain distributions near year-end. That could add to your recognized gains on top of what you planned to harvest, throwing off your calculation.

For anyone using specific identification for cost basis — make sure your broker has it set before the sale settles. If you have multiple lots in the same position, you want to sell the right ones to control both the gain amount and the resulting basis after you rebuy.

Wes H.

Author

I use specific ID already, was planning to sell the highest-basis lots to minimize the gain, but actually I want to maximize the gain to absorb the carryover — so I should be selling my lowest-basis lots instead, right?

Exactly right. To absorb a large carryover you want maximum gains, so pick your lowest-basis lots. It's the reverse of the usual tax-minimization instinct. Just make sure your broker confirms the lot selection before the trade executes.

Publication 550 also covers holding period rules — the holding period on your rebought shares starts fresh the day after the new purchase trade date. So if you care about qualifying future sales as long-term, you're starting the one-year clock over. That's not a problem, just something to calendar.

Worth noting that if your total recognized gains end up smaller than your total carryover, the unused portion just rolls forward again to next year. You don't lose it. So there's no pressure to absorb the entire carryover in one year if you don't have enough winners to match it this year.

Wes H.

Author

That's actually reassuring. I was worried I had to use it all at once or lose it.

Nope, it carries indefinitely. The Schedule D instructions and the carryover worksheet walk through the math each year until the balance hits zero.

One scenario that could get complicated: if you have a large carryover and you're trying to absorb it all in one year by harvesting significant gains, you might want a CPA or enrolled agent to run the full projection before you execute. The interaction between ordinary income, capital gains rates, and the carryover netting can produce unexpected results at certain income levels, and a miscalculation means you either left carryover on the table or realized more taxable gain than you intended.

To close the loop on the original question: yes, selling winners and immediately rebuying is allowed, the wash sale rule doesn't apply, the carryover offsets the gains on Schedule D, and your new basis is whatever you paid on repurchase. The main things to track are the character of each carryover bucket, which lots you select for sale, and your new holding period on the reacquired shares.

Wes H.

Author

This is exactly the confirmation I needed. Appreciate everyone laying out the Schedule D mechanics so clearly. Going to run the numbers on how much gain I need to harvest to match my carryover without overshooting.