How to sell long-term shares first when brokerage lumps lots together

My brokerage account shows a single line for each stock position — no individual tax lots visible in the UI. I bought shares of the same ticker across maybe 6 or 7 different purchases over 3 years, so some lots are long-term and some are short-term. When I went to sell a partial position last month, the default was average cost, which I know isn't right for regular stock purchases (that's only for mutual fund shares and dividend reinvestment plan shares). I switched it to "specific identification" but couldn't tell which lots were which because the confirmation screen just showed a blended share count. I ended up selling and now I'm not sure which lot got reported on my 1099-B. The cost basis method matters a lot here because I want the long-term gain to get the preferential rate, not a short-term gain. How do I actually sell long-term shares first when my brokerage lumps lots together and doesn't make the selection obvious?

32 comments

I had this same headache last year. The key is that for stocks, the IRS requires you to adequately identify the specific shares you're selling at the time of sale — you can't go back and pick after the fact. The rule is in Publication 550. If you don't specifically identify, the IRS treats it as FIFO (first in, first out), which actually works in your favor if your oldest lots are the long-term ones.

Chris J.

Author

That's actually helpful — if I bought oldest first and my oldest lots are over a year old, FIFO default might give me long-term treatment automatically. But I'm worried my brokerage reported something different on the 1099-B. How do I check what basis method they actually used?

Your 1099-B should show the per-share basis and acquisition date for each lot sold. Box 1b is the acquisition date and box 1e is basis. If the date in box 1b predates the sale by more than a year, you're in long-term territory regardless of what the UI showed you.

I uploaded my 1099-B and trade confirmations to taxr.ai last month when I had a lot-identification mess. It went through each covered lot line by line and flagged where the acquisition date would put a sale in short-term vs. long-term, then drafted a summary showing what I'd actually need to prove specific identification if the IRS ever asked. Really cut through the confusion on which Form 8949 boxes applied to each lot.

Chris J.

Author

Did it catch situations where the brokerage had already locked in a basis method you didn't choose?

Specific identification is the method you want but it has to happen before the sale or at the point of sale — you tell the broker which lot by reference to its acquisition date and per-share price. The IRS says you have adequate identification if you get a written confirmation from the broker. So the practical move is: call or message your broker before you place the order, tell them you want to sell X shares acquired on [specific date] at [specific price], and get that in writing (email or in-app message counts).

Does the written confirmation have to come back from the broker the same day, or is there a window?

Publication 550 says you must receive confirmation within a reasonable time — it doesn't specify a number of days, but same day or next business day is the safe standard most practitioners follow.

Few brokerages actually surface lot-level selection well in their retail UI. The ones that do usually bury it under "cost basis method" or "tax lot optimizer" during order entry. If yours doesn't show it at all, calling the trade desk before the order and documenting the call in writing is exactly what the IRS would want to see if your lot selection were questioned later.

When my brokerage merged two positions after a corporate action it scrambled my lot dates entirely. I had Taxr read through the cost basis statement and the corporate action notice side by side — it listed every lot with the adjusted acquisition date and flagged the two where the holding period calculation was off, so I knew before filing whether those sales were long-term or short-term on Form 8949.

Chris J.

Author

Was the corporate action a merger or a stock split? I'm wondering if that's part of why my lots don't show individually.

Mine was a merger, so shares exchanged and new lots opened. A stock split generally keeps the original acquisition date and just adjusts the per-share basis, so your lot dates should survive a split intact.

For what it's worth, the holding period rule under Publication 550 is straightforward: start counting the day after the acquisition date, and the day you sell counts as part of the holding period. For exchange-traded stocks, it's the trade date — not the settlement date — on both ends. So a lot bought on the trade date more than one year before your sale trade date qualifies as long-term.

If you already sold and you're not sure what lot was used — check your trade confirmation first, not just the 1099-B. Trade confirmations often show the specific lot that was matched, especially if specific ID was selected. If it shows "FIFO" or "average cost" that tells you what the broker used.

Chris J.

Author

Mine shows "default method" which I think is FIFO. So if my oldest shares were bought more than a year before the sale date, I should be okay for long-term treatment?

