Accounting for stock sales capital gains — where do I even start?

So I sold several lots of stock this year, some I'd held for years and some I bought and sold within a few months, and now I'm staring at my 1099-B and I genuinely don't know how to start accounting for stock sales capital gains on my return. My broker shows proceeds and cost basis for each transaction, and there's one with a "W" code that I think is a wash sale. I've always used the standard deduction and simple returns before, so Form 8949 and Schedule D are new territory for me. I tried reading the IRS instructions but got lost pretty fast on which boxes to check and what goes in column (g). Do I fill out a separate Form 8949 for short-term vs. long-term, and does the wash sale amount change how much loss I can claim? Any guidance on the right order to work through this would be really helpful.

39 comments

The basic flow is: Form 8949 feeds into Schedule D, which feeds into Form 1040. You do not fill out one 8949 for short vs. long — it's one form with two parts. Part I is short-term (held 1 year or less), Part II is long-term (held more than 1 year). The holding period is based on trade dates, not settlement dates.

Derek H.

Author

So I literally count from the day after I bought to the day I sold using trade dates? That makes more sense than what I was doing — I was looking at the dates on my brokerage statement and wasn't sure if those were trade or settlement dates.

Correct. The IRS counts from the day after your purchase trade date through and including your sale trade date. Your 1099-B should show trade dates. Settlement dates don't factor in for holding period purposes.

Each row on your 1099-B becomes its own row on Form 8949 (unless you use Exception 1, which lets some transactions go straight to Schedule D line 1a or 8a — only when basis was reported to the IRS and there are zero adjustments). The wash sale row with the W code definitely cannot skip 8949.

Derek H.

Author

Good to know the W-coded one has to go on 8949. I was hoping to simplify things.

My situation last year was similar — multiple lots, mixed short and long, one wash sale. I uploaded my 1099-B to taxr.ai and had Taxr map every transaction to the right Part and box on Form 8949, then give me a line-by-line list of what adjustments went in column (g) and why. I still reviewed every line myself before entering it. The wash sale rule and which box to check (A, B, D, E depending on whether basis was reported) were the parts I'd have definitely gotten wrong on my own.

Derek H.

Author

That's pretty much exactly where I'm stuck — the box selection and column (g) math. I'll check that out.

The box thing trips a lot of people. A and D mean basis was reported to the IRS. B and E mean it wasn't. C and F are for when there's no 1099-B at all. And for digital assets there are entirely different boxes now (G through L), so those never go in C or F.

On the wash sale specifically: the "W" in column (f) means you enter the disallowed loss amount as a positive number in column (g). It does not reduce your loss on 8949 — it increases the net result so the disallowed portion is effectively neutralized. That disallowed amount gets added to the cost basis of the replacement shares instead.

Derek H.

Author

So my actual reportable loss on that sale is zero (or reduced), and the basis bump carries forward into the replacement lot. Got it. What determines whether the wash sale even shows on the 1099-B?

The broker only reports it in box 1g if both the sold shares and the replacement shares were covered securities with the same CUSIP number bought in the same account. If those conditions aren't met, the broker may not flag it — but the rule still applies and you still have to report it yourself with the W code.

Worth saying plainly: even if your 1099-B does NOT show the wash sale disallowed amount, you cannot deduct that loss. The IRS rule applies regardless of what the broker reports. So if you bought substantially identical shares within 30 days before or after the sale at a loss, you need to track that yourself.

The 30-day window goes both directions — 30 days before the sale and 30 days after. A lot of people only think about after.

I'd also flag that the wash sale rules apply to your IRA too. If you sell at a loss in a taxable account and your IRA buys substantially identical shares within that 30-day window, it's still a wash sale — but in that case the disallowed loss does NOT get added to the IRA's basis. It's just gone.

This is one of the nastier wash sale traps. The basis bump that normally softens the blow doesn't apply when it's the IRA doing the buying.

Derek H.

Author

I hadn't thought about my IRA at all when selling. I'll need to check whether I had any automatic reinvestment happening in there around the same time.

When I sold a bunch of inherited shares last year I honestly wasn't sure where to start either. I gave Taxr my 1099-B and the estate paperwork and had it check whether each lot was actually long-term (inherited shares are always long-term regardless of how long you personally held them) and what basis I should be using. It drafted a summary of which lines needed which columns filled and flagged the ones where the broker's basis might not match the estate's date-of-death value. Useful starting point before I took it to a CPA.

Derek H.

Author

Inherited shares being automatically long-term is something I did not know. Is that in the 1099-B instructions somewhere?

