Tax-Loss Harvesting: What It Is and Why It Matters

Definition

Tax-loss harvesting is an investment strategy where you intentionally sell securities at a loss to offset a capital gains tax liability. This allows investors to turn a market downturn into a potential tax-saving opportunity without significantly altering their long-term investment portfolio.

How It Works

Tax-loss harvesting is a method of converting paper losses in your taxable investment accounts into real tax benefits. The process involves selling an investment—like a stock, bond, or mutual fund—that has decreased in value. This action "realizes" or locks in the loss, making it official for tax purposes.

The primary goal is to use these realized losses to cancel out realized capital gains you may have from selling other investments for a profit. By reducing your net capital gains, you lower your overall tax bill for the year.

The IRS has a specific order for how losses must be used:

  1. Offset Similar Gains: Short-term losses (from assets held one year or less) must first be used to offset short-term gains. Likewise, long-term losses (from assets held more than one year) must first offset long-term gains.
  2. Offset Other Gains: If you still have losses remaining in one category, you can use them to offset gains in the other. For example, if you have a net short-term loss after step one, you can use it to reduce your long-term gains.
  3. Deduct from Ordinary Income: If your total capital losses exceed your total capital gains for the year, you can deduct the excess loss from your ordinary income (like your salary). For 2026, this deduction is capped at $3,000 per year ($1,500 for those married filing separately).
  4. Carry Losses Forward: If you have more than $3,000 in net capital losses, any amount over the limit can be carried forward to future tax years. These carried-over losses can be used to offset capital gains or deduct against ordinary income in those future years, and there is no limit to how many years you can carry them forward.

To keep your portfolio's asset allocation on track, investors often reinvest the proceeds from the sale into a similar—but not identical—investment. This is critical to avoid violating the "wash-sale rule."

Key Rules and Limits

To use tax-loss harvesting effectively, you must follow specific IRS regulations. Here are the key rules for the 2026 tax year:

  • Ordinary Income Deduction Limit: You can deduct a maximum of $3,000 in net capital losses against your ordinary income each year ($1,500 if you are married and filing separately).
  • Wash-Sale Rule: This is the most important rule to understand. You cannot claim a tax loss if you buy the same or a "substantially identical" security within 30 days before or 30 days after the sale. This 61-day window prevents investors from selling a stock to claim a loss and immediately buying it back.
  • Substantially Identical: The IRS defines this loosely, but it generally includes things like shares of the same company, options or contracts to buy that company's stock, or shares of an index fund that tracks the exact same index as one you just sold. For example, selling one S&P 500 index fund and buying another S&P 500 index fund from a different provider would likely trigger the wash-sale rule.
  • Short-Term vs. Long-Term: The tax treatment depends on how long you held the asset. Short-term gains (from assets held one year or less) are taxed at your higher ordinary income tax rates (10% to 37% in 2026), while long-term gains are taxed at lower rates (0%, 15%, or 20%). Your losses will offset gains of the same type first.
  • No Wash Sales for Crypto (for now): As of 2026, the wash-sale rule applies only to stocks and securities. The IRS classifies cryptocurrencies as property, so they are not currently subject to this rule. This means you could sell a cryptocurrency at a loss and buy it back immediately while still claiming the tax loss. However, lawmakers have proposed extending the rule to digital assets, so this could change in the future.
  • Taxable Accounts Only: Tax-loss harvesting is only applicable to taxable brokerage accounts. It provides no benefit in tax-advantaged retirement accounts like 401(k)s or IRAs, as investments in these accounts already grow tax-deferred or tax-free, and you don't pay capital gains taxes on them.

Example

Let's walk through a hypothetical scenario for an investor named Alex in 2026. Alex is a single filer with a taxable income that places them in the 24% ordinary income tax bracket and the 15% long-term capital gains tax bracket.

  • Initial Portfolio: Alex has two main investments in a taxable account.
    • Investment A (Winning Stock): Alex sells shares they've held for two years, realizing a $10,000 long-term capital gain.
    • Investment B (Losing ETF): Alex also holds an ETF that has underperformed. They paid $25,000 for it, and it's now worth $12,000. The unrealized loss is $13,000.

Without Tax-Loss Harvesting: If Alex only sells Investment A, they will owe taxes on the $10,000 gain. At a 15% long-term capital gains rate, their tax bill would be $1,500 ($10,000 x 15%).

