Tax-Loss Harvesting — How to Turn Investment Losses Into Tax Savings

Harper Banks·

Nobody likes losing money in the market. But there is a silver lining most investors never fully take advantage of: investment losses can be converted into real tax savings that reduce what you owe the IRS. Tax-loss harvesting is the strategy of deliberately selling investments at a loss to offset your taxable gains — and sometimes even your ordinary income. Done right, it can meaningfully improve your after-tax returns without requiring you to change your overall investment thesis.

Disclaimer: This content is for educational purposes only and does not constitute financial advice. Always consult a qualified financial advisor or tax professional before making investment or tax decisions.

The Core Idea: Losses Have Value

When you sell an investment at a loss, that loss does not just disappear. The IRS lets you use it to offset capital gains you realized elsewhere in your portfolio. If you sold a winning position and owe taxes on those gains, a harvested loss can directly cancel out some or all of that tax liability.

Here is the basic mechanics: capital losses first offset capital gains of the same type (short-term losses offset short-term gains; long-term losses offset long-term gains). After netting within each category, any remaining losses can cross over to offset the other type of gain.

If your total capital losses for the year exceed your total capital gains, you can use up to $3,000 of that excess loss to offset ordinary income — your wages, salary, or self-employment income. Any remaining losses beyond that $3,000 do not disappear either. They carry forward to future tax years, where they can be used to offset future capital gains or up to another $3,000 of ordinary income per year, indefinitely.

A Simple Example

Imagine you have the following situation in a given tax year:

  • You sold a broad-market fund at a $8,000 long-term capital gain
  • You sold a sector fund at a $5,000 loss
  • No other capital transactions

After offsetting, your net long-term capital gain is $3,000. At a 15% long-term rate, you owe $450 in capital gains tax instead of $1,200. The harvested loss saved you $750 this year.

Now extend the scenario: you had $15,000 in losses and only $8,000 in gains. After offsetting all gains, you have $7,000 in excess losses. You use $3,000 of that to offset ordinary income (worth potentially $660–$1,110 in tax savings depending on your bracket), and the remaining $4,000 carries forward to next year.

Over time, a portfolio that systematically harvests losses during market downturns can build a meaningful carryforward balance — a kind of tax shield that reduces your bill in future high-gain years.

The Wash-Sale Rule: The Most Important Constraint

Tax-loss harvesting sounds straightforward until you factor in the wash-sale rule. The IRS is well aware that investors might try to sell something at a loss and immediately buy it back, maintaining the same portfolio while claiming a tax deduction. The wash-sale rule prevents this.

Under the wash-sale rule, you cannot claim a capital loss if you purchase the same security, or a substantially identical one, within 30 days before or after the sale. That is a 61-day window total — 30 days before, the day of the sale, and 30 days after.

If you trigger a wash sale, the IRS disallows the loss and adds the disallowed amount to the cost basis of the replacement shares. The loss is not gone forever — it gets deferred and will eventually be recognized when you finally sell the replacement shares without triggering another wash sale. But in the near term, you lose the deduction you were counting on.

Practical implication: After selling at a loss to harvest it, you have two choices:

  1. Wait 31 days before buying back the same security
  2. Immediately buy a similar but not substantially identical security to maintain your market exposure

The second option is usually preferred, because being out of the market for 31 days carries its own risk. For example, if you sell a broad large-cap index fund at a loss, you could immediately purchase a different large-cap index fund from a different provider that tracks a different underlying index. You maintain similar exposure without triggering the wash-sale rule.

What Counts as "Substantially Identical"?

The IRS has not defined "substantially identical" with perfect precision, which creates some gray areas. Clear examples of substantially identical securities include individual shares of the same company, options on the same stock, and different share classes of the same fund.

Less clear — and generally safer — alternatives include:

  • Two funds tracking different indexes with similar compositions (e.g., S&P 500 vs. total market)
  • A fund and an ETF from different providers covering similar but not identical benchmarks
  • Bonds from different issuers with similar characteristics

When in doubt, consult a tax professional. The consequences of a disallowed wash sale are not catastrophic (the loss is deferred, not eliminated), but they complicate your bookkeeping and delay your tax benefit.

When Does Tax-Loss Harvesting Make Sense?

Not every loss is worth harvesting. You need to weigh the tax benefit against potential transaction costs, the risk of being out of the market, and the complexity of tracking everything correctly.

Tax-loss harvesting tends to make the most sense when:

You have offsetting gains. A harvested loss is most immediately valuable when you have realized gains to offset in the same year. Without gains to offset, you are limited to the $3,000 ordinary income deduction annually.

You are in a higher tax bracket. The higher your marginal rate, the more each dollar of deduction is worth. For investors in the 22%–37% brackets, offsetting ordinary income with that $3,000 loss deduction is especially valuable.

You have meaningful unrealized losses. Small losses may not be worth the effort. Focus on positions where the loss is material — typically at least a few hundred dollars — relative to transaction costs.

It is near year-end. December is the most common time for tax-loss harvesting because investors can see their full-year gain and loss picture and make informed decisions before December 31. However, opportunistic harvesting throughout the year — especially during market corrections — can be even more effective.

Automating the Process

Some robo-advisors and investment platforms offer automated tax-loss harvesting, scanning your portfolio regularly for harvesting opportunities and executing trades while managing wash-sale compliance. For investors who do not want to track this manually, these services can be valuable — though it is worth understanding their rules and limitations before relying on them.

Manual investors can achieve similar results by reviewing their portfolio at least quarterly and more aggressively after significant market drawdowns, when harvesting opportunities are typically most abundant.

What Not to Do

A few common mistakes undermine tax-loss harvesting:

  • Harvesting losses in a tax-advantaged account. Losses inside an IRA or 401(k) have no tax benefit — there are no capital gains taxes inside those accounts, so there is nothing to offset.
  • Letting the tax tail wag the investment dog. Never sell a quality long-term holding just for a tax loss if you believe in its long-term value and would not otherwise sell.
  • Forgetting to track carryforwards. Unused losses from prior years carry forward. Factor these into your gain-offset planning each year.

Actionable Takeaways

  • Harvest losses strategically — use them to offset capital gains first, then up to $3,000 of ordinary income per year. Excess losses carry forward indefinitely.
  • Respect the wash-sale rule. Wait 31 days to repurchase the same security, or immediately swap into a similar but not substantially identical fund to maintain market exposure.
  • Focus harvesting activity in taxable brokerage accounts. Losses in IRAs and 401(k)s provide no tax benefit.
  • Keep records. Track every harvested loss and any carryforward balance so you can apply them correctly in future years.
  • Review your portfolio during market downturns. Corrections and volatility create the best harvesting opportunities — turn a frustrating market environment into a tax advantage.

Ready to build a tax-efficient portfolio? Use the free screener at valueofstock.com/screener to find quality companies worth holding long-term.


Disclaimer: This content is for educational purposes only and does not constitute financial or tax advice. The examples used are for illustrative purposes only.

By Harper Banks

Get Weekly Stock Picks & Analysis

Free weekly stock analysis and investing education delivered straight to your inbox.

Free forever. Unsubscribe anytime. We respect your inbox.

You Might Also Like