What Is Tax Loss Harvesting?
Tax loss harvesting is a strategy that involves selling investments that have declined in value to realize capital losses, which can then be used to offset capital gains and reduce your tax liability. After selling the losing position, you reinvest the proceeds in a similar (but not substantially identical) investment to maintain your desired asset allocation. This approach allows you to capture a tax benefit from paper losses without meaningfully changing your investment exposure. Tax loss harvesting is most beneficial in taxable brokerage accounts and has no applicability to tax-advantaged accounts like IRAs or 401(k)s.
The strategy works because the U.S. tax code allows capital losses to offset capital gains dollar for dollar. Short-term losses first offset short-term gains (taxed at ordinary income rates of 10-37%), then long-term gains (taxed at 0%, 15%, or 20%). If your total capital losses exceed your capital gains, you can deduct up to $3,000 of the excess against ordinary income each year ($1,500 if married filing separately). Any remaining losses carry forward indefinitely to future tax years. Studies from Wealthfront and Betterment suggest that systematic tax loss harvesting can add 0.5-1.5% to after-tax returns annually, depending on the investor's tax bracket and market volatility.
The IRS wash sale rule prohibits claiming a loss on a security if you purchase a 'substantially identical' security within 30 days before or after the sale (a 61-day window). This includes purchases in your IRA, 401(k), or spouse's accounts. Violating the wash sale rule disallows the loss and adds it to the cost basis of the replacement security. Always wait 31 days or use a non-identical replacement investment.
How Capital Loss Netting Works
IRS Capital Loss Netting Order
Tax Loss Harvesting Example
- 1Step 1: Net short-term: $10,000 gains - $5,000 losses = $5,000 net short-term gain
- 2Step 2: Net long-term: $15,000 gains - $8,000 losses = $7,000 net long-term gain
- 3Step 3: Total net gain: $5,000 (short-term) + $7,000 (long-term) = $12,000
- 4Without harvesting: $10,000 x 24% + $15,000 x 15% = $2,400 + $2,250 = $4,650 federal tax
- 5With harvesting: $5,000 x 24% + $7,000 x 15% = $1,200 + $1,050 = $2,250 federal tax
- 6Federal tax savings: $4,650 - $2,250 = $2,400
- 7State tax savings: $13,000 (losses) x 5% = $650
- 8NIIT savings: $13,000 x 3.8% = $494
- 9Total tax savings: $2,400 + $650 + $494 = $3,544
2026 Capital Gains Tax Rates
| Filing Status | 0% Rate | 15% Rate | 20% Rate | NIIT Threshold (3.8%) |
|---|---|---|---|---|
| Single | Up to $48,350 | $48,351 - $533,400 | Over $533,400 | $200,000 MAGI |
| Married Filing Jointly | Up to $96,700 | $96,701 - $600,050 | Over $600,050 | $250,000 MAGI |
| Head of Household | Up to $64,750 | $64,751 - $566,700 | Over $566,700 | $200,000 MAGI |
| Married Filing Separately | Up to $48,350 | $48,351 - $300,025 | Over $300,025 | $125,000 MAGI |
The Wash Sale Rule Explained
The wash sale rule (IRS Section 1091) prevents investors from claiming a tax loss while immediately repurchasing the same or a substantially identical security. The rule applies if you buy the same security (or an option to buy it) within 30 days before or after the loss sale, creating a 61-day window. The IRS has not precisely defined 'substantially identical,' but generally two different stocks are not substantially identical, while shares of the same company or the same mutual fund/ETF clearly are. Index funds from different providers that track the same index (e.g., Vanguard S&P 500 vs. Schwab S&P 500) occupy a gray area; most tax professionals recommend switching to a different index (e.g., S&P 500 to total stock market) to be safe.
Importantly, the wash sale rule applies across all your accounts, including IRAs, 401(k)s, and your spouse's accounts. If you sell a stock at a loss in your taxable account and buy it within 30 days in your IRA, the loss is permanently disallowed (it cannot be added to the IRA's cost basis). Dividend reinvestment (DRIP) can also trigger wash sales if the reinvested dividend purchases the same security during the 61-day window. Consider temporarily disabling DRIP for any security you plan to harvest losses on.
Tax Loss Harvesting Best Practices
- Prioritize harvesting short-term losses: They offset short-term gains taxed at ordinary income rates (10-37%), providing the highest tax savings per dollar of loss.
- Replace, do not abandon: After selling a losing position, immediately reinvest in a similar but not substantially identical investment to maintain your target asset allocation.
- Common swap pairs: Vanguard Total Stock Market to Schwab Total Stock Market, S&P 500 to Russell 1000, MSCI EAFE to FTSE Developed, Barclays Aggregate Bond to Bloomberg US Bond.
- Harvest throughout the year: Do not wait until December. Market volatility creates harvesting opportunities year-round, and early-year harvesting maximizes the time value of tax savings.
- Be aware of the reduced cost basis: Tax loss harvesting does not eliminate taxes; it defers them. Your replacement investment has a lower cost basis, so you will pay more tax when you eventually sell it.
- Keep detailed records: Track all harvested losses, replacement purchases, wash sale violations, and carryforward balances. Your brokerage provides Form 1099-B, but maintaining your own records prevents errors.
- Consider the opportunity cost: If selling triggers a meaningful departure from your target allocation for 31+ days, the investment risk may outweigh the tax savings.
When Tax Loss Harvesting Is Most Valuable
Tax loss harvesting provides the greatest benefit to high-income investors in the 32-37% federal tax bracket (plus state taxes and NIIT), investors with significant short-term capital gains that would otherwise be taxed at ordinary income rates, and investors who can defer the embedded gain for many years or pass the assets to heirs (who receive a stepped-up cost basis at death, permanently eliminating the deferred tax). The strategy is less valuable for investors in the 0% capital gains bracket, those with minimal portfolio turnover, or investors in tax-free accounts. Automated tax loss harvesting services from robo-advisors like Betterment, Wealthfront, and Vanguard Digital Advisor have made this strategy accessible to a broader range of investors.
For UK-based investors, capital gains tax rules differ significantly from the US. Try our sister site <a href="https://ukcalculator.com">UK Calculator</a> for HMRC-compliant tools including capital gains tax calculators, ISA allowance optimizers, and tax-efficient investing guides tailored to the UK system.
For a deep understanding of tax-efficient investing, we recommend <a href="https://www.amazon.com/Intelligent-Investor-Definitive-Investing-Essentials/dp/0060555661?tag=websites026-20">The Intelligent Investor</a> by Benjamin Graham for portfolio management principles, and <a href="https://www.amazon.com/Random-Walk-Down-Wall-Street/dp/1324002182?tag=websites026-20">A Random Walk Down Wall Street</a> by Burton Malkiel for practical strategies on index fund investing and tax efficiency.
Tax Loss Harvesting and Portfolio Rebalancing
Tax loss harvesting can be combined with regular portfolio rebalancing to achieve both tax savings and optimal asset allocation. When your portfolio drifts from its target allocation, selling overweight positions that have losses kills two birds with one stone: you capture the tax loss and move your allocation back to target. When rebalancing, sell losing positions in overweight asset classes first, use the harvested losses to offset any gains from selling winning positions in other overweight classes, and reinvest proceeds in underweight asset classes. This integrated approach can reduce or eliminate the tax cost of rebalancing that would otherwise discourage portfolio maintenance.