What Is Tax-Loss Harvesting?
Imagine you own two investments. One went up $10,000 and you sold it — that's a $10,000 capital gain, and you owe taxes on it. But another investment dropped $8,000. If you sell that losing investment, the $8,000 loss offsets most of the gain. Instead of paying taxes on $10,000, you only pay on $2,000.
That's tax-loss harvesting: intentionally selling investments that have declined in value so you can use the losses to reduce your tax bill. You're not giving up on investing — you replace the sold investment with something similar so your portfolio stays on track. The loss is real on paper, but your actual investment exposure barely changes.
Key Concept
Capital losses offset capital gains dollar for dollar. If you have $15,000 in gains and $15,000 in losses in the same year, your net capital gain is zero — no capital gains tax owed. Losses first offset gains of the same type (short-term losses against short-term gains, long-term against long-term), then any remaining losses offset the other type.
Short-Term vs Long-Term Capital Gains
The tax rate on your gains depends on how long you held the investment before selling:
- Short-term capital gains (held one year or less): taxed at your ordinary income tax rate — the same rate you pay on your salary. For high earners, this can be 32%, 35%, or even 37%.
- Long-term capital gains (held more than one year): taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income.
This distinction matters for harvesting because a short-term loss that offsets a short-term gain saves you more in taxes than the same loss offsetting a long-term gain. A $10,000 short-term loss offsetting a $10,000 short-term gain for someone in the 35% bracket saves $3,500 in taxes. The same loss offsetting a long-term gain taxed at 15% only saves $1,500.
When you have both types of losses and gains, losses offset same-type gains first. This ordering is automatic — you don't choose.
The $3,000 Rule
What happens when your capital losses exceed your capital gains? The first $3,000 of excess losses ($1,500 if married filing separately) can be deducted against your ordinary income — your salary, freelance income, interest, and so on. Any losses beyond that carry forward to future tax years indefinitely.
Real-World Scenario
Priya had a rough year in the market. She sold several declining positions, realizing $28,000 in capital losses. She also sold one winner for a $10,000 capital gain. Here's her math:
- Net capital loss: $28,000 − $10,000 = $18,000
- Deducted against ordinary income this year: $3,000
- Remaining loss carried forward: $15,000
Priya can use that $15,000 carryforward against future capital gains — or deduct another $3,000 per year against ordinary income for the next five years. The losses don't expire.
The Wash Sale Rule in Detail
The Internal Revenue Service (IRS) doesn't want you to sell an investment purely for the tax loss and immediately buy it back. To prevent this, the wash sale rule disallows the loss if you buy a "substantially identical" security within a 61-day window — 30 days before through 30 days after the sale.
Key Concept
The 61-day window. A wash sale is triggered if you buy substantially identical securities from 30 days before the sale through 30 days after. This means you can't pre-buy the replacement and then sell the loser — that counts too. The window is 30 + 1 (sale day) + 30 = 61 calendar days total.
If you trigger a wash sale, you don't lose the tax benefit forever. The disallowed loss gets added to the cost basis of the replacement shares. You'll eventually get the benefit when you sell those replacement shares — just not right now.
What Counts as "Substantially Identical"?
The IRS has never published a precise definition, which creates a gray area. Here's what's generally understood:
- Substantially identical: Shares of the exact same stock or fund. Selling Vanguard Total Stock Market Index Fund and buying it back — that's a wash sale. Selling the ETF (exchange-traded fund) share class and buying the mutual fund share class of the same index at the same company is also widely considered substantially identical.
- Probably substantially identical: Two funds that track the exact same index from different providers (e.g., one company's S&P 500 fund and another company's S&P 500 fund). Tax professionals disagree on this, and the IRS hasn't issued clear guidance.
- Generally NOT substantially identical: A total U.S. stock market fund and an S&P 500 fund — they're similar but track different indexes with different compositions. A U.S. stock fund and an international stock fund. Individual stocks in the same industry (selling one bank stock and buying a different bank stock).
Common Myth
"If I sell a stock at a loss and buy it back 15 days later, I just lose the tax deduction entirely."
Reality: The loss isn't lost — it's added to the cost basis of the replacement shares. You'll recoup the tax benefit when you eventually sell those shares. It's a deferral, not a forfeiture. But you don't get the deduction this year, which defeats the purpose of harvesting.
How to Harvest: Step by Step
Here's the practical process:
- Identify the loser. Review your taxable brokerage account for positions with unrealized losses. Retirement accounts (401(k), IRA) don't count — gains and losses inside those accounts aren't taxable events.
- Sell the losing position. This realizes the loss for tax purposes. Make note of the sale date.
- Buy a similar but not substantially identical replacement. Do this the same day if you want to stay invested. For example, if you sold a total U.S. stock market fund, buy a large-cap fund or an S&P 500 fund as a temporary replacement.
- Wait at least 31 days if you want the original back. After the wash sale window closes, you can sell the replacement and buy back your original fund if you prefer it.
- Record everything. Track your purchase dates, sale dates, and cost basis. Your brokerage handles most of this automatically, but keeping your own records prevents surprises at tax time.
Real-World Scenario
Marcus holds a total international stock fund in his taxable account that has dropped $12,000 below his purchase price. He also sold some individual stocks earlier this year for an $8,000 short-term gain. Here's what Marcus does:
- Sells the international fund, realizing a $12,000 loss
- Same day, buys a different international fund that tracks a different index (e.g., switching from a developed-markets fund to a total international fund, or vice versa)
- The $12,000 loss offsets his $8,000 short-term gain completely, plus he deducts $3,000 against ordinary income and carries forward $1,000
- After 31 days, if he prefers his original fund, he can switch back
At a 32% marginal tax rate on the short-term gain and ordinary income, Marcus saves roughly $3,520 in taxes this year — without meaningfully changing his portfolio.
Direct Indexing: The Industrial-Scale Version
Most investors own the stock market through index funds — a single fund holds hundreds or thousands of stocks. The problem for tax-loss harvesting is that the fund only has one price. Either the whole fund is up or it's down.
Direct indexing takes a different approach: instead of buying one fund that holds 500 stocks, you buy all 500 individual stocks directly. Now each stock has its own cost basis. Even in a year when the overall market is up, some individual stocks will be down — and each one is a harvesting opportunity.
This was historically only available to wealthy investors because of the trading costs and complexity. Fractional shares and zero-commission trading have made it accessible at lower account sizes, typically starting around $100,000 at most providers.
Key Concept
Direct indexing generates more harvesting opportunities because individual stocks are more volatile than the overall index. In a year where the S&P 500 is up 10%, perhaps 150 of its 500 component stocks are actually down. Each declining stock is a potential harvest. A single index fund, being up overall, offers nothing to harvest.
When Tax-Loss Harvesting Is Most Valuable
Tax-loss harvesting produces the biggest benefit in specific situations:
- High-income years. The higher your tax bracket, the more each dollar of loss saves you. A $10,000 harvested loss saves $3,700 for someone in the 37% bracket but only $1,200 for someone in the 12% bracket.
- Large taxable accounts. You can only harvest losses in taxable brokerage accounts. The bigger the account, the more opportunities exist.
- Volatile markets. Sharp market drops create abundant harvesting opportunities. A broad market decline of 20% or more is prime harvesting season.
- Years with large realized gains. If you sold a business, exercised stock options, or had a large investment payout, harvesting losses from elsewhere in your portfolio can offset that concentrated gain.
- Early in your investing life. The longer the time horizon for those harvested losses to compound as tax savings, the greater the total benefit.
When It's NOT Worth the Effort
Tax-loss harvesting isn't always useful. Skip it when:
- Your money is in retirement accounts. 401(k)s, IRAs (individual retirement accounts), and Roth accounts are tax-advantaged — you don't pay capital gains taxes on trades inside them. There's nothing to harvest.
- You're in the 0% long-term capital gains bracket. In 2024, single filers with taxable income under roughly $47,000 and married couples under roughly $94,000 pay 0% on long-term capital gains. If that's your bracket, harvesting long-term losses produces no tax savings — you already owe nothing on those gains.
- The account is small. Harvesting a $200 loss to save $30–$50 in taxes may not be worth the paperwork and tracking, especially if you're doing it manually.
- You'd have to sell at a bad time or buy something you don't want. Don't warp your investment strategy just to harvest a loss. The tax tail shouldn't wag the investment dog.
Common Myth
"Everyone with a brokerage account should be tax-loss harvesting constantly."
Reality: If your taxable account is small, you're in a low tax bracket, or you only hold a couple of index funds, the benefit may be trivially small. The strategy shines most for high-income investors with large, diversified taxable portfolios. For everyone else, the time and complexity may not justify the savings.
Automated Tax-Loss Harvesting
Several automated investment services (often called robo-advisors) include tax-loss harvesting as a built-in feature. They monitor your portfolio daily, automatically sell declining positions, buy replacement funds, and track the wash sale windows — all without you doing anything.
How automated harvesting typically works:
- The software monitors each holding against its cost basis
- When a position drops below a threshold (often adjusted for trading costs and the wash sale window), it sells
- It immediately buys a pre-selected replacement that's not substantially identical
- After 31+ days, it may rotate back to the primary holding
- It tracks everything for your year-end tax forms
The advantage is consistency — a computer checks every day without forgetting. The disadvantage is that automated services charge management fees (typically 0.25%–0.50% of assets per year). Whether the tax savings exceed those fees depends on your account size, tax bracket, and how volatile the market is.
Try It Yourself
Wondering whether management fees eat up the tax savings from automated harvesting? Open the Fee Impact Calculator and compare two scenarios: one portfolio paying a 0.30% annual advisory fee (typical robo-advisor) and one paying 0.03% (a self-managed index fund). Over 20 years on a $200,000 portfolio, see how much that fee difference compounds to — then compare it against realistic tax savings of $1,000–$3,000 per year from automated harvesting.
The Long-Term Gotcha: Deferred, Not Eliminated
Here's the part that tax-loss harvesting advocates sometimes understate: in most cases, harvesting defers taxes rather than eliminating them.
When you sell a loser and buy a replacement at the new lower price, your replacement has a lower cost basis. Eventually, when you sell that replacement, you'll have a larger gain — and pay taxes on it then. You didn't dodge the tax; you pushed it into the future.
Real-World Scenario
Elena bought a fund for $50,000. It drops to $38,000 and she harvests the $12,000 loss. She buys a similar fund for $38,000. Years later, the replacement grows to $70,000 and she sells:
- Without harvesting: Gain would have been $70,000 − $50,000 = $20,000 taxable
- With harvesting: She got a $12,000 deduction earlier, but her replacement gain is $70,000 − $38,000 = $32,000 taxable
- Net: She claimed $12,000 in losses and later paid taxes on $12,000 more in gains. If the tax rate is the same both years, it's a wash — except she got the benefit earlier and could invest those tax savings in the meantime.
The real value of deferral comes from three places:
- Time value of money. A dollar saved in taxes today is worth more than a dollar owed in taxes 20 years from now. You can invest those savings now.
- Rate arbitrage. If you harvest a loss during a high-income year (offsetting gains taxed at 35%) and eventually realize the gain in retirement (when your rate might be 15%), you come out ahead permanently.
- Step-up in basis at death. When you die, your heirs inherit investments at their current market value, not your original cost basis. All those deferred gains? Erased. This is the one scenario where tax-loss harvesting truly eliminates taxes rather than deferring them.
Think about your own situation: What's your largest taxable account? Do you have positions that are currently down? If so, is there a similar-but-not-identical fund you could swap into while staying invested in the same market segment?
Key Takeaways
- Tax-loss harvesting uses investment losses to offset capital gains and up to $3,000 per year of ordinary income. Unused losses carry forward indefinitely.
- The wash sale rule blocks you from claiming the loss if you buy a substantially identical security within the 61-day window (30 days before through 30 days after the sale).
- The strategy is most powerful for high-income investors with large taxable accounts, especially during market downturns. It's irrelevant in retirement accounts.
- Harvesting usually defers taxes rather than eliminating them — your replacement investment has a lower cost basis, leading to a larger gain later. The exceptions: rate arbitrage across life stages and the step-up in basis at death.