How to decide how much capital gains tax to pay to diversify tech stocks

Been sitting on a concentrated position in a few large-cap tech names for about six years. The unrealized gain is significant and I want to start spreading into other sectors, but every time I run the numbers I freeze up. My broker shows the cost basis and estimated proceeds but doesn't tell me how much of the gain I should actually realize this year versus spreading across multiple years. I've been trying to model it on a spreadsheet but I keep second-guessing whether I'm accounting for the right rate, whether my other income pushes me into a different bracket, and whether my existing losses elsewhere offset anything. Is there a standard way to approach how much capital gains tax to pay to diversify tech stocks without triggering a giant bill all at once? Do people usually do this in tranches across December and January to straddle two tax years?

39 comments

Schedule D is where this all lands eventually, but the decision of how much to realize in a given year really comes down to where your other income sits. Long-term rates are tiered, and crossing a threshold can cost you more than you expect on the marginal shares you sell. The IRS Topic 409 page lays out the rate structure — look at that before you model anything.

Omar G.

Author

I've read 409 a few times. The problem is I can't figure out what my "other income" will be precisely until late in the year because of a bonus. So I'm always estimating.

That's exactly why people sell in tranches. Leave a buffer below where you think the next tier starts, then do a true-up in January in the new tax year if you have room.

The December/January straddle is real and a lot of people do it. Sell a tranche before Dec 31, let the next one go in early January. You get two tax years to absorb the gains. Just watch the wash sale rules if you're selling at a loss anywhere else in that window — a loss sale within 30 days of buying back a substantially identical position is disallowed.

Omar G.

Author

Good point. I do have one position I sold at a loss in November that I was thinking of re-entering. That 30-day window would catch me if I buy back too soon.

Right, and it's not just your own account — if your spouse buys the same security in that window, the wash sale rules still apply. The disallowed loss just gets added to the new shares' cost basis rather than being permanently lost, but it defers the deduction.

Something people miss: net investment income tax applies on top of the regular long-term rate once your modified AGI clears a certain level. The rate and threshold are in the Form 8960 instructions. If you're doing large tech stock sales you may already be in that territory.

This comes up in every high-income diversification thread. The 8960 layer is real. Worth modeling it as a separate line in your spreadsheet before you commit to a tranche size.

I was in almost this exact spot last fall — big tech position, wanted to rotate into broader index funds. I uploaded my 1099-B and my draft Schedule D to taxr.ai and it compared the proceeds and cost basis columns line by line, flagged where my holding periods looked short-term versus long-term, and produced a summary of the gain by lot. That made it much easier to decide which lots to sell first (highest basis, longest hold). Worth trying before you commit to a tranche.

Omar G.

Author

Did it catch anything your broker's statement missed? My 1099-B sometimes has adjusted basis for options exercises and I'm never sure if the numbers are right.

It flagged one lot where the basis looked like it hadn't been adjusted for a prior wash sale disallowance. The broker had the right number in box 1g but the cost basis column didn't reflect it. That would have overstated my loss.

Form 8949 is where each lot actually gets reported. If you have basis reported to the IRS (box A or D checked), you enter the proceeds from column (d) and the basis from your 1099-B in column (e) even if you think it's wrong — then correct it with an adjustment in column (g). Knowing this matters for your planning because you need to track lot-level basis, not just totals.

Omar G.

Author

So if my broker reports an incorrect basis and it's a covered security, I still enter their number in column (e) and put the correction in column (g)?

Exactly. Code B in column (f) flags the correction. The adjustment in column (g) is negative (in parentheses) when your correct basis is higher than what the broker reported, which lowers the gain.

Spreading sales across years is smart but don't forget estimated tax payments. If you realize a large gain mid-year and don't adjust your withholding or pay estimated tax, you can owe underpayment penalties. The IRS Form 2210 covers that calculation.

Omar G.

Author

Estimated payments always slip my mind. My day job withholding covers my salary income but a big stock sale in Q2 would leave me short for that quarter.

Highest-basis lots first is the standard approach, but it's worth checking whether any lots are short-term. A lot you've held 12 months or less gets taxed at ordinary rates, not long-term rates. The holding period rule under Publication 550 counts from the day after trade date to the trade date of sale.

Important detail: it's trade date to trade date for securities on an established market, not settlement date. Easy to get the holding period slightly wrong if you're counting calendar days on a statement.

