How to reduce tax on short-term capital gains as a salaried employee

Filing my return this year and realized I have a decent amount of short-term capital gains from stocks I sold after holding them under a year. I'm a W-2 employee so my salary already pushes me into a higher bracket, and stacking these gains on top makes it worse. I know long-term rates are better but I already sold the positions. What I'm trying to figure out now is whether there's anything I can still do — harvesting losses, timing moves for next year, contributing more to accounts — to reduce the tax hit on short-term capital gains as a salaried employee. I've tried reading Publication 550 but got lost. Already maxed my 401k contributions for the year. Is there anything left or am I just stuck paying ordinary income rates on all of it?

33 comments

Short-term gains get taxed at your ordinary income rate, same as wages — no special rate break available for them. The main lever most people have is tax-loss harvesting: sell other positions that are currently underwater to generate capital losses, which offset your short-term gains dollar for dollar on Schedule D. Net short-term losses offset short-term gains first, then long-term gains, then up to the annual limit against ordinary income if losses still exceed gains. You don't get to cherry-pick which gains a loss offsets — the netting rules on Schedule D determine the order. The critical thing: watch the wash sale rule. If you sell a losing position and buy it back (or buy something substantially identical) within 30 days before or after, the loss is disallowed and gets added to the cost basis of the replacement shares instead.

Victor H.

Author

So if I sell an ETF at a loss and immediately buy a similar but not identical ETF, that wouldn't trigger wash sale? I want to stay invested but still realize the loss.

Correct — "substantially identical" is the standard. Switching from one S&P 500 ETF to a total market ETF is the approach a lot of people use, though there's no IRS bright-line rule defining it. The holding period of the new shares would include the old shares' period if the wash sale rule did apply, per Publication 550, but if they're genuinely not identical you're fine.

Have you looked at whether you have any long-term losses sitting in your portfolio? Long-term capital losses offset long-term gains first on Schedule D, and any net long-term loss left over then offsets your net short-term gain. So if you're holding positions you've had over a year that are in the red, selling those now could reduce your short-term gain exposure, to the extent those losses exceed any long-term gains you have.

Victor H.

Author

Yeah I actually do have a few positions I've held over a year that are down. Didn't realize long-term losses could offset short-term gains — that's worth checking.

Yes, the Schedule D netting works in a specific order: short-term gains and losses net against each other, long-term gains and losses net against each other, then the two nets combine. So a long-term net loss does reduce a short-term net gain on that final combination.

Deferred comp or an HSA if your employer offers one — both reduce your W-2 income, which lowers the bracket your gains sit in. You said you maxed your 401k already. If you have a high-deductible health plan, contributing to an HSA lowers adjusted gross income directly. Doesn't eliminate the gains tax but every dollar of AGI reduction helps when you're near a bracket threshold.

Victor H.

Author

I do have an HDHP actually. Haven't maxed the HSA this year. Good reminder.

Something that helped me sort out my own situation: I uploaded my 1099-B to Taxr (taxr.ai) and asked it to map each transaction to the right Part and box on Form 8949, flag which ones had wash sale codes, and show me exactly how the Schedule D netting would work after I harvested a few more losses. It laid out the transactions in order and showed me which loss sales would still move the needle and which ones were too small to matter after the wash sale disallowance. Saved me from selling positions I thought would help but actually wouldn't have. On the actual strategy: if losses in your portfolio can't cover everything, there's nothing that converts existing short-term gains to long-term — you're locked in on those. Future planning is about holding positions over a year before selling.

Victor H.

Author

That's really useful. I've been trying to manually trace through the 8949 and it's genuinely confusing with the multiple boxes and the netting. Might try that.

Worth clarifying one thing about the $3,000 rule — if your capital losses end up exceeding your capital gains, you can apply up to $3,000 of that net loss against ordinary income (like your W-2 wages) in the same year, with the rest carrying forward to future years. The carryover keeps its character — long-term loss carryover stays long-term. The Capital Loss Carryover Worksheet in Publication 550 or the Schedule D instructions walks through the calculation. For a married person filing separately the limit is $1,500.

Is the carryover automatic or do you have to elect it?

No election — it's automatic. You figure it with the worksheet and it carries forward on your records. Just make sure you use it correctly the following year on Schedule D.

Realized gains are what they are for the year, but what you can still control before December 31 is which losing positions you harvest and whether any of them fall into wash sale territory. Run through your whole portfolio now. The ones you've held over 30 days since your last purchase of that security are the cleanest to sell without wash sale complications on the buy side. Check whether you plan to buy anything similar in the next 30 days too — that forward window matters just as much.

