Tax Loss Harvesting in 2026: How to Offset Capital Gains Before Year-End

Realized investment losses can offset capital gains dollar-for-dollar. The IRS wash sale rule gives you a 61-day window to navigate. Here's how to use the strategy before year-end.

Tax loss harvesting is the practice of selling an investment at a loss to offset capital gains you've realized elsewhere in your taxable brokerage account. The IRS allows dollar-for-dollar offsets; if your losses exceed your gains, up to $3,000 of the net loss can reduce ordinary income, and anything above that carries forward indefinitely. The primary constraint is the wash sale rule (IRS Section 1091, Publication 550): you cannot buy back a 'substantially identical' security within 30 days before or after the sale or the loss is disallowed. Mid-year is the right time to start — you have time to navigate the wash sale window and can position before year-end capital gains distributions from mutual funds.

Tax loss harvesting is one of the few legal strategies that can reduce your tax bill this calendar year — not by deferring income, but by recognizing investment losses to offset gains you've already realized.

The mechanics are straightforward: sell an investment worth less than you paid for it, capture the loss, and apply it against capital gains from other sales. What makes it work is timing and sequencing. What makes it fail is misunderstanding the wash sale rule.

How the offset math works

When you sell an investment at a loss, the IRS lets you use that loss to offset capital gains dollar-for-dollar. If you realized $8,000 in long-term gains on one fund and then harvest $8,000 in losses from a different losing position, the two net to zero — no capital gains tax owed on those gains.

If your harvested losses exceed your gains, you can use up to $3,000 of the net loss each year to reduce ordinary income. Per IRS Topic 409 — Capital Gains and Losses, any losses exceeding that $3,000 threshold carry forward to future tax years indefinitely — they don't disappear.

Short-term losses (positions held one year or less) first offset short-term gains; long-term losses (positions held more than one year) first offset long-term gains. If one category produces a net loss, it flows into the other. The sequencing matters because short-term gains are taxed at ordinary income rates, which are higher for most taxpayers than the long-term capital gains rates covered in Long-Term vs. Short-Term Capital Gains Tax: 2026 Rates and How to Keep More of Your Investment Returns.

The wash sale rule: the mandatory 30-day window

Harvesting a loss is legal. Harvesting a loss and immediately buying back the same investment is not — at least not if you want the deduction. The wash sale rule, codified at Section 1091 of the tax code, disallows a loss on the sale of a security if you purchase a "substantially identical" security within 30 days before or after the sale.

Per IRS Publication 550 — Investment Income and Expenses, the wash sale window is 61 days total: 30 days before the sale date, the day of the sale, and 30 days after. A loss harvested inside this window is disallowed. The disallowed loss isn't gone — it gets added to the cost basis of the replacement shares — but the current-year deduction is lost.

What counts as "substantially identical": - The same stock or fund you sold - Options or contracts to acquire the same security - Shares of a mutual fund that holds the same portfolio as the fund you sold

What does not trigger a wash sale: - A different ETF tracking a different index (e.g., selling a total U.S. market fund and buying an S&P 500 fund — different benchmarks) - Bonds issued by a different entity - Stock of a different company in the same sector

The substantially-identical question is fact-specific. When in doubt, wait the 31 days or swap into a genuinely different exposure rather than guessing.

Why harvest in June, not December

Most investors think about tax loss harvesting in November or December, but mid-year is often a better time to act.

You have time to work around the wash sale window. If you sell a losing position now and want to re-enter a similar exposure, you can swap back in 31 days — by late July — and hold through any year-end recovery. Waiting until mid-December leaves you with no time to re-enter without violating the rule.

You can offset gains before year-end fund distributions. Many taxable mutual funds distribute capital gains to shareholders in November and December. Harvesting losses in the summer positions you to apply them against those distributions before they arrive.

No deadline pressure. Identifying and executing loss harvests in June is calmer than the same task under December deadline pressure. You can model the sequencing carefully.

Tax loss harvesting is not a reason to sell a position you'd otherwise hold long-term. The strategy works when you have unrealized losses in positions you were already considering selling, or where a replacement investment achieves equivalent broad market exposure without triggering a wash sale.

Tax-advantaged accounts don't qualify

