Valim Book a call

Ex-Big Four CPA led, AI-enabled tax services for modern businesses & individuals.

Blog

Tax-loss harvesting explained: rules, wash sales, direct indexing

Tax-loss harvesting means selling at a loss to offset gains and up to $3,000 of other income. Here are the rules, the wash sale trap and the December 31 cutoff.

Vishant Mehta, CPA, Ex-Big 4

Published

  • tax-loss harvesting
  • wash sale
  • direct indexing
  • capital losses
  • high earners

Tax-loss harvesting is selling an investment for less than you paid, so the loss cuts your tax. The loss offsets capital gains first, then up to $3,000 of other income ($1,500 if married filing separately). The rest carries forward.

The trap is the wash sale rule. Buy a substantially identical stock within 30 days before or after the sale, and the loss is postponed. For 2026, the sale must trade by December 31.

Losses offsetCapital gains, then $3,000 of other income
Wash sale window30 days either side, 61 days in all
2026 cutoffA trade date of December 31, 2026
Crypto, status on October 20, 2026Not covered. H.R. 10357 would cover it and is not law

What are the rules on tax-loss harvesting?

Seven rules decide what a harvested loss is worth.

  1. Netting. Short-term losses offset short-term gains, and long-term losses offset long-term gains. A net loss on one side then offsets a net gain on the other.
  2. The $3,000 limit. A net capital loss offsets up to $3,000 of other income a year, or $1,500 if married filing separately. A joint return gets $3,000, not $6,000.
  3. Carryforward. The rest becomes a capital loss carryover, with no time limit, and stays short-term or long-term. It does not pass to your estate.
  4. Wash sales. A wash sale disallows the loss if you buy substantially identical stock or securities within 30 days before or after the sale. An option to buy counts too.
  5. Basis and holding period. The disallowed loss is added to the new shares' cost, and the old holding period carries over.
  6. Your spouse and your IRA. A purchase by your spouse, or by a corporation you control, counts. A purchase in your IRA or Roth IRA loses the loss for good, because the IRA gets no basis for it.
  7. Substantially identical. One company's stock is ordinarily not substantially identical to another's. IRS guidance does not say when two funds that track the same index are.

How much can you tax-loss harvest in a year?

You can harvest any amount. The $3,000 cap applies only to losses beyond your capital gains.

Harvest $50,000 of losses against $30,000 of gains, and $3,000 more offsets your salary. The other $17,000 carries forward to 2027.

Is tax-loss harvesting even worth it?

It is worth the most when a loss offsets income taxed at a high rate. Harvesting mostly defers tax, so its value is the gap between today's rate and the later one.

Take a $20,000 short-term gain in the top bracket. Federal tax on it reaches 40.8%: 37% plus the 3.8% net investment income tax. A $20,000 harvested loss saves that $8,160.

Your replacement costs $20,000 less than the old one, so that gain returns when you sell it. Held over a year, it is taxed at up to 23.8%, or $4,760. Held until death, it is never taxed, because your heirs' basis resets to market value.

It is worth the least when your long-term gains fall in the 0% bracket, because losses offset those untaxed gains first. See the 2026 capital gains rates.

Is it better to sell stock at a loss for tax purposes?

Only when you would sell anyway, or can buy something similar that is not substantially identical. At 40.8%, a $10,000 loss saves at most $4,080 of federal tax.

To stay invested, switch to a fund that tracks a different index. A fund from another issuer that tracks the same index is a gray zone.

How does direct indexing harvest losses?

Direct indexing means you own an index's stocks one by one in your own account, instead of a fund. Each stock has its own cost, so the ones that are down can be sold even when the index is up.

FINRA, which oversees brokers, warns that fees can be higher than for a typical passive portfolio. Returns may differ from the index, and could be markedly lower.

The manager runs one account, so a CPA checks the rest. Your Form 1099-B flags a wash sale only when the same security was bought in the same account. A buy within 30 days in your IRA, your spouse's account or at another broker still counts.

Can you harvest crypto losses the same way?

Yes, and today the wash sale rule does not apply. The IRS treats crypto held directly as property, not stock or securities.

H.R. 10357 would apply the rule to crypto sold after September 14, 2026. The Ways and Means Committee approved it 38 to 5 on September 16, 2026, and it is not law. To keep a loss safe either way, wait 31 days to buy the same coin back. See the crypto wash sale rule.

Which dates matter before December 31, 2026?

The trade date decides the tax year, not the settlement date.

DateWhat it means
December 1, 2026 to January 30, 2027The 61-day window around a December 31 sale
December 31, 2026Last trade date for a 2026 loss
January 4, 2027A December 31 sale settles, and still counts in 2026
February 1, 2027First trading day to buy back after a December 31 sale
April 15, 20272026 returns are due

Trades settle one business day later, and January 1 is a holiday. The window looks back too: for a December 31 sale, a buy on or after December 1 counts.

What should you do now?

  • List the positions worth less than you paid, and this year's gains.
  • Name the lot when you place the trade, and keep the broker's written confirmation. Otherwise, the first shares you bought count as sold.
  • Pause dividend reinvestment and automatic buys of that stock for 30 days either side.
  • Check your IRA, your spouse's accounts and any other broker for the same stock or fund.
  • Report any wash sale your Form 1099-B missed on Form 8949, with code W.
  • Place the trades by December 31, 2026.

For planning across the year, see our tax planning for high earners.

Sources.