Tax-Loss Harvesting: The Complete Guide to Reducing Your Investment Taxes
How tax-loss harvesting works, the wash sale rule explained, when to harvest vs. hold, step-by-step implementation, and how to turn market downturns into tax savings. Updated for 2026 with real examples.
📑 On This Page ▾
📉 What Is Tax-Loss Harvesting?
Tax-loss harvesting is the practice of selling investments that have declined in value to realize a capital loss — then using that loss to offset capital gains or reduce your ordinary taxable income. You don't just sell and sit in cash; you immediately reinvest in a similar (but not "substantially identical") investment to maintain your market exposure. The result: your portfolio stays fully invested, but your tax bill shrinks.
Think of it as turning paper losses into real tax savings without changing your investment strategy. If your total stock market fund drops 15% during a market correction, that unrealized loss is doing nothing for you — it's just a number on a screen. But if you sell, realize the loss, and buy a similar index fund, you've locked in a tax deduction while staying fully exposed to the market's eventual recovery.
In the U.S. tax code, capital losses can offset capital gains dollar-for-dollar with no limit. If your losses exceed your gains, you can deduct up to $3,000 of excess losses against ordinary income each year ($1,500 if married filing separately). Any remaining losses carry forward indefinitely — they never expire. Over a 30-year investing career, disciplined tax-loss harvesting can add 0.5–1.5% to your after-tax returns annually, compounding into tens or hundreds of thousands of dollars.
💰 The Math: How Much Can You Actually Save?
The value of a harvested loss depends on your tax bracket and whether the loss offsets short-term gains, long-term gains, or ordinary income. Here's the breakdown:
| What the Loss Offsets | Tax Rate Saved | $10,000 Loss Saves You |
|---|---|---|
| Short-term capital gains | Up to 37% (your marginal rate) | Up to $3,700 |
| Long-term capital gains | 15% or 20% (most investors) | $1,500 – $2,000 |
| Ordinary income ($3,000 cap) | Your marginal rate (10–37%) | $720 – $1,110 per year |
The loss offsets gains in a specific order: first short-term losses offset short-term gains, then long-term losses offset long-term gains, then any remaining net losses cross over to offset the other type. After all gains are offset, excess losses reduce ordinary income up to $3,000/year. A single large market downturn can generate losses that you carry forward and deduct for a decade or more.
Example: You invest $100,000 in a total stock market fund. After a 20% market decline, it's worth $80,000. You sell, realizing a $20,000 long-term capital loss, and immediately buy a similar but not identical fund. You offset $10,000 of long-term capital gains from other sales, saving $1,500 at the 15% rate. The remaining $10,000 loss is applied: $3,000 offsets ordinary income in year 1 (saving ~$720 at the 24% bracket), and $7,000 carries forward to future years. Total tax savings from one harvest: approximately $3,900+.
🚿 The Wash Sale Rule Explained
The IRS wash sale rule (Section 1091) is the key constraint on tax-loss harvesting. It says: if you sell a security at a loss and buy a "substantially identical" security within 30 days before or after the sale, the loss is disallowed — you can't claim it on your taxes. The 30-day window runs in both directions, creating a 61-day total exclusion zone (30 days before + sale day + 30 days after).
What counts as "substantially identical"? The IRS has never published a precise definition, but the generally accepted interpretation among tax professionals is that the following are substantially identical: the exact same security (buying back the same ticker), different share classes of the same fund (e.g., VTSAX and VTI from Vanguard — both track the CRSP US Total Market Index). The following are generally not substantially identical: an S&P 500 fund and a total stock market fund (different indexes, different holdings), a Vanguard S&P 500 fund and a Schwab S&P 500 fund (same index, arguably substantially identical — this is the gray area), and funds tracking different indexes even if they have high overlap.
The wash sale rule applies across all your accounts — including your spouse's accounts, your IRA, and your 401(k). If you sell a fund at a loss in your taxable account and your 401(k) automatically purchases the same fund through payroll contributions within 30 days, the IRS can disallow the loss. Even dividend reinvestment (DRIP) can trigger a wash sale if it occurs within the window. Before harvesting, check all accounts for automatic purchases of the same or substantially identical securities.
🔨 Step-by-Step Implementation
Step 1: Identify positions with unrealized losses. Log into your taxable brokerage account and review each holding's cost basis. Most brokerages (Fidelity, Schwab, Vanguard) display unrealized gains/losses on the positions page. Focus on taxable accounts only — harvesting in IRAs or 401(k)s has no tax benefit because those accounts are already tax-advantaged.
Step 2: Select a replacement fund before selling. Choose a fund that maintains your target asset allocation but tracks a different index. See the "Best Swap Pairs" section below for specific recommendations. Have the replacement ready to buy immediately after selling.
Step 3: Sell the losing position. Place a market order during trading hours for the fastest execution. If you're selling a mutual fund, the trade will execute at end-of-day NAV. Note the exact sale date and loss amount — you'll need this for tax reporting.
Step 4: Immediately buy the replacement. Buy the replacement fund on the same day. You want to minimize time out of the market — even one day of missing a market rally can cost you more than the tax savings. For ETFs, you can literally sell and buy within minutes. For mutual funds, both trades will settle at the same day's NAV.
Step 5: Wait 31 days, then optionally swap back. After 31 days (not 30 — count the day after the sale as day 1), you can sell the replacement and buy back your original fund if you prefer it. Many investors simply keep the replacement fund permanently if the tracking error is negligible.
Step 6: Record the loss for tax filing. Your brokerage will report the loss on Form 1099-B. If you use tax software, the loss flows automatically to Schedule D and Form 8949. Make sure to verify the cost basis method (specific identification gives you the most control over which tax lots are sold).
⏱️ When to Harvest — and When Not To
Good times to harvest: Market corrections (10%+ declines), bear markets, sector-specific downturns that affect individual holdings, year-end tax planning when you have realized gains to offset, and any time a position shows a meaningful unrealized loss. There's no minimum loss threshold — even small losses add up over time.
When to hold off: If the loss is tiny (say, $50 on a position) and the transaction costs or complexity outweigh the benefit. If you're in the 0% capital gains bracket (taxable income below $47,025 single / $94,050 married in 2026) — you may want to do the opposite strategy: capital gains harvesting (selling winners at 0% tax to reset your cost basis higher). If you're planning to donate the shares to charity — donating appreciated stock lets you avoid capital gains entirely while deducting the full market value. See our Tax Planning Hub for charitable giving strategies.
🔄 Best Swap Pairs for Common Funds
The key to a good swap pair: different enough to avoid the wash sale rule, similar enough to maintain your portfolio's risk/return profile. Here are widely used swap pairs:
| Original Fund | Swap To | Why It Works |
|---|---|---|
| VTI (Vanguard Total Stock) | ITOT (iShares Total Stock) or SCHB (Schwab Broad Market) | Different fund families, different indexes (CRSP vs S&P or Dow Jones), similar exposure |
| VXUS (Vanguard Intl Stock) | IXUS (iShares Intl Stock) or SPDW (SPDR Intl Developed) | Different indexes covering similar international markets |
| BND (Vanguard Total Bond) | AGG (iShares Core Bond) or SCHZ (Schwab Aggregate Bond) | Both track aggregate bond indexes but from different providers |
| VOO (Vanguard S&P 500) | SPLG (SPDR S&P 500) or IVV (iShares S&P 500) | Same S&P 500 index — use with caution, may be "substantially identical" |
| VGT (Vanguard Info Tech) | XLK (SPDR Technology Select) | Different indexes (MSCI vs S&P), different weighting methodologies |
The safest swaps are between funds tracking genuinely different indexes — for example, CRSP US Total Market (VTI) vs. S&P Total Market (SPTM) vs. Dow Jones US Total Stock Market (SCHB). These funds hold similar but not identical baskets of stocks, making them clearly not "substantially identical" while producing nearly identical returns over time.
🎓 Advanced Strategies
Tax-lot-level harvesting: If you've been buying the same fund over time (through regular contributions), each purchase creates a separate "tax lot" with its own cost basis. You can sell specific lots that show losses while keeping lots that show gains. Set your cost basis method to "Specific Identification" (SpecID) at your brokerage to enable this.
Continuous harvesting: Don't wait for year-end. Monitor your portfolio throughout the year and harvest whenever meaningful losses appear. Research suggests that harvesting opportunities are most frequent during volatile markets — precisely when most investors are too anxious to act. Automated services like robo-advisors perform daily monitoring, but you can achieve similar results by checking monthly.
Loss carryforward stacking: In years with large market declines, you might harvest $50,000+ in losses. Since only $3,000/year offsets ordinary income, the rest carries forward. This creates a "loss bank" that you can deploy strategically in future years — for instance, when you sell a concentrated stock position with a large gain, or when you rebalance in a way that triggers gains. Our Investing for Beginners guide covers rebalancing fundamentals.
Pairing with Roth conversions: If you harvest losses and have a large loss carryforward, you can use those losses to partially offset the income from Roth conversions. This effectively lets you convert Traditional IRA money to Roth at a reduced tax cost — a powerful synergy for pre-retirees. See our Roth Conversion Ladder guide.
🚫 Common Mistakes
Mistake 1: Triggering a wash sale accidentally. Check all accounts (taxable, IRA, 401(k), spouse's accounts) for automatic purchases of the same fund within 30 days of selling. Turn off DRIP on the sold position before harvesting. Pause any automatic investment plans that buy the same fund.
Mistake 2: Harvesting in tax-advantaged accounts. Selling at a loss in an IRA or 401(k) does nothing for your taxes — these accounts don't report individual gains or losses. Worse, if the sale in your IRA triggers a wash sale in your taxable account, you permanently lose the loss deduction.
Mistake 3: Letting taxes drive investment decisions. Tax-loss harvesting should be a side benefit of disciplined investing, not a primary strategy. Never sell a great investment just to harvest a temporary loss if it means degrading your portfolio's long-term composition.
Mistake 4: Forgetting to reinvest immediately. The biggest risk of tax-loss harvesting isn't the wash sale — it's being out of the market during a recovery. If you sell on Monday and "wait to see what happens" before reinvesting, you might miss a 3% rally. The point is to stay fully invested at all times.
Mistake 5: Ignoring the cost basis reset. When you buy the replacement fund, your cost basis resets to the lower purchase price. This means when you eventually sell the replacement, your gain will be larger (since the basis is lower). Tax-loss harvesting defers taxes, not eliminates them — though the time value of that deferral is substantial, and if you hold until death, the stepped-up basis eliminates the deferred gain entirely.