Tax-Loss Harvesting: How It Works, Rules & When It’s Worth It
How Tax-Loss Harvesting Works — Step by Step
The process is straightforward once you understand the mechanics:
| Step | Action | Example |
|---|---|---|
| 1. Identify a loss | Find a position in your taxable account trading below your cost basis | You bought Fund A for $50,000; it’s now worth $38,000 |
| 2. Sell the position | Sell to realize the loss | You lock in a $12,000 capital loss |
| 3. Reinvest immediately | Buy a similar but not “substantially identical” fund to stay invested | You buy Fund B (same asset class, different index or provider) |
| 4. Use the loss at tax time | The $12,000 loss offsets realized gains; excess offsets up to $3,000 of ordinary income | You had $15,000 in gains → now only $3,000 is taxable |
The key: you stay fully invested. Your portfolio allocation barely changes. What changes is your tax bill — you’ve turned an unrealized loss into a realized tax benefit while maintaining the same market exposure.
What Losses Can Offset
Capital losses are applied in a specific order by the IRS. Understanding this order helps you harvest strategically:
| Priority | What the Loss Offsets | Tax Savings |
|---|---|---|
| 1st | Capital gains of the same type (short-term losses offset short-term gains first; long-term losses offset long-term gains first) | Highest — short-term gains are taxed up to 37% |
| 2nd | Capital gains of the other type (net short-term losses offset long-term gains and vice versa) | Moderate — depends on the gain type offset |
| 3rd | Up to $3,000 of ordinary income per year ($1,500 if married filing separately) | Saves at your marginal rate |
| 4th | Carry forward excess losses to future years — indefinitely | Continues reducing taxes until fully used |
The Wash Sale Rule — The Critical Constraint
The IRS won’t let you claim a loss if you buy a “substantially identical” security within 30 days before or after the sale. This 61-day window (30 days before + sale day + 30 days after) is the wash sale rule, and violating it disallows the loss entirely.
| Triggers a Wash Sale | Does NOT Trigger a Wash Sale |
|---|---|
| Selling Vanguard S&P 500 ETF (VOO) and buying it back within 30 days | Selling VOO and buying iShares Core S&P 500 ETF (IVV) |
| Selling a stock and buying a call option on the same stock | Selling an S&P 500 fund and buying a total stock market fund |
| Buying the same security in your IRA within the 61-day window | Selling a bond fund and buying a different duration bond fund |
| Your spouse buying the identical security in their account | Waiting 31+ days and rebuying the original security |
A Worked Example — Full Year of Harvesting
Here’s how tax-loss harvesting plays out over a year for a single filer in the 24% ordinary income bracket with a 15% long-term capital gains rate:
| Event | Amount |
|---|---|
| Long-term capital gains realized (stock sales + fund distributions) | +$25,000 |
| Short-term capital gains from rebalancing | +$5,000 |
| Tax-loss harvesting — long-term loss realized | −$18,000 |
| Tax-loss harvesting — short-term loss realized | −$5,000 |
| Without Harvesting | With Harvesting |
|---|---|
| $25,000 LTCG × 15% = $3,750 | $7,000 net LTCG × 15% = $1,050 |
| $5,000 STCG × 24% = $1,200 | $0 net STCG (fully offset) |
| Total tax: $4,950 | Total tax: $1,050 |
| Tax saved: $3,900 |
The investor stayed fully invested throughout — they simply swapped into similar funds to realize the losses. The $3,900 in savings compounds for years if reinvested.
When Tax-Loss Harvesting Makes Sense
| Good Candidate | Less Effective |
|---|---|
| Taxable brokerage account with realized gains | Tax-advantaged accounts (401(k), IRA, HSA) — no gains to offset |
| High-income earner in 32–37% bracket | Low-income filer already in the 0% long-term gains bracket |
| Diversified portfolio with some positions down | Concentrated stock position you can’t find a swap for |
| Market downturn creating widespread losses | Strong bull market where nothing is trading below basis |
| Year with unusually large realized gains | Year with no realized gains and income under $3,000 deduction threshold |
The Trade-Off: Lower Basis Going Forward
Tax-loss harvesting isn’t a free lunch — it’s primarily a tax deferral. When you reinvest in a replacement fund, your new cost basis is lower. That means when you eventually sell the replacement, you’ll have a larger taxable gain. However, the strategy is still valuable for three reasons:
First, the time value of money — a dollar saved today is worth more than a dollar owed years from now. Second, you might never sell — if you hold until death, the step-up in basis eliminates the deferred gain entirely. Third, your future tax rate might be lower (in retirement, for example), so you defer from a high-rate year and pay in a low-rate year.
Automating Tax-Loss Harvesting
Robo-advisors like Betterment and Wealthfront have popularized automated tax-loss harvesting. These platforms monitor your portfolio daily and execute swaps whenever a position drops below basis by a meaningful amount. For investors with large taxable accounts, the annual tax savings can exceed the advisory fee — making the service effectively free or better.
If you prefer to do it yourself, review your portfolio quarterly or during market pullbacks. Focus on your largest positions first — a 10% loss on a $100,000 position generates $10,000 in harvestable losses. For a complete walkthrough, see our Tax-Loss Harvesting Guide.
Key Takeaways
- Tax-loss harvesting offsets realized capital gains with realized losses, reducing your current-year tax bill.
- Up to $3,000 of excess losses can offset ordinary income annually, with unlimited carryforward.
- The wash sale rule prevents repurchasing a “substantially identical” security within 30 days — swap to a similar but different fund instead.
- It’s most valuable in taxable accounts for high-income investors with significant realized gains.
- The strategy defers taxes (lower basis on replacement), but time value of money, potential step-up in basis at death, and future lower rates make it worthwhile.
Frequently Asked Questions
Can I tax-loss harvest in my 401(k) or IRA?
No. Tax-advantaged accounts like a 401(k), Traditional IRA, and Roth IRA don’t generate taxable gains or deductible losses. Tax-loss harvesting only applies to taxable brokerage accounts. However, be careful not to trigger a wash sale by buying the same security in your IRA within 30 days of selling at a loss in your taxable account.
How much can tax-loss harvesting save me per year?
It depends on your portfolio size, market conditions, and tax rate. Studies suggest automated harvesting can add 1–2% in after-tax returns annually for large taxable portfolios. In a year with significant market volatility, the opportunities are larger.
What counts as “substantially identical” for the wash sale rule?
The IRS hasn’t defined this precisely, but buying the exact same stock or fund clearly qualifies. Buying a different fund tracking the same index is a gray area — most tax professionals consider it safe to swap between different providers (e.g., VOO to IVV) or between similar but non-identical indexes (e.g., S&P 500 to Total Stock Market). Just don’t buy the exact same security.
Should I harvest losses year-round or only in December?
Year-round is better. Losses can appear at any time — a March downturn creates harvesting opportunities that may disappear by December. The wash sale window is only 30 days, so you can harvest, wait 31 days, and swap back if you prefer the original fund. Many advisors review monthly or quarterly.