Have you thought about whether any of your existing losses can offset the gains? If you have capital loss carryforwards from prior years, those reduce the net gain on Schedule D before any rate calculation. Might mean you can sell a larger tranche this year than you think.

Omar G.

Author

I do have a small carryforward from 2022. I never know exactly how much until I dig out last year's return. It's on the Schedule D Carryover Worksheet.

Correct — whatever net loss exceeded the annual deduction limit carries to the next year's Schedule D. It keeps its character — a short-term carryover offsets short-term gains first and a long-term carryover offsets long-term gains first — so the character of your carryforward matters too.

Donor-advised funds are worth a mention here even though they're not a tax form thing. If you donate appreciated shares directly instead of selling them, you avoid the capital gains entirely on those shares. Doesn't answer the question for every lot but it can reduce the size of the taxable tranche.

Agreed, and you get the charitable deduction based on FMV at contribution, not your original basis. Changes the math on how much you need to sell to hit your diversification target.

I made the mistake of assuming all my tech stock was long-term because I'd had the accounts for years. But RSUs vest in tranches, and each vest creates a new lot with its own holding period starting from the vest date. Check whether any of your position came from RSU vests in the last 13 months.

Omar G.

Author

Yes, some of this is RSUs. The vested shares' basis is the fair market value at vest, included as ordinary income at that time, right? So the gain is only the appreciation since vest.

Exactly. Your basis in those lots is the FMV at vest (what was taxed as compensation), and your holding period starts from the vest date, not the grant date. Each vest is its own lot on Form 8949.

I ran into the net investment income question last year when I sold a chunk of a concentrated position. I gave Taxr my Schedule D draft and Form 8960 together and it walked through how the gain fed into the MAGI calculation and whether I'd crossed the threshold. Helped me see that selling one fewer lot kept me just under. The Form 8960 instructions are the place to verify the numbers yourself.

Omar G.

Author

This is exactly the kind of threshold modeling I need. I'll check the 8960 instructions. Did you do this before or after the sale?

Before. That's the whole point — once the trade settles, the gain is realized and you can't undo it without triggering a new transaction. Model it first, then place the order.

If the position is large enough that one or two years of tranching isn't going to get you diversified without serious tax cost, it may be worth talking to a CPA or financial advisor about exchange funds or other structures. I'm not in that territory but some people are.

I had a lot of moving pieces last tax season — RSUs, ISO exercises, and regular brokerage sales all in the same year. I gave Taxr my 1099-B, my Form 3921, and my Schedule D draft and it listed out which lots were short-term versus long-term, flagged the AMT adjustment line on Form 6251 for the ISO exercise, and drafted a worksheet showing the total gain by character. Really cut down the time I spent reconciling before I handed everything to my CPA.

Omar G.

Author

Form 6251 is what I want to avoid triggering, honestly. The AMT spread on an ISO exercise in the same year as a big stock sale sounds like a nightmare to model.

If you don't dispose of the ISO shares in the same year you exercise, the spread goes on Form 6251 line 2i as an AMT adjustment and raises your AMT basis in those shares. If you sell in the same exercise year, there's no AMT adjustment at all. That's a meaningful difference in planning.

Coming at this from a different angle: your state tax matters a lot here too. Some states tax long-term gains at the same rate as ordinary income, so the federal-only model understates your real cost. The state piece doesn't change the federal forms but it changes how much room you actually have in a tranche.

True, and a few states don't have capital gains tax at all, which shifts the whole calculus. Worth a line in the spreadsheet for state tax before you finalize any tranche size.

To bring the form side together: once you've decided on a tranche, each lot goes on Form 8949 (short-term in Part I, long-term in Part II), the totals flow to Schedule D lines 1b, 2, or 3 for short-term and lines 8b, 9, or 10 for long-term, and the net gain feeds into Form 1040. That chain is what your estimated payment in Form 1040-ES should be based on.

Omar G.

Author

So I'd actually model the 8949 lot by lot, sum to Schedule D, then apply the rate to the net long-term gain — and use that number to figure my estimated payment due for the quarter the sale settles?

That's the right sequence. The rate that applies depends on where the net gain lands relative to your other taxable income, which is why you need to model the full return, not just the Schedule D in isolation.

Holding period, wash sale rules, and how losses offset gains are all laid out in one place in Publication 550 at irs.gov. If you haven't read chapter 4 end to end, it's worth doing before you finalize your tranche plan. The wash sale section in particular is more detailed than most broker FAQs.