I did something similar last year — had a pile of short-term gains from selling tech positions quickly. I gave Taxr my 1099-B and asked it to draft a loss-harvesting worksheet showing which of my remaining positions, if sold, would offset my short-term net gain versus trigger wash sale issues given my recent purchase history. It listed each position with the 30-day look-back and look-forward windows and flagged three that would have been disallowed. That let me decide which ones to actually sell before year-end without guessing. The rule on wash sales is in Publication 550 at irs.gov/publications/p550 — the disallowed loss gets added to the basis of the replacement shares, not just lost forever.

Victor H.

Author

The basis adjustment piece is something I keep forgetting — the loss isn't gone, it just moves to the new shares. That actually makes the wash sale slightly less bad than I thought.

Yes — it increases the cost basis of the shares you bought, which reduces the gain (or increases the loss) when you eventually sell those. The holding period of the original shares also carries over to the new ones under the wash sale rule, per Publication 550.

If you have gains on positions you still want to hold long-term, don't sell them now just to trigger a loss elsewhere. The tax cost of realizing a gain you didn't need to realize can outweigh whatever loss you harvested. The math has to actually work in your favor after you account for what you give up.

One angle people miss when they're salaried: if your employer offers a nonqualified deferred compensation plan (not a 401k), deferring income there reduces W-2 income in the current year, which can pull your bracket down. That indirectly affects how hard the short-term gains hit because those gains stack on top of whatever your ordinary income is. These plans have their own rules and risks so it's worth talking to a CPA or financial planner before using one.

Victor H.

Author

My employer does have something like that. Hadn't connected it to the gains situation. Worth a conversation with HR.

Heads up on Form 8949 — you have to check the right box for each transaction. Part I is short-term, Part II is long-term. Within each part: box A if your broker reported the basis to the IRS on the 1099-B, box B if the basis wasn't reported, box C if there was no 1099-B at all. Getting the wrong box checked doesn't change your tax but it can generate an IRS notice asking for clarification. For digital assets in 2025 there are new boxes G through L — don't put crypto in the standard A/B/C or D/E/F boxes.

Didn't realize crypto got its own boxes now. I've been putting it in box C. Is that a problem for prior years?

The new boxes G through L apply to the 2025 Form 8949 going forward. For prior year returns you filed already, the instructions for those years governed — you'd only amend if there was an actual error in the numbers, not just the box. Check the Instructions for Form 8949 at irs.gov/instructions/i8949 for the 2025 rules.

Don't overlook the timing of when you actually receive year-end bonuses if you have any. If a bonus pushes you into a higher bracket in December, your short-term gains get taxed at that higher marginal rate. Deferring a bonus into January — if your employer allows it and sets it up properly — could matter. That's very much a conversation with payroll and potentially a CPA, not something to do informally.

The honest answer for future years is simply hold positions longer than a year. Long-term capital gain rates are lower than ordinary income rates for most filers. The holding period starts the day after your purchase trade date and ends on your sale trade date — settlement dates don't count for securities on established markets, per Publication 550. So if you bought on day 1, the day after the one-year anniversary of that trade date (day 367 when no leap day falls in between) is your first long-term sale date.

Victor H.

Author

Yeah that's the lesson I'm taking from this. I was trading too actively inside taxable accounts. Moving more of the trading activity into the 401k going forward.

That's the right instinct. Inside a 401k or IRA those gains aren't taxable events at all — short-term or long-term doesn't matter until you take distributions.

If your net capital losses for the year end up exceeding your gains, you get to claim up to the annual limit against ordinary income on line 7a of Form 1040, with the rest carrying forward. The Schedule D line 16 figure drives that. Worth tracking carefully because a large carryforward is a real asset for future years when you have gains.

You mentioned being lost in Publication 550 — the specific chapter on wash sales and the section on holding periods are the two things worth reading closely. The rest of it is long. Topic 409 on the IRS site (irs.gov/taxtopics/tc409) is a shorter read that covers capital gains and losses including the netting order and the ordinary income deduction limit.

Victor H.

Author

Topic 409 is actually way more readable. Thanks for the pointer — I'll start there.

To add one more practical note: if you're doing loss harvesting in the next few weeks, keep records of your purchase dates and prices carefully. Brokers sometimes use average cost or FIFO by default, but you can specify lots when you sell. Specifying the highest-cost lot reduces your gain or maximizes your loss — just make sure you confirm the lot selection with your broker before the trade settles, not after.

Yes — lot selection is one of those things brokers let you do but won't remind you about. Confirming before settlement is the key step.

Came here wondering the same thing as the original poster. The summary I'm taking away: harvest losses before year-end, watch the 30-day wash sale window on both sides of the sale, check whether HSA or deferred comp reduces your bracket, and for future gains just hold over a year. Everything else is at the margins.