Taxes · Guide

Tax-Loss Harvesting Explained: How to Use Losses to Lower Your Tax Bill

Tax-loss harvesting sells investments at a loss to offset capital gains, legally reducing your tax bill while keeping your portfolio essentially unchanged. Here's how it works, the wash-sale rule to avoid, and when it makes sense.

·Jun 30, 2026·7 min read
Rate data reviewed recently·Methodology →

Turn this guide into a decision

Read the guidance, then compare current options and run the numbers for your situation.

30 days
Wash-sale window
Before and after the sale
$3,000
Ordinary income offset
Per year, losses beyond gains
15%+
Capital gains rate
Where harvesting adds real value
!The Bottom Line

Tax-loss harvesting sells an investment at a loss, uses that loss to offset capital gains dollar for dollar (or up to $3,000 of ordinary income), and immediately buys a similar but not identical investment to keep your market exposure. It defers tax rather than eliminating it, since the replacement holding starts with a lower cost basis, and it is worth doing when you have real gains to offset, not for a $500 loss that saves $75.

Tax-loss harvesting is one of the few tax strategies that generates real savings without changing your investment outcome. The concept: sell an investment that is down in value, capture the paper loss as a tax deduction, and buy a similar investment to maintain your market position. By implementing tax loss harvesting strategically throughout the year, you can reduce your taxable income while maintaining your desired asset allocation.

Quick answer

Tax-loss harvesting means selling an investment worth less than you paid, using that loss to offset capital gains elsewhere in your portfolio, and immediately buying a similar, not identical, investment so your market exposure barely changes. The loss reduces your tax bill dollar for dollar against gains, and up to $3,000 of any excess can offset ordinary income each year, with the rest carrying forward indefinitely. It only works in a taxable brokerage account, not an IRA or 401(k), and as of the 2026 tax year it still defers tax rather than erasing it, since the replacement investment starts with a lower cost basis. It's worth doing when you have real gains to offset; a $500 loss saving $75 rarely justifies the trade. Run your own numbers in the SwitchWize Money Map before deciding whether harvesting this year's losses is worth it.

The Basic Mechanics

Step 1: Identify investments in your taxable account that are worth less than you paid (unrealized losses).

Step 2: Sell them, realizing the loss.

Step 3: Use the loss to offset capital gains realized elsewhere in your portfolio.

Step 4: Buy a similar, but not "substantially identical," investment to stay invested.

Example:

  • You own 100 shares of Vanguard S&P 500 ETF (VOO) purchased at $400/share ($40,000 basis)
  • Current price: $340/share, portfolio value $34,000, unrealized loss: $6,000
  • You sell all shares, realizing a $6,000 capital loss
  • You immediately buy iShares S&P 500 ETF (IVV) for $34,000, tracking the same index
  • The $6,000 loss offsets $6,000 of capital gains elsewhere
  • Your portfolio is effectively unchanged, still 100% S&P 500 exposure

The math behind that savings is simple: loss realized × marginal capital-gains rate = tax saved. At a 15% capital-gains rate, $6,000 × 0.15 = $900 saved. At a 20% rate (the top bracket), the same $6,000 loss saves $1,200.

How Losses Offset Gains

Capital losses offset capital gains dollar-for-dollar. The netting rules:

  1. Short-term losses offset short-term gains first
  2. Long-term losses offset long-term gains first
  3. Excess short-term losses can offset long-term gains (and vice versa)
  4. If total losses exceed total gains, up to $3,000 of net losses can offset ordinary income per year
  5. Losses beyond $3,000 carry forward indefinitely to future tax years
Short-term losses
Offsets first
Short-term gains
Then offsets
Long-term gains, if any short-term losses remain
Long-term losses
Offsets first
Long-term gains
Then offsets
Short-term gains, if any long-term losses remain
Net losses beyond all gains
Offsets first
Up to $3,000 of ordinary income per year
Then offsets
Any remainder carries forward indefinitely

The $3,000 ordinary income offset is available every year, meaning ongoing loss carryforwards continue providing benefit until exhausted.

Key Takeaways
  • Tax-loss harvesting only works in taxable brokerage accounts. Losses inside IRAs and 401(k)s are not deductible, because gains and losses inside tax-advantaged accounts are invisible to the IRS until withdrawal.
  • The wash-sale rule (30 days before and after the sale) prevents buying the same or 'substantially identical' security. Buying the same ETF back immediately disallows the loss. Waiting 31 days or buying a different-but-similar fund avoids the rule.
  • Harvesting losses defers taxes; it does not eliminate them. Your new investment has a lower cost basis, meaning future gains will be larger. The benefit is the time value of the deferred tax and potentially converting short-term gains to long-term.

