Bottom line: Tax-loss harvesting sells investments at a loss, uses those losses to offset capital gains, and immediately buys a similar (but not identical) investment to maintain the same market exposure. Done correctly, it defers or eliminates taxes with no meaningful change to your long-term investment position.
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.
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, saving you $900 in taxes (at 15% rate)
- Your portfolio is effectively unchanged, still 100% S&P 500 exposure
How Losses Offset Gains
Capital losses offset capital gains dollar-for-dollar. The netting rules:
- Short-term losses offset short-term gains first
- Long-term losses offset long-term gains first
- Excess short-term losses can offset long-term gains (and vice versa)
- If total losses exceed total gains, up to $3,000 of net losses can offset ordinary income per year
- Losses beyond $3,000 carry forward indefinitely to future tax years
The $3,000 ordinary income offset is available every year, meaning ongoing loss carryforwards continue providing benefit until exhausted.
- 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.
What triggers the wash-sale rule:
- Selling VOO (Vanguard S&P 500 ETF) and buying SPY (SPDR S&P 500 ETF), same index, considered substantially identical by many tax professionals; avoid
- Selling an individual stock and buying it back within 30 days
- Selling a mutual fund and buying the same fund's ETF equivalent
What does NOT trigger it:
- Selling VOO and buying IVV (iShares S&P 500 ETF), different products tracking the same index (common practice, though consult a tax advisor)
- Selling a total U.S. market fund and buying an S&P 500 fund (different indices)
- Selling a bond fund and buying a different bond fund with similar duration and credit quality
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.
When It Is Worth Doing
Tax-loss harvesting is most valuable when:
- You have realized capital gains to offset in the same year
- You are in a tax bracket where capital gains are taxed (15% or higher)
- The market decline is meaningful (harvesting $500 in losses for $75 in tax savings is not worth the effort)
- You can identify a suitable replacement investment to maintain exposure
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
Robo-advisors (Betterment, Wealthfront) automate tax-loss harvesting continuously, a legitimate reason to consider them for taxable accounts.
Tax-loss harvesting involves complex tax rules. Consult a tax advisor before executing, particularly regarding the wash-sale rule.
Frequently Asked Questions
Does tax-loss harvesting work in a 401(k) or IRA?
What is the wash-sale rule?
How much can tax-loss harvesting save me?
Is tax-loss harvesting worth doing for a small loss?
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
Was this guide helpful?