Monday, July 20, 2026 2026 Tax Year Edition

See the Math · Trust the Number · Every Figure Cites Its IRC Section

Tax-Loss Harvesting & the Wash-Sale Rule (2026)

Selling your losers to offset your winners is one of the few ways to legally shrink a capital-gains bill after the fact. Here's how it works, the $3,000 rule, and the wash-sale trap that voids the whole thing if you're careless.

Reviewed & updated · Federal law · Not tax advice

Quick answer

Tax-loss harvesting means selling an investment at a loss to cancel out capital gains. Losses offset gains dollar-for-dollar; up to $3,000 of leftover net loss deducts against ordinary income each year ($1,500 married filing separately), and anything beyond that carries forward to future years. The catch is the wash-sale rule (IRC §1091): buy the same or a “substantially identical” security within 30 days before or after, and the loss is disallowed.

How losses offset gains

At tax time, capital losses net against capital gains in a set order: short-term losses cancel short-term gains first, long-term losses cancel long-term gains, and only then does any excess cross over. Because short-term gains are taxed as ordinary income (10%–37%) while long-term gains top out at 20%, sheltering a short-term gain usually saves the most tax.

If your losses exceed your gains, you can deduct up to $3,000 of the net loss against ordinary income ($1,500 if married filing separately) under IRC §1211. Whatever's left carries forward indefinitely under §1212 — it never expires, and it keeps its short- or long-term character.

Example: You realize a $10,000 short-term gain, then sell another holding for a $12,000 loss. The loss cancels the entire $10,000 gain and leaves a $2,000 net loss — so you owe $0 capital-gains tax on the trade and deduct the extra $2,000 against ordinary income this year.

The wash-sale rule (don't skip this)

Under IRC §1091, you cannot deduct a loss if you buy the same or a “substantially identical” security within 30 days before or after the sale — a 61-day window centered on the trade. The disallowed loss isn't gone forever; it's added to the cost basis of the replacement shares (and their holding period tacks on), so you get it back when you eventually sell those.

  • The window is 30 days on each side of the sale, not just after.
  • It applies across all your accounts, including a repurchase in your IRA (the loss is then lost for good) and purchases by your spouse.
  • “Substantially identical” generally means the same stock or a fund tracking the same index — a different fund or sector is usually fine to stay invested.

How to harvest, step by step

Run through this before December 31 (our free checklist walks you through it):

  1. Total your realized gains for the year — short-term and long-term separately.
  2. Identify holdings sitting at an unrealized loss you're willing to sell.
  3. Sell enough to offset your gains — targeting short-term gains first.
  4. Avoid the wash sale: don't rebuy the same security for 31 days, or buy a not-substantially-identical alternative to stay in the market.
  5. Deduct up to $3,000 of any excess loss against ordinary income and note the carryforward.

Once you know your net gain, run it through the calculator to see the federal and state tax, and see also how to avoid capital gains tax and short-term vs long-term rates.

Frequently asked

What is tax-loss harvesting?

Selling an investment at a loss to offset capital gains you realized elsewhere, reducing your capital-gains tax. Net losses beyond your gains deduct up to $3,000 against ordinary income per year, with the rest carrying forward.

How much capital loss can I deduct in a year?

Losses first offset your capital gains in full. Beyond that, you can deduct up to $3,000 of net capital loss against ordinary income each year ($1,500 if married filing separately). Any remaining loss carries forward to future years indefinitely under IRC §1212.

What is the wash-sale rule?

Under IRC §1091, you cannot claim a loss if you buy the same or a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the basis of the replacement shares. The rule also applies to purchases in your IRA and by your spouse.

Can I harvest losses and stay invested?

Yes — buy a security that is not substantially identical (for example, a different fund tracking a different index) so the wash-sale rule doesn't apply, or wait 31 days before repurchasing the original.

Do capital loss carryforwards expire?

No. Unused capital losses carry forward indefinitely and keep their short-term or long-term character until they're used up against future gains or the $3,000 annual ordinary-income deduction.