With Tax-Loss Harvesting: Alex decides to harvest the loss in Investment B.

  1. Sell the Loser: Alex sells the entire position in Investment B, realizing a $13,000 long-term capital loss.
  2. Reinvest: To stay invested, Alex immediately uses the $12,000 in proceeds to buy an ETF that is in a similar sector but tracks a different index, thus avoiding the wash-sale rule.
  3. Offset Gains: The $13,000 loss is first used to completely offset the $10,000 gain from Investment A. ($10,000 gain - $13,000 loss = -$3,000 net loss).
  4. Deduct from Income: Alex now has a net capital loss of $3,000. They can use this entire amount to deduct against their ordinary income.

The Result:

  • The $10,000 capital gain is completely wiped out, saving Alex the $1,500 in capital gains tax.
  • The remaining $3,000 loss reduces Alex's taxable ordinary income. At a 24% tax rate, this saves an additional $720 ($3,000 x 24%).
  • Total tax savings for 2026: $2,220 ($1,500 + $720).

In this example, by strategically selling a losing position, Alex not only eliminated a tax bill on their profits but also reduced the tax on their regular income.

Pros and Cons

Pros:

  • Reduces Taxable Income: The most direct benefit is lowering your tax bill by offsetting capital gains and potentially a portion of your ordinary income.
  • Improves After-Tax Returns: By minimizing the tax drag on your portfolio, you keep more of what you earn, which can significantly boost your long-term returns.
  • Portfolio Rebalancing: It provides a tax-efficient opportunity to exit a losing position and re-evaluate your investment choices, potentially moving into a better-performing asset.
  • Creates a "Tax Asset": Large capital losses that are carried forward can be seen as a future asset, ready to shield future gains from taxes for years to come.

Cons:

  • It's a Deferral, Not an Elimination: Tax-loss harvesting defers your tax liability. When you sell the replacement security in the future, its cost basis will be lower, potentially leading to a larger taxable gain at that time.
  • Risk of Missing an Upturn: Due to the wash-sale rule, you must be out of the original security for a period. If that security rebounds sharply during that time, you could miss out on those gains.
  • Transaction Costs: While often minimal, you may incur trading fees when selling and buying securities.
  • Complexity: Properly tracking losses, minding the wash-sale rule across all your accounts (including IRAs), and applying carryover losses can be complicated.

Common Mistakes to Avoid

  • Violating the Wash-Sale Rule: This is the most common error. Remember that the rule applies 30 days before and 30 days after the sale. A dividend reinvestment or a purchase in your IRA within this window can inadvertently trigger the rule and disallow your loss.
  • Buying a "Substantially Identical" Security: Replacing a sold investment with one that is too similar can also trigger the wash-sale rule. For instance, selling Vanguard's S&P 500 ETF (VOO) and buying iShares' S&P 500 ETF (IVV) is risky because they track the same index.
  • Ignoring the Netting Rules: You can't choose to offset a high-tax short-term gain with a long-term loss if you also have a long-term gain. The IRS rules on the order of operations are strict.
  • Forgetting About State Taxes: Most, but not all, states follow federal rules for capital gains and loss carryforwards. Check your state's specific tax laws.

Frequently Asked Questions

Q: What exactly is the wash-sale rule?

A: The wash-sale rule is an IRS regulation that prevents you from claiming a capital loss on a security if you purchase the same or a "substantially identical" security within 30 days before or after the sale. This 61-day period is designed to stop investors from creating an artificial tax loss while maintaining their original investment position. If you violate the rule, the loss is disallowed for the current tax year and is instead added to the cost basis of the new investment you purchased.

Q: Can I use tax-loss harvesting in my 401(k) or IRA?

A: No, tax-loss harvesting is not a strategy for tax-advantaged retirement accounts like 401(k)s, traditional IRAs, or Roth IRAs. Since these accounts already offer tax-deferred or tax-free growth, there are no capital gains taxes to be paid on sales within the account. Therefore, there are no gains to offset, and realizing a loss provides no tax benefit.

Q: Is there a limit to how much in capital losses I can claim?

A: There is no limit on the amount of capital losses you can use to offset capital gains in a given year. However, if your losses exceed your gains, there is a limit on how much you can deduct against your ordinary income. For the 2026 tax year, that limit is $3,000 ($1,500 for married filing separately). Any remaining losses beyond that can be carried forward to future tax years indefinitely.


This article reflects 2026 rules and limits. Tax laws and financial regulations change — consult a qualified financial advisor or visit IRS.gov for the latest information.

Published: 4/29/2026 / Updated: 4/29/2026

This article is for informational purposes only and does not constitute financial advice. Consult a qualified financial advisor for personalized guidance.

More in Investing