What Is Tax-Loss Harvesting?
Tax-loss harvesting (TLH) is an investment strategy that involves selling securities at a loss to offset capital gains taxes on other investments. By realizing losses strategically, you reduce your taxable income in the current year without significantly changing your overall portfolio allocation. The harvested loss can offset gains dollar-for-dollar, and if your losses exceed your gains, you can deduct up to $3,000 per year against ordinary income, carrying forward any remaining unused losses to future tax years indefinitely.
Tax-loss harvesting does not eliminate taxes entirely. It primarily defers them, since the replacement investment you purchase will have a lower cost basis and may generate a larger taxable gain when eventually sold. However, the time value of deferring taxes, the ability to offset gains at potentially higher rates with losses at lower rates, and the annual $3,000 ordinary income deduction make TLH a valuable strategy for taxable investment accounts.
It is important to note that tax-loss harvesting only applies to taxable brokerage accounts. It does not apply to tax-advantaged accounts such as 401(k)s, IRAs, or Roth IRAs, because gains and losses within those accounts are not taxed annually.
How Tax-Loss Harvesting Works
The process of tax-loss harvesting follows a specific sequence of steps. Understanding each step helps you execute the strategy correctly and avoid common pitfalls.
Step 1: Identify Investments Trading at a Loss
Review your taxable investment accounts for positions where the current market value is below your cost basis (the price you originally paid, including commissions). These unrealized losses are candidates for harvesting. Focus on losses that are large enough to be meaningful after accounting for trading costs.
Step 2: Sell the Losing Position
Sell the investment to realize the loss. Once the sale is executed, the loss is "harvested" and becomes a realized loss that you can use on your tax return. The timing of the sale matters: losses realized before December 31 can be used on that year's tax return.
Step 3: Purchase a Replacement Investment
To maintain your desired asset allocation and market exposure, immediately purchase a similar but not "substantially identical" investment. For example, if you sell an S&P 500 index fund at a loss, you might purchase a total stock market index fund or an S&P 500 fund from a different provider that tracks a different index. The key is to stay invested in the market while complying with the wash sale rule.
Step 4: Wait at Least 31 Days
You must wait at least 31 days before repurchasing the original security or a substantially identical one. After 31 days have passed, you can sell the replacement and buy back the original if you prefer. Many investors simply keep the replacement investment permanently, especially if it serves the same portfolio role.
Step 5: Report on Your Tax Return
Realized losses are reported on Schedule D and Form 8949 of your federal tax return. Losses first offset capital gains of the same type (short-term losses offset short-term gains, long-term losses offset long-term gains), then offset gains of the other type, and finally offset up to $3,000 of ordinary income. Any excess losses carry forward to future years.
The Wash Sale Rule Explained
The wash sale rule is an IRS regulation that prevents investors from claiming a tax deduction on a security sold at a loss if they purchase a "substantially identical" security within 30 days before or after the sale. The rule creates a 61-day window (30 days before, the sale date, and 30 days after) during which you cannot repurchase the same or substantially identical investment without invalidating the loss for tax purposes.
If you trigger a wash sale, the disallowed loss is not gone permanently. Instead, it is added to the cost basis of the replacement security. This means you will eventually recover the benefit of the loss when you sell the replacement, but you lose the immediate tax benefit of harvesting the loss now.
Wash Sale Rule Applies Across All Accounts
The wash sale rule applies across all of your accounts, including your spouse's accounts if you file jointly. If you sell a stock at a loss in your taxable brokerage account and buy the same stock within 30 days in your IRA, the loss is disallowed. This cross-account application is one of the most commonly overlooked aspects of the wash sale rule. If the repurchase occurs in an IRA, the loss may be permanently disallowed since you cannot adjust cost basis inside a tax-advantaged account.
Substantially Identical Securities
The IRS has not provided a comprehensive definition of "substantially identical" securities, which creates some ambiguity for investors. However, the following guidelines are generally accepted based on IRS rulings and tax court decisions.
Clearly substantially identical:
- Shares of the exact same stock or fund (e.g., selling AAPL and rebuying AAPL)
- Different share classes of the same mutual fund (e.g., selling Investor shares and buying Admiral shares of the same Vanguard fund)
- Options or contracts to acquire substantially identical stock
Generally NOT considered substantially identical:
- An S&P 500 index fund from one provider and a total stock market index fund from another provider (different indices, different holdings)
- An S&P 500 ETF and a large-cap value ETF (different investment objectives and holdings)
- Stocks of different companies in the same sector (e.g., selling Coca-Cola and buying PepsiCo)
- A mutual fund and an ETF that track different indices, even if they have overlapping holdings
Gray area:
- ETFs from different providers that track the exact same index (e.g., two different S&P 500 ETFs). Many tax professionals consider these substantially identical, though the IRS has not ruled definitively. A conservative approach is to switch to a fund tracking a different index.
Short-Term vs. Long-Term Capital Losses
The character of your harvested loss matters because short-term and long-term capital gains are taxed at different rates. Understanding how losses interact with gains helps you maximize the tax benefit.
| Feature | Short-Term Capital Losses | Long-Term Capital Losses |
|---|---|---|
| Holding Period | Asset held 1 year or less | Asset held more than 1 year |
| First Offsets | Short-term capital gains (taxed at ordinary income rates up to 37%) | Long-term capital gains (taxed at 0%, 15%, or 20%) |
| Cross-Offset | Excess offsets long-term gains | Excess offsets short-term gains |
| Ordinary Income Offset | Up to $3,000/year after offsetting all gains | Up to $3,000/year after offsetting all gains |
| Maximum Tax Benefit per Dollar | Higher, because short-term gains are taxed at higher rates | Lower, because long-term gains are taxed at lower rates |
| Carry Forward | Yes, indefinitely (retains short-term character) | Yes, indefinitely (retains long-term character) |
Because short-term capital gains are taxed at ordinary income rates (up to 37% for federal), a short-term loss that offsets a short-term gain saves more in taxes than a long-term loss offsetting a long-term gain (taxed at 0%, 15%, or 20%). For this reason, harvesting short-term losses is generally more valuable per dollar than harvesting long-term losses, all else being equal.
Tax-Loss Harvesting Strategies
Year-End Harvesting
The most common approach is reviewing your portfolio in November or December to identify harvesting opportunities before the tax year ends. This gives you a clear picture of your realized gains and losses for the year and allows you to harvest exactly enough losses to offset your gains. The advantage of year-end harvesting is simplicity and certainty. The disadvantage is that you may miss harvesting opportunities that arise earlier in the year when market dips create temporarily larger unrealized losses.
Ongoing (Opportunistic) Harvesting
A more proactive approach is monitoring your portfolio throughout the year and harvesting losses whenever they exceed a meaningful threshold. Market volatility creates frequent opportunities, and losses available in February may be gone by December if the market recovers. Ongoing harvesting captures more tax savings over time but requires more active management and attention to the wash sale rule across multiple transactions.
Automated Harvesting
Several robo-advisors and investment platforms offer automated tax-loss harvesting as a core feature. These platforms use algorithms to monitor your portfolio daily, automatically selling positions that have declined and purchasing replacement securities. Automated harvesting is particularly effective because it captures even small losses that accumulate over time and handles the wash sale rule compliance automatically. This approach is most practical for investors who want the benefits of TLH without actively managing the process.
Asset Location Optimization
Tax-loss harvesting works best as part of a broader tax-efficient strategy that includes asset location, placing investments in the most tax-efficient account type. Tax-inefficient investments (bonds, REITs, actively managed funds) are best held in tax-advantaged accounts, while tax-efficient investments (index funds, growth stocks) are best held in taxable accounts where they are candidates for TLH. Proper asset location maximizes both the opportunities for TLH and the overall tax efficiency of your portfolio.
When Tax-Loss Harvesting Does Not Work
Tax-loss harvesting is not beneficial in every situation. Understanding its limitations helps you determine when to use it and when to skip it.
- Tax-advantaged accounts. Gains and losses inside 401(k)s, IRAs, and Roth IRAs have no tax impact until distribution, so TLH provides no benefit within these accounts.
- Very low income years. If your taxable income is low enough to qualify for the 0% long-term capital gains rate (under $47,025 for single filers in 2024), harvesting long-term losses saves you nothing because you would not have owed tax on those gains anyway.
- Small losses. If the realized loss is small relative to the transaction costs and the effort involved, the tax savings may not be worth the complexity. Most advisors recommend a minimum threshold (such as $1,000) before harvesting.
- Desire to hold a specific position. If you want to maintain a position in a specific stock or fund for fundamental reasons, selling and replacing it disrupts your investment thesis. TLH works best with broad index funds where similar replacements are readily available.
- Near-term plans to sell at a gain. If you plan to sell your replacement investment at a gain within a short period, the lower cost basis means you may owe more in gains than you saved by harvesting. TLH is most valuable when you can defer the replacement sale for years or until death (when the step-up in basis eliminates the deferred gain).
- State tax complications. Some states do not conform to federal wash sale rules or have different treatment of capital losses. If you live in such a state, the added complexity may reduce the net benefit.
Software and Tools for Tax-Loss Harvesting
Managing tax-loss harvesting manually across a large portfolio can be complex. Several categories of tools can help automate and streamline the process.
Robo-advisors with automated TLH are the most hands-off option. Platforms such as Wealthfront, Betterment, and Schwab Intelligent Portfolios include daily tax-loss harvesting as part of their service. They monitor your portfolio continuously, execute trades automatically, and handle wash sale rule compliance across your accounts on their platform. This is the simplest approach for investors who want professional-level TLH without active management.
Portfolio tracking software such as tax lot viewers in brokerage platforms (Fidelity, Schwab, Vanguard) allows you to view unrealized gains and losses by tax lot, making it easier to identify harvesting candidates. Many platforms now highlight positions with significant unrealized losses as potential TLH opportunities.
Tax preparation software like TurboTax, H&R Block, and TaxAct import your brokerage 1099-B forms and help you correctly report harvested losses on Schedule D and Form 8949. They can also flag potential wash sale violations based on your transaction history.
Key Takeaway
Tax-loss harvesting is one of the few strategies that generates real value without taking additional investment risk. The tax savings compound over time, especially when losses are carried forward and offset future gains. For investors in taxable accounts with diversified index fund portfolios, TLH can add an estimated 0.5% to 1.5% of additional after-tax return annually, according to various industry studies. The strategy is most effective when combined with a disciplined approach to the wash sale rule and careful selection of replacement securities.