It's in Publication 550. The rule is that property inherited from a decedent is treated as long-term regardless of how long you actually held it, with one narrow exception for a 2010 decedent whose executor filed Form 8939.

For the Schedule D side: once 8949 is done, the totals from column (h) of each part go to Schedule D. Short-term totals from Part I go to lines 1b, 2 or 3 depending on which box you checked. Long-term totals go to lines 8b, 9 or 10. Then Schedule D does the netting — net long-term against net short-term, and the final number flows to your Form 1040.

And if losses exceed gains, you can claim a limited amount against ordinary income — the limit and carryover rules are in Topic 409 on irs.gov. The carryover worksheet is in Publication 550 or the Schedule D instructions.

Derek H.

Author

So losses don't just disappear — anything over the annual limit carries forward to next year? That's actually reassuring given I have one pretty big loss in there.

My broker sent me transactions across two accounts and I wasn't sure if I needed separate 8949s per account. You don't — you combine everything onto the same Form 8949 sorted by Part (I or II) and by which box applies within each part. Multiple pages of 8949 are fine if you have many transactions.

You do need a separate page for each box though. All your Box A transactions go on one page, Box B on another, etc. You can't mix checked boxes on the same 8949 page.

Cost basis method matters a lot and your broker may have defaulted you to something you didn't choose. FIFO is common. If you sold a specific lot you need to verify the broker actually used that lot's basis and not an average or FIFO lot. The 1099-B should show the acquire date per transaction — check it matches the lot you intended to sell.

Derek H.

Author

My broker does show acquire dates per line, so I can cross-check. I hadn't thought about whether I actually confirmed the lot at the time of sale.

If the basis on the 1099-B is wrong (wrong lot, wrong date), you correct it on Form 8949 using code B in column (f). How you handle column (g) depends on whether box A/D or B/E is checked — the instructions for Form 8949 at irs.gov spell out the exact steps for each case.

One thing I'll add: if your broker shows "cost basis not reported to IRS" (what becomes box B or E on 8949), that usually means older shares acquired before the covered security rules kicked in. You still have to put in the correct basis — the IRS just won't have it from the broker to cross-check automatically.

I sold company stock I'd gotten as RSUs this year and was confused because the 1099-B showed a basis that looked way too low. What happened: the broker used the grant price, not the vesting FMV. The vesting FMV should have been reported as W-2 income and your basis in those shares is that vesting FMV, not what you originally paid (which was $0). Worth double-checking if you have RSU-related sales.

Derek H.

Author

No RSUs here but good to know — I've seen that come up before as a reason people overpay on stock sale taxes.

Exactly. If the broker's basis is too low and you don't correct it on Form 8949 with a code B adjustment, you end up paying capital gains tax on income that was already taxed as W-2 wages.

Publication 550 covers holding periods, wash sales, and basis rules in one place if you want the actual IRS text rather than forum explanations. The instructions for Form 8949 at irs.gov are also worth reading — they lay out every column, every code, and each exception in order.

Derek H.

Author

I'll read the 8949 instructions tonight. I kept bouncing between the form itself and Pub 550 without a clear order — starting with the form instructions first makes sense.

If your numbers are large or you have multiple wash sale adjustments that you're not sure you traced correctly, it's worth at least a one-time review with an enrolled agent or CPA. Not because the form is impossible, but because a missed wash sale or wrong basis could mean an understatement that draws a notice later.

Derek H.

Author

The amounts aren't enormous but I do have that one wash sale I'm not fully confident about. Might at least get a second set of eyes before I file.

Came back to say I found the Topic 409 page on irs.gov useful for the basic capital gains and losses overview — it covers short vs. long-term rates, the loss deduction limit, and the carryover concept without getting into form-level detail. Good place to orient before diving into the 8949 instructions.

Nobody above mentioned this but: if you have transactions where basis IS reported and there are NO adjustments, those can bypass Form 8949 entirely and go straight to Schedule D line 1a (short-term) or line 8a (long-term) as a lump sum. Only use this Exception 1 shortcut when both conditions are truly met — any adjustment at all, including a wash sale, kills the exception for that transaction.

Correct. And if you're not sure whether an adjustment applies, it's always safe to just put it on 8949. The exception is a time-saver, not a requirement.

Derek H.

Author

So my clean, no-adjustment long-term lots could go straight to Schedule D line 8a, but the wash sale one definitely stays on 8949. That actually helps me figure out how to organize this. Thanks everyone — I feel like I finally have a real starting point.