Tax loss harvesting applies only to taxable brokerage accounts. Losses inside an IRA, 401(k), Roth IRA, HSA, or other tax-advantaged account cannot be harvested for a deduction — those accounts don't generate taxable gains or losses on individual security transactions within the account.

This matters for account structure. If your equity funds are held entirely in a tax-advantaged account, tax loss harvesting isn't available to you on those positions regardless of performance. For more on how account type affects your overall tax picture, see Building a Simple 4-Fund Portfolio: How Index Investing Actually Works for asset location context, and HSA in 2026: The Triple Tax Advantage — and What the New Tax Law Changed on how HSA investing interacts with your broader tax strategy.

Three mistakes that erase the benefit

1. Triggering a wash sale across multiple accounts. The wash sale rule applies across all accounts — not just the account where you sold the losing security. Selling stock at a loss in your taxable account and buying the same stock in your IRA or your spouse's brokerage account within 30 days disallows the loss. Always check every account before repurchasing within the window.

2. Harvesting losses that are too small to matter. On a $300 position with a $25 unrealized loss, the tax benefit is a few dollars at most. Transaction costs, time spent, and the risk of sequencing errors can exceed it. Tax loss harvesting produces the most value on meaningful positions at meaningful losses — particularly where the harvested loss offsets short-term gains that would otherwise be taxed at ordinary income rates.

3. Selling a fundamentally sound position for the tax benefit alone. Booking a loss to reduce taxes this year, then missing a 40% rebound in the position you sold, is a net loss in any scenario. The harvest makes sense when the position is one you'd replace, exit, or rebalance out of anyway — not when you're selling a core long-term holding purely to generate a deduction.

---

This content is educational and does not constitute financial, legal, or tax advice. Tax rules and capital gains rates are subject to change. Consult a qualified tax professional for guidance specific to your investment situation.

Frequently asked questions

What is tax loss harvesting?

Tax loss harvesting is the practice of selling an investment that has declined below your purchase price to realize the loss for tax purposes. That loss can then offset capital gains you've realized on other investments in your taxable brokerage account — reducing or eliminating your capital gains tax bill for the year. Per IRS Topic 409 — Capital Gains and Losses, if your total capital losses exceed your capital gains, you can use up to $3,000 of the net loss to reduce ordinary income each year, with the remaining balance carried forward to future years.

What is the wash sale rule and how does it affect tax loss harvesting?

The wash sale rule (IRS Section 1091, covered in IRS Publication 550) disallows a capital loss if you purchase a 'substantially identical' security within 30 days before OR after the sale that generated the loss. The rule covers a total 61-day window. If you trigger a wash sale, the disallowed loss is not eliminated — it gets added to the cost basis of the replacement shares you purchased. To preserve the current-year deduction, wait at least 31 days before buying back into the same or substantially identical position, or replace it with a different-but-similar investment (such as an ETF tracking a different index).

Does the wash sale rule apply across all my accounts?

Yes. The wash sale rule applies across all of your accounts, not just the account where you sold the security. Per IRS Publication 550 and IRS guidance, if you sell a stock at a loss in your taxable brokerage account and then buy the same stock in your IRA, 401(k), or spouse's brokerage account within the 30-day window, the wash sale rule still disallows the loss. This is a common mistake — always check all accounts before repurchasing within the window.

Can I harvest losses inside my IRA, 401(k), or Roth IRA?

No. Tax loss harvesting only works in taxable brokerage accounts. Transactions inside tax-advantaged accounts — traditional IRAs, Roth IRAs, 401(k)s, 403(b)s, HSAs — do not generate taxable gains or losses at the individual security level. You cannot deduct a loss from selling a fund inside an IRA on your tax return. The strategy is exclusively for taxable investment accounts.

When should I start tax loss harvesting in 2026?

Mid-year — June through August — is a practical window. Acting now gives you 31+ days to navigate the wash sale window and re-enter similar positions before year-end. It also lets you offset capital gains before many taxable mutual funds make their annual distributions in November and December. Waiting until December creates time pressure and reduces your options. Per IRS Topic 409, there is no minimum holding period required to harvest a loss — you can sell any position that is underwater relative to your cost basis.

More from Guide