The Wash-Sale Rule

The IRS disallows a loss if you buy the same or "substantially identical" security within 30 days before or after the sale (a 61-day window total). This is the critical rule to understand.

Sell VOO, buy SPY within 30 days
Wash-sale outcome
Triggers the rule; both track the S&P 500 and are treated as substantially identical by most tax professionals
Sell an individual stock, buy it back within 30 days
Wash-sale outcome
Triggers the rule
Sell VOO, buy IVV (different issuer, same index)
Wash-sale outcome
Does not trigger the rule under most professional guidance, though a tax advisor should confirm your specific situation
Wait 31+ days, then buy back the original fund
Wash-sale outcome
Does not trigger the rule; the 61-day window (30 before, 30 after) has closed

If the wash-sale rule is triggered, the disallowed loss is added to the basis of the replacement security; it is not permanently lost, just deferred.

If the proceeds from the sale sit in your brokerage's cash sweep for a day or two while you pick the replacement, check what that cash is actually earning. A linked high-yield savings account can pay 4.20% right now, while some legacy sweep accounts still pay close to nothing on the same balance.

When It Is Worth Doing

You already booked capital gains this year
Action
Harvest matching losses now; this is the single highest-value case since the offset is dollar for dollar against a real tax bill
No gains, and you're already using the $3,000 ordinary-income offset
Action
Wait. Extra losses just carry forward, so there's no benefit to selling before year-end
The unrealized loss is under a few hundred dollars
Action
Skip it. Trading costs and effort outweigh the tax savings at most brackets
The position sits inside a 401(k) or IRA
Action
Not eligible. There's no loss to harvest in a tax-advantaged account
You want this handled automatically
Action
Consider a robo-advisor (Betterment, Wealthfront) that harvests small losses continuously rather than once a year

It is less valuable when:

  • You have no capital gains to offset and are already using the $3,000 ordinary income deduction
  • Your investments are inside tax-advantaged accounts
  • Transaction costs and effort exceed the tax benefit

Read more on how gains are taxed in the first place in capital gains tax explained, how the netting rules interact with your overall bracket in tax brackets explained, and check the tax-loss harvesting calculator to estimate your specific savings before you place a trade.

What to Do Now

1
Check your taxable brokerage account for positions currently worth less than you paid.
3
Confirm you have gains this year to offset before selling anything.
4
Line up a similar (not identical) replacement fund so you avoid the wash-sale rule.

Sources

The wash-sale rule and loss-netting order described above follow IRS Publication 550, Investment Income and Expenses (irs.gov/publications/p550), and IRS Topic 409, Capital Gains and Losses (irs.gov/taxtopics/tc409). Tax-loss harvesting involves complex, fact-specific tax rules; consult a tax advisor before executing, particularly around the wash-sale rule and your own cost-basis history.

Frequently Asked Questions

Does tax-loss harvesting work in a 401(k) or IRA?
No. Tax-loss harvesting only applies to taxable brokerage accounts. Gains and losses inside a 401(k), Traditional IRA, or Roth IRA are not visible to the IRS until you withdraw, so there is no loss to harvest and no deduction to claim.
What is the wash-sale rule?
The IRS disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale, a 61-day window in total. If you trigger it, the disallowed loss is not gone; it is added to the cost basis of the replacement security and recovered later.
How much can tax-loss harvesting save me?
It depends on your tax bracket and how much loss you realize. Losses offset capital gains dollar for dollar, and up to $3,000 of net losses beyond that can offset ordinary income each year, with any excess carrying forward indefinitely to future tax years.
Is tax-loss harvesting worth doing for a small loss?
Usually not. Harvesting $500 in losses to save $75 in taxes rarely justifies the effort and transaction cost. It becomes worthwhile when the loss is meaningful relative to your tax bracket and you already have gains elsewhere to offset.
Next step
Find your best money move in 90 seconds.

Answer a few questions about your situation and goals. Money Map points you to the highest-value next step across savings, mortgage, cards, and debt.

Editorial review

What changed since the last update

Reviewed dataRate references, product links, and dated claims were checked against current SwitchWize sources.
Updated contextRelated calculators, Money Map paths, and offer links were refreshed for this article topic.
StandardsReviewed under the SwitchWize editorial policy. See standards →

Was this guide helpful?

Found an inaccurate, outdated, or missing claim? Report a correction. We verify reports against the relevant source before changing a guide or ranking.

Why SwitchWize

SwitchWize was founded on the simple belief that banking should work for people, not the other way around. We break down information barriers with transparent rate comparisons, clear guidance, and simple tools — so every American can decide with confidence.

Read our full ethos