Right. FIFO plus oldest lot being over a year old equals long-term on that portion. You'd report it in Part II of Form 8949 (long-term section), box D or E depending on whether the basis was reported to the IRS. The acquisition date in box 1b of your 1099-B is the confirmation.

Worth noting: even if your broker lumps the visual display together, they almost always maintain individual lot records in the back end. You can usually download a "tax lot detail" CSV from the account documents section. That file will show every lot with its acquisition date, number of shares, and per-share basis — much more useful than the trading UI.

This is the move. I pulled mine and had three lots I didn't even realize were still open from 2021.

Chris J.

Author

Going to look for that file. If I find it and the lot sold was long-term, is there anything I need to do differently on Form 8949 versus if I just rely on the 1099-B?

If the 1099-B already shows the correct acquisition date and basis for the lot sold, and basis was reported to the IRS, you check box A or D on Form 8949 and enter the proceeds and basis as shown. No adjustment needed in column (g) unless something is wrong. If the basis is wrong you use code B in column (f) and correct it in column (g); if the date is wrong you enter the correct date in column (b), and use code T if the 1099-B shows the wrong type of gain.

If your brokerage ever reports a lot as short-term on the 1099-B but you have written proof you designated a different lot that was long-term, you don't just accept the 1099-B as filed. You'd enter the proceeds from box 1d, enter the correct acquisition date in column (b), then enter the 1099-B basis in column (e), and use code B in column (f) with the adjustment in column (g) (plus code T if the 1099-B shows the wrong type of gain). The IRS instruction for Form 8949 is clear that when basis reported to the IRS is wrong under box A or D, you show the 1099-B basis and then adjust.

Chris J.

Author

This is essentially what I'll do next time. The documentation step is what I skipped this time and now I'm piecing it back together.

If your brokerage ever reports a lot as short-term on the 1099-B but you have written proof you designated a different lot that was long-term, you don't just accept the 1099-B as filed. You'd enter the proceeds from box 1d, then enter the correct basis and acquisition date in column (e), and use code B in column (f) with the adjustment in column (g). The IRS instruction for Form 8949 is clear that when basis reported to the IRS is wrong under box A or D, you show the 1099-B basis and then adjust.

Can a broker legally refuse to honor a specific lot designation you gave them before the trade? I always assumed they had to follow it.

In practice, brokers are contractually required to honor valid lot designations made prior to or at the time of sale. If they don't, that's a brokerage error and you'd dispute it through their account services — but the IRS doesn't care about that dispute, they'll go off the 1099-B unless you have documentation to support the correction on Form 8949.

My experience: if you can't reach anyone at the broker before the trade and the UI doesn't let you pick lots, place a small test sale first to see what lot the system matches, then cancel or complete depending on what it shows. Some platforms will actually show you the matched lot on the order review screen even if the main UI doesn't.

One thing I'd double-check: if any of your buys within 30 days before or after a loss sale were in the same ticker, you might have a wash sale complication layered on top of the lot-selection issue. Wash sale rules can disallow a loss and shift the basis to the new lot, which would change your holding period calculation too. Worth scanning your purchase history.

Chris J.

Author

I sold at a gain so wash sale rules wouldn't apply to this particular sale, right? My understanding is wash sales only matter when you're selling at a loss.

Correct — wash sale rules apply only to losses. If you sold at a gain, no wash sale issue regardless of when you bought additional shares.

To pull this together for your current situation: check the lot detail file or trade confirmation for the acquisition date that matched your sale. If box 1b on your 1099-B shows a date more than one year before the sale trade date, it's long-term and goes in Part II of Form 8949. If the basis is exactly what the 1099-B shows and nothing needs correcting, it may even qualify for Exception 1 — you can report it directly on Schedule D line 8a instead of filling out every column of Form 8949.

Chris J.

Author

Didn't know about Exception 1. So if the 1099-B basis is correct and it's long-term with no adjustments, I can skip Form 8949 entirely for that transaction and just put it on Schedule D 8a?

The Exception 1 answer is yes, with one condition: it only works when basis was reported to the IRS (box D on Form 8949, meaning it was a covered security) AND there are no adjustments needed in column (g). If anything needs adjusting — wrong basis, a code, anything — you have to do the full Form 8949 line. The Instructions for Form 8949 at irs.gov spell this out.