Long-term vs short-term gains when selling same stock bought at different times

Trying to figure out long-term vs short-term gains when selling same stock bought at different times and my brokerage's tax lot screen is making my head spin. Here's the situation: I've been buying shares of the same company in small batches over about 3 years. Some lots are definitely over a year old, some are only 4-5 months old. I sold a chunk last month and just told the brokerage to use "first in, first out" but I didn't really think about which lots were long-term vs short-term until now. My 1099-B came and it shows two separate lines for the same ticker—one with a short-term gain and one with a long-term gain. I wasn't expecting that. Does each lot get its own holding period calculation? And does the split on the 1099-B mean I need separate rows on Form 8949 or can I combine them somehow?

34 comments

Yes, each lot has its own holding period. The IRS counts from the day after you acquired each lot to the trade date you sell. So if you bought some shares 14 months ago and some 5 months ago, they land in completely different buckets even though it's the same ticker.

Olivia D.

Author

That makes sense in theory. So FIFO just means the oldest lots go first, which pushed my earliest purchases into long-term territory. The newer ones stayed short-term. I think I see now why the 1099-B split it.

FIFO will do exactly that—oldest lots first, so you get a mix when your purchase dates straddle the one-year mark. I had the same kind of multi-lot mess last year and uploaded my 1099-B to taxr.ai. It walked through each lot's holding period and flagged which lines belonged in Part I vs Part II of Form 8949. Saved me from putting a long-term lot in the short-term section by mistake.

Olivia D.

Author

Good to know it can parse the lots like that. I'm going to look at it tonight.

Wait, do you actually have to enter every single lot as its own row on 8949? My 1099-B has like 20 lines for the same stock from dividend reinvestments.

There's an Exception 1 in the Form 8949 instructions worth knowing: if your broker reported basis to the IRS and there are no adjustments, those transactions can go straight to Schedule D line 1a (short-term) or line 8a (long-term) as a lump sum without itemizing each one on 8949. But you have to separate the short-term total from the long-term total—you can't combine across those two categories even in the summary.

Olivia D.

Author

Exception 1 sounds like my way out of the reinvestment rows. So I could potentially avoid listing every reinvestment row on 8949 as long as there are no adjustments and basis was reported. Need to check the box checked on each 1099-B line.

The box checked matters a lot here. Box A on your 1099-B means short-term with basis reported to the IRS. Box D means long-term with basis reported. Those are the ones potentially eligible for the Schedule D summary shortcut. If any lines have Box B or E (basis not reported) you do need to itemize those on 8949.

Worth adding: if any lot triggered a wash sale, there's a code W adjustment required in column (f) of 8949 and those can't go on the Schedule D summary line either. That knocks them out of Exception 1.

Is there a scenario where selling the same stock produces both a long-term gain AND a short-term loss from the same sale order? Asking because I sold a block and I think one of my newer lots actually lost money.

Absolutely. Each lot's gain or loss is figured independently. You could have the 14-month lot with a long-term gain and the 5-month lot with a short-term loss in the same sell order. They net within their own category on Schedule D and then the categories net against each other following the Schedule D netting rules.

Ok that's what I was afraid of. My short-term loss won't just cancel out my long-term gain directly in a clean way then.

How did you tell the brokerage which specific shares to sell? Because if you didn't formally elect specific identification before the sale settled, FIFO is typically the default and you're locked in to those lots for that sale.

Olivia D.

Author

I confirmed FIFO at the time of the trade, yes. I didn't try to pick specific lots. Looking back I probably should have—some of my long-term lots have a higher cost basis than the short-term ones and I might have minimized the gain.

Something to keep in mind going forward: you can elect specific identification lot by lot if your broker supports it, before the trade settles. That lets you choose which lots to sell strategically—say, sell a high-basis long-term lot rather than a low-basis short-term lot. Doesn't help for the trade already done but useful next time.

My broker's 1099-B had me confused last year because it grouped some lots together without explaining why. I uploaded the whole 1099-B to Taxr and had it check whether the proceeds and basis on each line matched the lot detail I could see in my account history. It found one line where the basis looked like it was using the wrong purchase date, which would have put a long-term lot into the short-term section. Caught that before I filed.

Olivia D.

Author

A wrong purchase date quietly flipping a lot into short-term would slip right past me if I checked by hand. I have 11 lots across the two buckets. Definitely going to cross-check the dates.

Does the 1099-B show the acquisition date for each lot? Mine doesn't always list it clearly and I have to go back to trade confirmations.

The 1099-B should show the date acquired for each lot when it's a covered security. If it doesn't, you need your trade confirmations. The holding period rule for securities on an established market: holding period starts the day after the trade date you bought and ends on the trade date you sold—not the settlement date. That's the date that determines long-term or short-term.

Settlement date trips a lot of people up. Trade date is what counts for the holding period. Settlement date matters for other things like whether the proceeds show in the right tax year.

Also worth flagging: if you hold the stock in multiple accounts at the same broker, wash sale tracking may only apply within the same account and same CUSIP in box 1g. Losses from one account don't automatically get reported as disallowed because of a buy in a different account—but the wash sale rule still legally applies even if the 1099-B doesn't show it.

Right, the 1099-B box 1g limitation is a reporting limitation, not a legal one. You can still have an untracked wash sale you're responsible for reporting yourself with code W in column (f) of 8949.

Dealing with multi-lot sales is where I always made small errors before. I gave Taxr my 1099-B and my brokerage's lot detail report and had it build out the 8949 lines—which went to Part I with box A, which to Part II with box D, and whether any needed column (g) adjustments. Reviewing a filled-in draft is way faster than starting from a blank form.

Olivia D.

Author

This is probably the approach I'll take. Having the draft laid out by part and box before I enter anything in my tax software sounds a lot cleaner than toggling back and forth.

Can you just net all the lots yourself and report one number? I've seen people do that.

No. Short-term and long-term can't be combined into one number on 8949 or Schedule D. They have to stay separate because they're taxed differently. And if any lots have broker-reported basis vs non-reported basis, those separate into different boxes too. Netting across those buckets before entering them is a reporting error.

Got it, I had no idea they were that strict about keeping them separate.

What tax software are you using? Some of them import the 1099-B directly and handle the Part I / Part II split automatically based on the dates. Cuts down on data entry errors.

Olivia D.

Author

Using one of the major ones—it does import, but I noticed it doesn't always reconcile the imported lots against what my brokerage portal shows. That's why I want to verify manually before I file.

If any of your short-term lots show a loss, double-check whether you bought more shares of the same stock within 30 days before or after the sale. That 30-day window on both sides catches a lot of people. If so, that loss is disallowed under the wash sale rule and needs code W in column (f) of 8949 with the disallowed amount as a positive number in column (g).

And the disallowed loss isn't just gone—it gets added to the basis of the replacement shares. So it defers the loss, doesn't eliminate it permanently (as long as the replacement shares weren't bought inside an IRA, in which case the loss is gone for good).

If you want the trade-date rule and the day-counting straight from the source, the holding period section of Publication 550 on irs.gov lays both out well. Worth a read if you want to verify your lot dates yourself before entering anything.

Wrapping up what I'd take from this thread: each lot is its own row on 8949 unless you qualify for the Schedule D summary exception, short-term goes Part I and long-term goes Part II, the box checked (A/B for short-term, D/E for long-term) depends on whether basis was reported to the IRS, and you count holding period from the day after trade date to the trade date of the sale.

Olivia D.

Author

Having all of that spelled out in one place is what I was missing. Going to verify my lot dates against trade confirmations, check which 1099-B boxes are marked, and sort into the right 8949 parts. Thanks everyone.