How to reduce taxes owed after large capital gains from selling investments

Sold a chunk of my taxable brokerage account this year — mix of individual stocks and two ETFs I'd held for a while. The 1099-B my broker sent shows a lot of long-term gain and a smaller short-term piece. When I ran the numbers in my tax software, the federal bill came out way higher than I expected, partly because the gains pushed my income into a higher bracket for other things too. I already maxed my 401(k) through work. I looked at harvesting some losses but most of my remaining positions are still up. Is there anything I can actually do before I file — or even before year-end — to bring the number down? Or am I basically just paying whatever Schedule D spits out?

38 comments

Schedule D and Form 8949 are where the gains land, but the levers to pull are mostly upstream of those forms. A few things worth checking before year-end: — Tax-loss harvesting: even one or two positions showing a loss can offset gains dollar for dollar. Watch the wash sale window (30 days before and after the sale if you rebuy something substantially identical), or you lose the deduction. — If you have appreciated stock you were planning to donate anyway, donating shares directly to a qualified charity lets you avoid recognizing the gain entirely. — Maxing a traditional IRA (if you're eligible to deduct it) reduces your AGI, which can help with the bracket spillover. None of these change the Schedule D math directly, but they reduce what stacks on top of or against it.

Tara S.

Author

The loss harvesting is tricky in my case since most positions are up. But the IRA deduction angle is worth checking — I haven't contributed for this year yet.

Worth adding: the wash sale rule also applies if your spouse buys the substantially identical security, or a corporation you control does. Easy to miss if you have a joint account.

One thing people overlook is whether any of the gains on that 1099-B are actually qualified dividends being misread as capital gains, or vice versa. They're taxed differently and show up in different places. Capital gain distributions from the ETFs, for example, can sometimes be partly or fully unrecaptured Section 1250 gain or collectibles gain, which are taxed at different rates than standard long-term gains. Worth looking at the year-end fund statement or the fund's website to see the breakdown before you finalize anything.

Tara S.

Author

I hadn't thought about the ETF distribution breakdown. I'll pull the fund's tax guide for the year.

This is a real one. 1250 recapture showing up inside a fund distribution caught me off guard a couple years ago. It doesn't change Form 8949 but it does affect Schedule D line 19 and the Unrecaptured Section 1250 Gain Worksheet.

Publication 550 at irs.gov has a solid section on holding periods that tripped me up the first time I had a big gain year. The holding period starts the day AFTER the trade date you bought, and ends ON the trade date you sold — not settlement dates. Worth double-checking any position you thought was long-term that was close to the one-year mark, because short-term rates can be significantly higher. I ran my own 1099-B through taxr.ai last year after a similar sale. It read each transaction line by line, flagged two positions I'd miscategorized as long-term that were actually short-term, and laid out the corrected Form 8949 entries so I could review them before my preparer touched the return.

Tara S.

Author

That's exactly the kind of error I could make. Some of my buys were in tranches and I honestly wasn't tracking trade dates carefully.

Holding period rule is also different for inherited property — that's always long-term regardless of how long you actually held it. Doesn't sound like OP's situation but worth knowing.

If you have any capital loss carryforwards from prior years, those apply first against this year's gains on Schedule D before you get to any net taxable amount. Check your prior year Schedule D or the carryover worksheet. People forget they're sitting on carryforwards from a down year and then panic unnecessarily.

Tara S.

Author

I did have some losses in 2022. I'll check if anything carried forward — I think my software tracked it but I never looked closely.

Carryforwards can be short-term or long-term and they stay in their category — short-term carryforward goes against short-term gains first, then long-term. The order matters for the net rate you end up paying.

Qualified Opportunity Zone funds are another option if you have a longer time horizon and gains to defer, but that's a pretty involved decision — not a quick fix. Worth mentioning exists though.

Topic 409 on the IRS site lays out the capital loss limit clearly: if your losses exceed your gains, you can only deduct a limited amount against other income in a single year, and the rest carries forward. See the official page for the current limit — it differs for married filing separately. So don't expect harvested losses to wipe out the whole gain if they exceed it; they carry over and help you in future years.

Correct, and the carryover isn't lost — it carries forward indefinitely until used up. The Capital Loss Carryover Worksheet in Publication 550 or the Schedule D instructions walks through the calculation.

Form 8949 is where the detail lives — Schedule D just summarizes it. If you have a lot of transactions you can sometimes use Exception 1 from the Form 8949 instructions: transactions where your broker reported basis to the IRS and there are no adjustments can go straight to Schedule D line 1a (short-term) or line 8a (long-term) without listing every trade on Form 8949. That can simplify things but doesn't reduce what you owe. For actual reduction, I had a situation with a large sale and some wash sale codes showing up in box 1g of my 1099-B. I uploaded the 1099-B to Taxr and it walked through each transaction, matched the W codes to the right column (f) entries on Form 8949, and showed me which disallowed losses were being added back to the basis of the replacement shares. Helped me see which of those replacement positions now had a higher cost basis I'd recover when I eventually sold them.

Tara S.

Author

I do have a couple of W codes on my 1099-B that I wasn't sure how to handle. Good to know they go in column (f) with the adjustment in column (g).

Column (g) for a wash sale disallowed loss goes in as a positive number — the instructions are clear that the amount not allowed is entered as a positive in that column, which reduces the deductible loss. Easy to enter it backwards.

On the charitable giving angle mentioned earlier: if you have a donor-advised fund or are thinking about opening one, you can bunch several years of charitable giving into one year, donate appreciated shares, avoid the capital gain entirely on the donated shares, and take the full fair market value as a charitable deduction. Doesn't help if you don't itemize, but worth knowing the structure exists.

Deduction only matters if you're itemizing. If you're taking the standard deduction anyway, the DAF bunching strategy is the reason people use it — concentrate contributions in one year to clear the standard deduction threshold.

Something worth knowing: the net investment income tax (NIIT) can apply on top of regular capital gains tax if your modified AGI clears a certain threshold. It applies to net investment income including capital gains. The IRS instructions for Form 8960 cover this — worth pulling that form up if your income is elevated from the sale. Reducing AGI (traditional IRA contributions, HSA if you have an eligible plan) can help here too.

Tara S.

Author

I hadn't thought about the NIIT angle at all. I'll look at Form 8960 and see if I'm in the range where it kicks in.

Installment sales are another lever if the sale hasn't happened yet or if the asset wasn't a publicly traded security — spread the gain recognition over multiple years. But that ship has sailed if you already sold through a broker.

Publication 551 has the basis rules that sometimes help — if you're not sure your broker has the right cost basis on the 1099-B, you can correct it on Form 8949. Enter the proceeds from the 1099-B in column (d) as shown. If basis was reported to the IRS (box A or D checked), enter the broker's basis in column (e) even if it's wrong, then put the adjustment in column (g) as a negative if your correct basis is higher, and use code B in column (f). That adjustment directly reduces your taxable gain.

Basis errors are more common than people realize, especially for shares acquired through dividend reinvestment or old transfers between brokers. Worth pulling your own purchase records against what the 1099-B shows.

Tara S.

Author

I have some older positions that transferred from a previous broker and I was never confident the basis came over correctly. This gives me a concrete way to fix it.

Roth conversions are sometimes suggested in a high-income year but they'd actually add to your taxable income, not reduce it — so that's the wrong direction here. What can help is the opposite: if you have a traditional IRA and made nondeductible contributions, Publication 590-B covers the basis tracking through Form 8606, but that's about distributions, not reducing gains. I uploaded my full brokerage statement and prior-year Schedule D to Taxr after my own large-gain year. It compared the carryforward amounts, identified which losses were short-term vs. long-term, and drafted a summary of how they'd net against this year's gains on Schedule D — I reviewed the whole thing before handing it to my CPA.

Roth conversion point is right. It increases AGI, which is the opposite of what you want when trying to reduce the NIIT exposure or bracket spillover from gains.

Tara S.

Author

Good catch on the Roth conversion — I actually saw that suggested somewhere online and was tempted to try it this year. Would have made things worse.

If the gains are large enough that you're unsure about estimated tax penalties, look at the Form 2210 situation. If you didn't pay enough through withholding or prior-year estimated payments to cover this year's liability, you may owe an underpayment penalty. There's a safe harbor based on last year's tax liability — the Form 2210 instructions spell out the thresholds. That's separate from reducing the gain itself but affects what you owe at filing.

Tara S.

Author

This is a real concern for me. I didn't make any estimated payments because I didn't expect the gains to be this large when I sold. I'll pull Form 2210.

Timing of additional sales matters a lot before year-end. If you have any positions at a loss right now, selling before December 31 locks in the loss for this tax year and it offsets on the same Schedule D. After January 1 it's a different tax year. If you're harvesting losses, also watch that the 30-day wash sale window doesn't cross into the new year — selling on December 20 and rebuying the same thing on January 5 triggers the wash sale rule the same way.

The 30-day window runs both directions — 30 days before AND after the sale. So if you bought something in a down period 25 days ago and then sell at a loss today, that prior purchase can trigger the wash sale on the earlier buy too.

To pull this all together practically: the main moves before you file are (1) harvest remaining losses if any exist, watching the wash sale window on both sides; (2) verify cost basis on the 1099-B against your own records and correct it on Form 8949 if the broker is wrong; (3) check for any carryforward losses from prior years on last year's Schedule D; (4) consider a deductible traditional IRA contribution if you're eligible; and (5) pull Form 8960 to see if the net investment income tax applies. The IRS Topic 409 page and Publication 550 at irs.gov are both worth reading through for the capital gains rules specifically.

Tara S.

Author

This is a helpful checklist. The basis verification and the carryforward check are probably the two things I'm most likely to have gotten wrong without realizing it.

Agreed on the carryforward check — I've seen people miss four-figure carryforwards because they switched tax software and the old amount didn't import. Always worth verifying against the actual prior-year return.

If the gain is large enough that you're thinking about professional help, an enrolled agent or CPA who specializes in investment taxation is worth consulting before you file — not after. Options like opportunity zone deferrals, charitable strategies and basis corrections all need to be set up correctly. A mistake on Form 8949 that understates gain could trigger a CP2000 notice later when the IRS matches it against the 1099-B.

Tara S.

Author

I think I'll handle the basics myself but bring in a CPA to review before I file. The gain is big enough that I don't want to miss something that triggers a notice.