Can I use long-term capital loss carryover to reset index fund cost basis?

Trying to figure out if this strategy actually works the way I think it does. I have a long-term capital loss carryover from a bad 2022 position, still sitting on Schedule D. My S&P 500 index fund has been held for 4 years and is sitting on a large unrealized gain. The idea I keep reading about: sell the index fund to realize the gain, offset it with the carryover loss, then immediately buy back in at the new higher cost basis. No wash sale issue because I'm realizing a gain not a loss. My 1099-B from the broker shows the original low basis. Am I understanding the mechanics right? Is there anything on Form 8949 or Schedule D that would flag this or disallow it? I haven't pulled the trigger yet and want to make sure I'm not missing something obvious before I do.

35 comments

What's the size of the gain relative to your carryover? That ratio matters a lot for whether this is actually worth doing in a given year.

Rachel P.

Author

Carryover is bigger than the gain, so I'd still have leftover carryover going into next year. That's part of why it feels like a good time to do it.

The wash sale concern: does it apply here at all? You said you'd buy back immediately. I want to make sure I'm not missing something because wash sales are usually the thing that kills these reset strategies.

Wash sale rules only apply when you sell at a loss. If you sell at a gain and use a carryover to offset it on Schedule D, the wash sale rules under Publication 550 have nothing to grab onto. The repurchase doesn't trigger anything.

Rachel P.

Author

That's what I thought but I kept second-guessing myself. Good to have it confirmed.

Your mechanics are right. Sell at a gain, report on Form 8949 Part II with box D or E checked depending on whether your broker reported basis, carry the net to Schedule D line 8b or through 8949 as applicable, then the long-term carryover from prior year goes on Schedule D line 14 (line 6 is for a short-term carryover). The gain and the carryover net out on line 15. Repurchase resets your basis to whatever you paid that day. I ran my own version of this last year and uploaded my Schedule D draft and carryover worksheet to taxr.ai — it checked the carryover amount flowing from the prior year return against what I'd entered on line 14 and flagged that I had the short-term and long-term carryovers on the wrong lines. Worth verifying before you file.

Rachel P.

Author

Line 14 specifically — I'll check that. And good catch on the short vs long-term split, I could easily mix those up.

Which line does the prior-year carryover actually come from on the Schedule D? Asking because I always compute it manually from the worksheet.

Prior year carryover worksheet is in the Schedule D instructions or Publication 550. The result flows to line 6 (short-term) or line 14 (long-term) — line 6 is the short-term carryover input line, line 14 is the long-term carryover input line. Double-check the Schedule D instructions for the current year to confirm the exact line labels.

Are you in a state with its own capital gains treatment? Some states don't recognize federal carryovers or treat them differently. The strategy works cleanly at the federal level but your state return could look different.

Rachel P.

Author

Good point, hadn't thought about state. I'll need to check separately.

What index fund specifically? If you sell an S&P 500 ETF and immediately buy a different S&P 500 ETF the wash sale still doesn't apply because you're realizing a gain. But if you wanted to harvest a loss somewhere else in the same window, two substantially identical funds could cause a problem.

The step I'd double-check is your holding period on the index fund. For securities on an established market, the holding period starts the day after the trade date you bought and ends on the trade date you sell — not the settlement date. Four years should be clearly long-term, but if you're near any kind of anniversary it's worth confirming the exact trade dates on your 1099-B. I uploaded my 1099-B to Taxr last spring when I had a similar reset and it pulled out each lot's acquisition date and confirmed the long-term status of each one before I sold. Saved me from assuming all lots were long-term when one smaller lot was actually short.

Rachel P.

Author

I only have one lot in this fund, bought it all at once, so that simplifies things. But the trade date point is good to keep in mind.

What happens to the carryover if the gain doesn't fully absorb it? Does the rest just sit there?

Next step after netting: whatever carryover exceeds the gain first offsets up to $3,000 of other income ($1,500 if married filing separately), and the rest carries forward again to the following year. It doesn't expire. You'd use the Capital Loss Carryover Worksheet in the Schedule D instructions to figure what amount rolls forward.

Does this change anything if the fund is held inside a taxable account versus if someone accidentally thinks they can do this in an IRA? Just want to flag it because I've seen people confuse the two.

In an IRA there are no capital gains or losses to track in the first place — gains aren't taxed as they occur inside the account. The whole basis-reset strategy only exists in a taxable brokerage account.

What does your broker's 1099-B actually show for the original basis? If basis was reported to the IRS you check box D on Form 8949 Part II and enter the basis as shown even if you think it's slightly off, then adjust in column (g). If it wasn't reported you check box E and enter your own correct basis directly in column (e).

Rachel P.

Author

1099-B shows basis reported to the IRS, so box D it is. The basis looks right to me so no column (g) adjustment needed.

Curious whether you've thought about timing within the tax year. If you do this in December versus January, the carryover usage and the new basis both land in different tax years. Not a problem, just something to plan around.

The repurchase price becomes your new cost basis, right? So if the fund drops after you buy back in, you're in the same position as anyone who bought at that price — no special downside protection from having done the reset.

Rachel P.

Author

Yep, fully understood. The only thing I'm locking in is the higher basis going forward and the carryover usage. The market risk is the same as always.

Worth noting: if you have multiple lots in the fund (you said you don't, but for anyone reading) you'd need to specify which lots you're selling when you place the order. Brokers default to something like FIFO and that might not be the lot with the basis you want to reset. You'd have to elect specific identification before the sale settles.

Specific identification has to be confirmed before settlement, not after. That part trips people up — you can't go back and choose your lots after the fact.

Is there any risk the IRS would recharacterize this as something other than a straightforward gain? Like, does the intent to immediately repurchase matter at all?

Intent doesn't change the tax treatment here. The wash sale rules are the main anti-abuse provision in this area and they only reach transactions where you sold at a loss. Selling at a gain and using a lawful carryover to offset it is exactly what the carryover is designed for. There's no separate doctrine that disallows it because you bought back quickly.

Next step for me then is understanding the carryover worksheet. I didn't realize it was that straightforward.

How does the transaction appear on the 1099-B you'll receive next January? The proceeds from the sale show up in box 1d, your basis in box 1e, and if everything is straightforward — gain, basis reported, no adjustments — it flows to Schedule D line 8a under Exception 1 without even needing a full Form 8949 entry. That's the cleanest outcome here.

Rachel P.

Author

Exception 1 to Form 8949 — I keep forgetting that exists. If there are no adjustments needed I can just go straight to Schedule D line 8a. That does simplify the paperwork.

What year did your original carryover loss happen? Just wondering if there's any documentation you need to keep to prove the carryover amount if the IRS ever questions it.

You'd want to keep the Schedule D and the Capital Loss Carryover Worksheet from every year since the loss originated. That chain of worksheets is what shows how the carryover was computed and reduced each year. Prior-year returns generally.

After you do this, don't forget your new basis might not match what the broker has on file if there's any kind of transfer or cost basis reporting lag. Check the confirmation statement right after the repurchase and compare it to what shows up in your account. Brokers occasionally log the basis incorrectly on a same-day buy.

Coming back to the Form 8949 side: once you've reported the sale in Part II and it flows to Schedule D, the line 14 long-term carryover combines with it to give the net long-term capital gain or loss on line 15. If the carryover exceeds the gain, line 15 could still be positive or go to zero or negative depending on other long-term transactions that year. The Schedule D instructions walk through the netting order.

Rachel P.

Author

That's the part I want to trace through carefully before filing. Good to know the Schedule D instructions lay out the netting sequence explicitly.