# Tax-Loss Harvesting Explained: Cut Your Tax Bill With Losses

Source: https://cluenex.com/learn/portfolio-management/tax-loss-harvesting/
Publisher: Cluenex (https://cluenex.com)
Updated: 2026-10-15

## Short answer

Tax-loss harvesting means selling an investment at a loss in a taxable account so the loss offsets capital gains, plus up to $3,000 of ordinary income per year. To keep the loss, avoid buying the same or a substantially identical security within 30 days before or after the sale.

## Key takeaways

- A harvested loss offsets capital gains dollar for dollar. The tax saved is the loss times your rate on the gains it cancels, for example $10,000 at 15% saves $1,500.
- Net losses beyond your gains can reduce ordinary income by up to $3,000 a year ($1,500 if married filing separately). Anything left carries forward with no expiration.
- The wash-sale rule disallows the loss if you buy the same or a substantially identical security within 30 days before or after the sale, a 61-day window. Purchases in an IRA or by a spouse can count.
- Harvesting mostly defers tax rather than erasing it, because the replacement holding usually has a lower cost basis.
- It works only in taxable brokerage accounts. Losses inside a 401(k), IRA or Roth IRA have no tax value.

## What is tax-loss harvesting?

Tax-loss harvesting is selling an investment that is worth less than you paid, on purpose, to create a loss the IRS lets you use on your tax return. The loss can cancel capital gains from other sales, and a limited amount can reduce your ordinary income.

Until you sell, a loss is only on paper (an unrealized loss) and has no tax effect. Selling makes it a realized loss, which is the kind that counts. The rules come from IRS Publication 550 and the wash-sale section of the tax code, Section 1091.

## How much can tax-loss harvesting save?

The saving equals the harvested loss times the tax rate on the gains it cancels. Long-term gains (assets held more than one year) are taxed at 0%, 15% or 20%. Short-term gains are taxed as ordinary income, from 10% up to 37%.

Higher earners may also owe the 3.8% Net Investment Income Tax when modified adjusted gross income passes $200,000 (single) or $250,000 (married filing jointly). That makes the top long-term rate 23.8%.

| Harvested loss | Saves at 15% | Saves at 20% | Saves at 23.8% |
|---|---|---|---|
| $5,000 | $750 | $1,000 | $1,190 |
| $10,000 | $1,500 | $2,000 | $2,380 |
| $25,000 | $3,750 | $5,000 | $5,950 |

The table assumes you have gains of at least that size to cancel. Losses that offset short-term gains save more, at your ordinary rate.

## How do capital losses offset gains?

Losses are matched in a set order. Short-term losses first cancel short-term gains, and long-term losses first cancel long-term gains. If one side ends up with a net loss, it then cancels the other side's net gain.

If a net capital loss remains, you can deduct up to $3,000 of it against ordinary income per year ($1,500 if married filing separately). The rest carries forward to future years with no expiration, and keeps its short-term or long-term character.

**Worked example.** Suppose you have $8,000 of short-term gains and $15,000 of long-term gains, and you harvest $5,000 of short-term losses and $20,000 of long-term losses.

- Short-term net: $8,000 gain minus $5,000 loss = $3,000 gain.
- Long-term net: $15,000 gain minus $20,000 loss = $5,000 loss.
- Across categories: $3,000 gain minus $5,000 loss = $2,000 net loss.
- That $2,000 is under the $3,000 cap, so it reduces ordinary income. Nothing carries forward.

Assume a 24% ordinary rate and a 15% long-term rate. Without harvesting, the tax on the gains would be $8,000 x 24% = $1,920 plus $15,000 x 15% = $2,250, or $4,170. With harvesting, the gains are fully cancelled and the $2,000 deduction saves another $2,000 x 24% = $480. The total benefit is $4,650.

**No gains example.** If you harvest a $10,000 loss and have no gains, you deduct $3,000 this year. At a 24% bracket that saves $720, and the remaining $7,000 carries forward to offset future gains or future $3,000 deductions.

## What is the wash-sale rule?

The wash-sale rule disallows your loss if you buy the same or a substantially identical security within 30 days before or 30 days after the sale. That is a 61-day window: 30 days before, the sale day, and 30 days after.

The rule also covers contracts or options to buy the security. The disallowed loss is not gone. It is added to the cost basis of the replacement shares, and your holding period carries over, so the loss is deferred until you sell those shares.

## How do you avoid a wash sale?

Wait at least 31 days before buying the same security back, or buy something that is not substantially identical. Then check every other place you might buy it during the window.

Common triggers people miss:

- Automatic dividend reinvestment that buys a few shares of the stock you sold.
- Recurring purchases, such as a weekly [dollar-cost averaging](/learn/portfolio-management/dollar-cost-averaging/) plan.
- Buying the same security in an IRA. The IRS treats this as a wash sale, and the loss is lost for good because the basis adjustment cannot be used inside the IRA.
- Purchases by your spouse, or by a company you control, per Publication 550.
- Buying call options on the stock you sold.
- Shares bought in a different brokerage account. Your broker's tax form tracks wash sales only within one account, so you must track the rest.

**What counts as substantially identical?** There is no bright-line test. Stock in two different companies is generally not substantially identical, even in the same industry. Two funds that track the same index from different providers are a gray area, and a fund tracking a clearly different index is on safer ground. For an ETF swap, a tax professional can tell you how conservative to be.

## Is tax-loss harvesting a permanent tax saving?

Usually it is a deferral, not a permanent saving. The replacement investment starts at today's lower price as its cost basis, so a later recovery creates a larger taxable gain.

**Example.** You paid $20,000 for shares now worth $10,000. You sell, realize a $10,000 loss, and buy a different holding for $10,000. If the new holding later rises to $20,000 and you sell, you owe tax on a $10,000 gain.

The benefit is still real. You kept the tax savings working for you in the meantime, and you may realize the later gain at a lower rate, in a lower-income year, or never sell at all.

## When does tax-loss harvesting not help?

It does not help in tax-advantaged accounts, and it helps little when the loss is small or you are in a low tax bracket. In all cases, the tax tail should not wag the investment dog.

- **401(k), IRA and Roth IRA.** Gains and losses inside these accounts do not appear on your tax return, so a loss there has no tax value.
- **The 0% long-term bracket.** If your long-term gains are already taxed at 0%, extra losses may be better saved than used.
- **Small losses.** A $1,000 loss saves $150 at 15%. Trading costs, bid-ask spreads and your time can eat that.
- **A broken business.** A low price can mean the company deteriorated. Replacing it with a similar stock does not fix a bad pick. See [value trap vs bargain](/learn/fundamental-analysis/value-trap-vs-bargain/).
- **Concentrated bets.** Swapping into another stock in the same industry keeps most of your risk. See [concentrated stock positions](/learn/portfolio-management/concentrated-stock-position/).
- **State taxes.** Rules differ by state, so the full saving may be larger or smaller than the federal figure.

## What this means for you

If you have a regular job and a taxable brokerage account, treat harvesting as a once or twice a year checkup, not a trading strategy. A simple routine works well.

1. Total your realized gains and losses so far this year from your broker's statement.
2. List positions with unrealized losses and note how long you have held each, since holding period decides short-term or long-term treatment.
3. Decide whether you still believe in each holding. On each stock's free page, Cluenex shows business quality, the main risk and the sealed verdict record, which helps separate a price dip from a broken business: [cluenex.com/stocks/](https://cluenex.com/stocks/).
4. Before selling, pick the replacement and check it against the 30-day rule, including dividend reinvestment, automatic buys, your IRA and your spouse's accounts.
5. Write down the sale date and the date you can buy back, 31 days later.
6. Fold the result into your regular [portfolio rebalancing](/learn/portfolio-management/portfolio-rebalancing/), which is another moment when you sell and may realize gains or losses.

Tax rules change and personal situations vary, so confirm the details for your return with a tax professional or current IRS guidance. This guide is educational and not tax advice.

## Questions people ask

### Can I tax-loss harvest and immediately buy a similar ETF?

Often yes, but only if the new fund is not substantially identical to the one you sold. Two funds tracking the same index from different providers are a gray area, while a fund tracking a clearly different index is on safer ground. A tax professional can help with close calls.

### Does tax-loss harvesting make sense for small portfolios?

It can, if you have gains to offset and trading is free. A $1,000 loss saves about $150 at a 15% rate and $200 at 20%. Skip it when costs, bid-ask spreads or the effort exceed the saving.

### What happens to capital loss carryforwards?

Net capital losses above the $3,000 yearly deduction carry forward with no expiration. They first offset future capital gains, then up to $3,000 of ordinary income per year, and keep their short-term or long-term character.

### Can I tax-loss harvest in a 401(k) or IRA?

No. Gains and losses inside a 401(k), IRA or Roth IRA are not reported on your tax return, so a loss there has no tax value. Harvesting applies only to taxable brokerage accounts.

### Does buying the stock back in my IRA trigger the wash-sale rule?

Yes. The IRS treats a purchase of the same security in your IRA within the 61-day window as a wash sale. The loss is disallowed, and unlike a taxable purchase, you do not get the basis increase back.

### Do I have to wait 30 or 31 days before buying back?

Wait at least 31 days. The window covers 30 days after the sale date, so day 31 is the first safe day to repurchase the same security, provided you also made no purchase in the 30 days before the sale.

## Sources

- [Publication 550, Investment Income and Expenses](https://www.irs.gov/publications/p550)
- [Topic No. 409, Capital Gains and Losses](https://www.irs.gov/taxtopics/tc409)
- [Topic No. 559, Net Investment Income Tax](https://www.irs.gov/taxtopics/tc559)
- [26 U.S. Code Section 1091, Loss from wash sales of stock or securities](https://www.law.cornell.edu/uscode/text/26/1091)
- [Wash Sales](https://www.investor.gov/introduction-investing/investing-basics/glossary/wash-sales)

Cite as: Cluenex. "Tax-Loss Harvesting Explained: Cut Your Tax Bill With Losses." Cluenex Learn, updated Oct 15, 2026. https://cluenex.com/learn/portfolio-management/tax-loss-harvesting/
