Tax Loss Harvesting
Quick Definition
Tax loss harvesting is a tax strategy where you deliberately sell investments that have lost value to realize those losses, then use them to offset capital gains and up to $3,000 of ordinary income on your Form 1040 each year. The goal is to lower your tax bill without permanently changing your investment strategy.
What It Means
Every time you sell an investment for more than you paid, you owe capital gains tax on the profit. But when you sell an investment for less than you paid, you realize a capital loss. The IRS lets you use those losses to cancel out gains, dollar for dollar. If your losses exceed your gains in a given year, you can deduct up to $3,000 of the excess against ordinary income (wages, interest, dividends), and carry forward any remaining losses to future tax years indefinitely.
This creates a planning opportunity. In a normal year, your portfolio will have some winners and some losers. Instead of waiting for the losers to recover, you can sell them at a loss, use that loss to offset the gains from your winners, and immediately buy a similar (but not identical) investment to stay invested. You capture the tax benefit of the loss while keeping your money working in the market.
For 2026, the long-term capital gains rates are 0%, 15%, or 20% depending on your taxable income. A single filer with taxable income between $49,451 and $545,500 pays 15% on long-term gains. Harvesting $10,000 in long-term losses to offset $10,000 in long-term gains saves $1,500 in federal tax for someone in the 15% bracket. If you have no gains to offset, harvesting $3,000 in losses to deduct against ordinary income at a 24% bracket saves $720.
How It Works
Step 1: Identify Losing Positions
Review your taxable brokerage account for investments trading below their cost basis. Your cost basis is what you originally paid (including reinvested dividends). If you bought shares of an S&P 500 index fund at different times, some lots may be at a loss even if the overall position is profitable. Use specific share identification (specific ID) to sell only the lots that are underwater.
Step 2: Sell the Losing Investment
Sell the shares that have a loss. This realizes the loss for tax purposes. The loss is classified as short-term (held one year or less) or long-term (held more than one year), matching the holding period rules for gains.
Step 3: Offset Gains in the Right Order
The IRS requires you to match losses against gains in a specific sequence:
- Short-term losses against short-term gains first
- Long-term losses against long-term gains first
- Any remaining losses against gains of the other type (short-term losses can offset long-term gains, and vice versa)
- Up to $3,000 of remaining losses against ordinary income (wages, interest, dividends)
- Carry forward any unused losses to future tax years
Short-term losses offsetting short-term gains are the most valuable because short-term gains are taxed at ordinary income rates (up to 37%). Long-term losses offsetting long-term gains save at the capital gains rate (15% or 20% for most people).
Step 4: Avoid the Wash Sale Rule
The wash sale rule is the biggest trap in tax loss harvesting. If you sell an investment at a loss and buy the same or a "substantially identical" investment within 30 days before or after the sale, the IRS disallows the loss. The 30-day window applies in both directions: 30 days before the sale and 30 days after.
The wash sale rule applies to you and your spouse across all accounts, including IRAs. If you sell a stock at a loss in your brokerage account and your spouse buys the same stock in their IRA within 30 days, the loss is disallowed permanently (IRAs do not get a basis adjustment).
Step 5: Replace the Sold Investment
To maintain your portfolio allocation and stay invested, buy a similar but not substantially identical investment. Common replacement strategies include:
| Sold Investment | Replacement Option | Substantially Identical? |
|---|---|---|
| S&P 500 ETF (VOO) | Total Stock Market ETF (VTI) | No |
| S&P 500 ETF (VOO) | S&P 500 ETF (SPY) | Likely yes, same index |
| Total Stock Market (VTI) | Russell 3000 ETF (IWV) | No |
| Tech sector ETF (VGT) | Nasdaq 100 ETF (QQQ) | No, different composition |
| Individual stock (Apple) | Different individual stock | No |
| Individual stock (Apple) | Same stock (Apple) | Yes, wash sale |
The key is choosing a replacement that is correlated enough to serve the same role in your portfolio but different enough to avoid the wash sale rule. Swapping one S&P 500 ETF for another S&P 500 ETF is risky because the IRS could consider them substantially identical. Swapping an S&P 500 fund for a total stock market fund is generally safe because the indexes are different, even though their performance is highly correlated.
Step 6: Wait 31 Days Before Buying Back
If you want to buy back the original investment, wait at least 31 days after the sale to clear the wash sale window. Many investors harvest losses in December and buy back the original position in January.
Real-World Examples
Example 1: Offsetting a Large Capital Gain
In 2026, Sarah sold a rental property for a $40,000 long-term capital gain. She also has a taxable brokerage account with several mutual funds that are down for the year.
| Action | Amount | Tax Impact |
|---|---|---|
| Long-term capital gain (rental sale) | $40,000 gain | Owes 15% = $6,000 |
| Harvest long-term losses from funds | -$40,000 loss | Offsets entire gain |
| Net capital gain | $0 | Owes $0 |
| Tax savings | $6,000 |
Sarah sold losing mutual fund shares to generate $40,000 in long-term losses, completely eliminating the tax on her rental property sale. She bought similar but different funds to maintain her allocation.
Example 2: Deducting Against Ordinary Income
Michael has no capital gains in 2026 but has several stock positions in his brokerage account that are down. He is in the 24% tax bracket.
| Action | Amount | Tax Impact |
|---|---|---|
| Harvest losses from stocks | -$8,000 loss | |
| Offset against capital gains | $0 gains | |
| Deduct against ordinary income | -$3,000 | Saves 24% = $720 |
| Carry forward to 2027 | -$5,000 | Available next year |
| Total tax savings (2026) | $720 |
Michael saves $720 this year and carries $5,000 forward. If he has capital gains next year, he can use the carryforward to offset them. If not, he can deduct another $3,000 against ordinary income in 2027.
Example 3: The Wash Sale Trap
Robert sells 100 shares of Apple stock at a $5,000 loss on December 15. On December 20, he sees Apple drop further and buys 100 shares back, thinking he is getting a better price.
| Date | Action | Wash Sale? |
|---|---|---|
| Dec 15 | Sell Apple at $5,000 loss | |
| Dec 20 | Buy Apple shares back | Yes, within 30 days |
| Result | Loss disallowed | $0 deductible loss |
Robert's $5,000 loss is disallowed. The disallowed loss is added to the cost basis of the new shares, so he will benefit when he eventually sells those shares at a gain. But for 2026, he gets no tax benefit from the loss.
When Tax Loss Harvesting Makes Sense
Tax loss harvesting is most valuable in these situations:
- You have large capital gains to offset: If you sold a business, rental property, or large stock position at a gain, harvesting losses can eliminate or reduce the tax
- You are in a high tax bracket: The higher your bracket, the more each dollar of loss saves you. At 37%, a $3,000 ordinary income deduction saves $1,110
- You have a taxable brokerage account: Losses can only be harvested in taxable accounts, not in retirement accounts like 401(k)s or IRAs
- The market is down: Broad market declines create harvesting opportunities across many positions at once
- You plan to stay invested long-term: The strategy works best when you replace sold positions and remain in the market
When Tax Loss Harvesting Does Not Make Sense
- You only have retirement accounts: 401(k), IRA, and Roth IRA accounts do not generate deductible capital losses
- You are in the 0% capital gains bracket: If your taxable income is below $49,450 (single) or $98,900 (MFJ) in 2026, your long-term gains are taxed at 0%. Harvesting losses to offset gains that are already tax-free provides no benefit
- You have no gains and low ordinary income: The $3,000 ordinary income deduction is worth less at lower brackets. At 12%, it saves only $360
- The position is down temporarily and you expect a quick recovery: If you sell and the stock rebounds during the 31-day wash sale window, you miss the gains. Consider whether the tax benefit outweighs the opportunity cost
Key Points to Remember
- Capital losses offset capital gains dollar for dollar, with up to $3,000 of excess losses deductible against ordinary income each year
- Unused losses carry forward indefinitely to future tax years
- The wash sale rule disallows losses if you buy the same or substantially identical investment within 30 days before or after the sale
- The wash sale rule applies across all your accounts and your spouse's accounts, including IRAs
- Tax loss harvesting only works in taxable brokerage accounts, not in retirement accounts
- Short-term losses offsetting short-term gains are the most valuable because short-term gains are taxed at higher ordinary income rates
- If you are in the 0% long-term capital gains bracket for 2026 (taxable income below $49,450 single or $98,900 MFJ), harvesting losses to offset long-term gains provides no tax benefit
Common Mistakes to Avoid
- Triggering a wash sale: Buying back the same investment too quickly is the most common and costly mistake. The 30-day window is strict and applies in both directions. Use a replacement investment that is different enough to avoid the rule.
- Harvesting losses in an IRA: Losses inside a 401(k), traditional IRA, or Roth IRA are not deductible. Tax loss harvesting only applies to taxable brokerage accounts.
- Ignoring the holding period: Short-term losses are more valuable when offsetting short-term gains (taxed at up to 37%). If you have a choice about which lots to sell, consider the holding period.
- Selling at a loss when you are in the 0% capital gains bracket: If your taxable income is low enough that long-term gains are tax-free, harvesting losses to offset those gains wastes the loss. Save your losses for a year when you have taxable gains.
- Forgetting to track carryforward losses: If you harvest more than $3,000 in losses above your gains, the excess carries forward. Keep records of your carryforward amount so you can use it in future years. Tax software typically tracks this automatically.
- Overlooking transaction costs: If the tax savings from harvesting a small loss are less than the trading fees and bid-ask spread costs of selling and rebuying, the strategy loses money. Focus on larger positions where the savings clearly exceed costs.
Related Concepts
Tax loss harvesting interacts with several other tax and investing concepts. The losses you harvest offset capital gains taxed at the rates described in our capital gains tax guide. The strategy is reported on Form 1040 via Schedule D, and the $3,000 ordinary income deduction reduces your adjusted gross income. When replacing sold positions, you are effectively rebalancing your portfolio, which connects to diversification strategy. Many investors use ETFs as replacement investments because their low costs and tax efficiency make them ideal for swapping. To learn more about the mechanics, read our tax loss harvesting blog post and our guide on how to rebalance your portfolio. For estimating investment returns, try our investment return calculator.
Frequently Asked Questions
Q: Can I harvest tax losses in my 401(k) or IRA? A: No. Losses inside tax-advantaged retirement accounts (401(k), traditional IRA, Roth IRA) are not deductible. These accounts are tax-deferred or tax-free, so the IRS does not allow you to claim losses on investments held within them. Tax loss harvesting only works in taxable brokerage accounts.
Q: What counts as "substantially identical" for the wash sale rule? A: The IRS has not provided a precise definition, but the general rule is that investments tracking the same index are substantially identical. Two different S&P 500 ETFs (like VOO and SPY) are likely substantially identical. An S&P 500 ETF and a total stock market ETF are not, because they track different indexes. When in doubt, choose a replacement with a different underlying index or composition.
Q: How long do I have to wait before buying back the same investment? A: You must wait at least 31 days after the sale date to buy back the same investment without triggering a wash sale. The wash sale window is 30 days before the sale and 30 days after, so the total restricted period is 61 days. Buying on day 31 after the sale is safe.
Q: What happens to disallowed wash sale losses? A: The disallowed loss is not gone forever. It is added to the cost basis of the replacement shares. When you eventually sell those shares, the higher basis means a smaller gain or a larger loss. In taxable accounts, you eventually recover the benefit. In IRAs, however, the loss is permanently disallowed with no basis adjustment.
Q: Is there a limit on how much loss I can carry forward? A: No. There is no limit on the amount of capital losses you can carry forward to future tax years. If you harvest $50,000 in losses and have no gains, you deduct $3,000 per year against ordinary income and carry the remaining $47,000 forward. The carryforward continues until you use it all through offsetting gains or $3,000 annual ordinary income deductions.




