What Is Tax-Loss Harvesting and How Does It Work?

Written by Jim Norris · NorrisAI AlphaLens · Updated August 2026

Quick answer: Tax-loss harvesting is selling an investment that has declined in value to realize a capital loss, which can be used to offset capital gains taxes on other investments — reducing your overall tax bill. The key rule: you must wait 30 days before buying back the same or "substantially identical" security (the wash-sale rule), or you lose the tax benefit. Done properly, it's one of the few reliable ways to improve after-tax investment returns without taking more risk.

How it works

Step 1: You buy Stock A at $100. It falls to $70. You sell it, realizing a $30 loss per share.

Step 2: That $30 loss can offset $30 of capital gains from other investments — reducing your taxable income from those gains.

Step 3: You can immediately reinvest the proceeds in a similar (but not identical) investment to maintain your market exposure — you're not out of the market, just holding a different security.

Step 4: After 30 days, you can buy back the original security if you want.

The tax saving: if you're in the 15% long-term capital gains bracket, a $30 loss saves you $4.50 in taxes per share. In the 20% bracket, $6.00 per share. Multiplied across a large portfolio, the savings compound meaningfully over time.

The wash-sale rule

The IRS disallows a tax loss if you buy the "same or substantially identical" security within 30 days before or after the sale. The 30-day window applies in both directions — selling on December 15 and repurchasing January 16 is fine; selling December 15 and repurchasing January 14 is a wash sale.

"Substantially identical" is not precisely defined but generally includes: the exact same stock, options on the same stock, and in some cases, highly correlated ETFs in the same sector from the same provider. It does not include: a different company's stock in the same industry, a different ETF tracking the same index from a different provider, or the same ETF after 30 days.

Capital loss limits and carryforward

Capital losses can offset capital gains dollar for dollar. If losses exceed gains in a year, up to $3,000 of net losses can be deducted against ordinary income. Any remaining losses carry forward to future years indefinitely until used.

This means large harvested losses in a bad market year have ongoing value — they reduce taxes in future profitable years.

When tax-loss harvesting is most valuable

High income years. The higher your capital gains tax rate, the more valuable each harvested loss becomes.

Large realized gains in the same year. If you've sold appreciated positions, harvesting losses in other positions directly offsets those gains.

After market corrections. A 15–20% market decline creates harvesting opportunities across many positions — the losses are real but the long-term business value may be largely unchanged.

Taxable accounts. Tax-loss harvesting only applies to taxable brokerage accounts — losses in IRAs and 401(k)s have no tax benefit.

When it's not worth doing

The transaction costs exceed the tax benefit. For small positions, bid-ask spreads and the complexity of tracking the wash-sale rule may outweigh the savings.

You're in a low tax bracket. If you're in the 0% long-term capital gains rate (common for lower-income investors), there's nothing to offset.

You'd be harvesting a loss in a position you want to exit permanently anyway. In that case, just sell — the tax benefit is a bonus, not the reason.

Professor Burton Malkiel of Princeton University has noted that tax management is one of the highest-leverage activities available to individual investors — the after-tax return is what actually matters, and tax-loss harvesting is one of the few strategies that reliably improves after-tax returns without requiring any additional market risk. — A Random Walk Down Wall Street, W.W. Norton

AlphaLens does this analysis in seconds

15 structured research frameworks. Any US stock. Live SEC filings, real-time news, powered by Advanced AI.

Try AlphaLens Free → Use code REDDIT-FREE-TRIAL · No card required · Then $39/mo or $299/yr

How AlphaLens fits with tax-loss harvesting

Tax-loss harvesting decisions require knowing whether a position's decline reflects genuine fundamental deterioration or just temporary price movement. The AlphaLens research frameworks help you distinguish the two — if the business is fundamentally intact, harvesting the loss and reinvesting in a similar position makes sense. If the thesis has broken, selling is appropriate regardless of the tax consideration.

Where to go deeper

For a detailed walkthrough of each research framework, see the complete guide to all 15 AlphaLens frameworks.

For definitions of investing terms, see the AlphaLens investing glossary.

Want the next guide when it's published?

No spam — just new guides, occasionally.

Start here next: pick a research framework · check the math with a free calculator · start a free 7-day trial.