$LevyIO
InvestmentsMarch 7, 202615 min read

Tax-Loss Harvesting: How to Reduce Your Tax Bill with Investment Losses

Tax-loss harvesting is a strategy where you sell investments at a loss to offset capital gains taxes on winning investments. When done correctly, it can save you thousands of dollars annually while keeping your portfolio allocation on track. This guide covers the mechanics, wash sale rules, carry-forward strategies, and step-by-step implementation.

What Is Tax-Loss Harvesting?

Tax-loss harvesting is the practice of selling an investment that has declined in value below your purchase price (your cost basis) to realize a capital loss. This loss can then be used to offset capital gains from other investments you sold at a profit during the same tax year. If your total capital losses exceed your total capital gains, you can use up to $3,000 of the excess loss ($1,500 if married filing separately) to offset ordinary income.

The strategy is not about giving up on an investment permanently. After selling the losing position, you can reinvest in a similar but not "substantially identical" security to maintain your market exposure. The goal is to capture the tax benefit of the loss while staying invested in the same asset class or market sector.

Tax-loss harvesting is most valuable for investors in higher tax brackets, those with significant realized gains, and anyone who wants to rebalance their portfolio while generating a tax benefit. Use our Capital Gains Calculator to estimate how much you owe on your investment gains.

How Capital Gains and Losses Interact

Capital gains and losses follow a specific netting process prescribed by the IRS. Understanding this process is essential for effective tax-loss harvesting:

  1. Short-term gains and losses are netted against each other first. Short-term positions are those held for one year or less.
  2. Long-term gains and losses are netted against each other. Long-term positions are those held for more than one year.
  3. If one category has a net gain and the other a net loss, they offset each other. A net short-term loss can offset a net long-term gain and vice versa.
  4. Any remaining net loss (up to $3,000) offsets ordinary income. The rest carries forward to future years.

The distinction between short-term and long-term matters because they are taxed at different rates. Short-term gains are taxed as ordinary income (up to 37% federal), while long-term gains are taxed at preferential rates of 0%, 15%, or 20% depending on your tax bracket. Ideally, you want to use short-term losses to offset short-term gains first, preserving the lower rates on long-term gains. Learn more in our Capital Gains Tax Guide.

The Wash Sale Rule: What You Must Avoid

The wash sale rule is the most critical regulation governing tax-loss harvesting. Under IRS Section 1091, if you sell a security at a loss and purchase a "substantially identical" security within 30 days before or after the sale, the loss is disallowed for tax purposes. The 30-day window runs in both directions, creating a 61-day total window (30 days before, the day of sale, and 30 days after).

What counts as "substantially identical":

  • Buying the same stock or security you just sold
  • Buying an option or contract to acquire the same security
  • Buying the same security in your IRA, spouse's account, or a company you control
  • Buying a mutual fund or ETF that is substantially identical to the one sold (same index, same manager, nearly identical holdings)

What is generally NOT considered substantially identical:

  • Buying a different company's stock in the same industry (selling Ford, buying GM)
  • Buying an ETF that tracks a different index (selling an S&P 500 ETF, buying a total market ETF)
  • Buying a different fund manager's version of a similar strategy with meaningfully different holdings

If a wash sale is triggered, the disallowed loss is not lost permanently. It is added to the cost basis of the replacement security, which means you will recognize the loss when you eventually sell the replacement. However, the tax benefit is deferred rather than realized immediately, which defeats the purpose of harvesting.

Capital Loss Carry-Forward: Unlimited and Indefinite

One of the most powerful features of capital losses is that any amount exceeding the current year's offset limit carries forward to future tax years. There is no expiration on carried-forward capital losses, and there is no limit on the total amount you can carry forward.

Example: Capital Loss Carry-Forward

Year 1: You realize $50,000 in capital losses and $10,000 in capital gains

Net loss: $40,000. Offset $3,000 against ordinary income. Carry forward: $37,000

Year 2: You realize $20,000 in capital gains and no losses

Apply $20,000 of carried-forward loss. Offset $3,000 against ordinary income. Remaining carry-forward: $14,000

Year 3: You realize $5,000 in gains

Apply $5,000 of carried-forward loss. Offset $3,000 against ordinary income. Remaining carry-forward: $6,000

This carry-forward mechanism means that even if you harvest more losses than you can use in a single year, nothing is wasted. Large market downturns can create significant loss carry-forwards that provide tax benefits for years to come.

Step-by-Step Tax-Loss Harvesting Strategy

Follow this process to implement tax-loss harvesting effectively in your portfolio:

Step 1: Review your taxable account holdings. Identify positions that are currently below your cost basis. Only holdings in taxable brokerage accounts qualify; losses in IRAs, 401(k)s, or other tax-advantaged accounts cannot be harvested. Most brokerage platforms show unrealized gains and losses for each position.

Step 2: Estimate your capital gains for the year. Add up any gains from securities you have already sold this year, plus capital gains distributions from mutual funds (typically distributed in December). This gives you the target amount of losses you need to harvest. Use our Income Tax Calculator to see how gains affect your overall tax liability.

Step 3: Sell the losing positions. Execute the sales to realize the losses. Be aware of any settlement periods (T+1 for stocks). The trade date, not the settlement date, determines the tax year.

Step 4: Immediately reinvest in a non-identical replacement. To maintain your portfolio allocation, buy a similar but not substantially identical investment. For example, if you sold the Vanguard S&P 500 ETF (VOO), you could buy the iShares Core S&P 500 ETF (IVV) or switch to a total stock market fund. After 31 days, you can switch back to your original holding if desired.

Step 5: Document everything. Keep records of the sale date, loss amount, replacement purchase, and the 31-day waiting period. Your broker's Form 1099-B will report the sales, but tracking the wash sale window is your responsibility across all accounts.

Tax-Loss Harvesting with Cryptocurrency

Cryptocurrency has historically offered a unique advantage for tax-loss harvesting because the IRS previously did not apply the wash sale rule to crypto (classified as property, not securities). However, starting in 2025, the wash sale rule applies to digital assets under updated IRS guidance, aligning crypto with stocks and other securities.

This means you can no longer sell Bitcoin at a loss and immediately repurchase it to harvest the loss. You must wait 31 days or buy a different cryptocurrency that is not substantially identical. The volatile nature of crypto markets makes the 31-day waiting period particularly risky, as prices can move significantly during that window. Learn more about crypto tax requirements in our Crypto Tax Reporting Guide.

Advanced Strategies for Maximum Benefit

Harvest throughout the year, not just in December. Many investors wait until year-end to harvest losses, but market dips occur throughout the year. By monitoring your portfolio regularly, you can capture losses whenever they appear. A stock that is down 15% in March may recover by December, meaning the harvesting opportunity would be missed.

Pair harvesting with rebalancing. When your portfolio drifts from your target allocation, you can harvest losses from overweight positions while buying replacement securities in underweight areas. This accomplishes two goals at once: realizing tax losses and bringing your portfolio back to target weights.

Consider the tax rate differential. It is most valuable to use short-term losses against short-term gains (taxed up to 37%) rather than long-term gains (taxed at 15-20%). If you have both short-term and long-term losses available, prioritize harvesting short-term losses when you have short-term gains to offset.

Coordinate across all accounts. The wash sale rule applies across all your accounts, including your spouse's accounts and IRAs. If you sell a stock at a loss in your brokerage account and your IRA buys the same stock within 30 days, the loss is disallowed, and unlike a taxable wash sale, the cost basis adjustment is lost forever in the IRA.

How Much Can Tax-Loss Harvesting Save?

The savings depend on your tax bracket, the amount of gains you offset, and whether the losses offset short-term or long-term gains. Here are examples at different income levels:

Scenario: $20,000 in harvested losses offsetting $20,000 in short-term gains

22% bracket: Saves $4,400 in federal tax

24% bracket: Saves $4,800 in federal tax

32% bracket: Saves $6,400 in federal tax

37% bracket: Saves $7,400 in federal tax

Plus state income tax savings if applicable

Even the $3,000 annual ordinary income offset provides meaningful savings. In the 32% bracket, that is $960 per year in federal savings alone. Over a 20-year investing career, harvested losses that generate $3,000 per year in ordinary income offsets save over $19,000 in federal taxes. Use our Tax Refund Estimator to see how harvested losses affect your overall tax position.

Common Mistakes to Avoid

Triggering wash sales in your IRA. If you sell a stock at a loss in your taxable account and buy it in your IRA within 30 days, the loss is permanently disallowed. The cost basis adjustment cannot be applied in an IRA, so the tax benefit is lost entirely.

Ignoring automatic reinvestment. If you have dividend reinvestment enabled, a dividend payment within the 30-day window could trigger a wash sale. Turn off automatic reinvestment for positions you plan to harvest.

Harvesting losses on positions you plan to hold long-term. If you sell and repurchase the same stock (after waiting 31 days), your holding period resets. A position that was about to qualify for long-term capital gains treatment now starts over as short-term. This could result in paying higher rates when you eventually sell.

Letting the tax tail wag the investment dog. Do not sell winning positions or avoid good investments solely for tax reasons. Tax-loss harvesting should complement your investment strategy, not drive it. The goal is to capture losses that already exist, not to create them. Review your overall deduction strategy to maximize total savings.

Frequently Asked Questions

Can I harvest losses in my 401(k) or IRA?

No. Tax-loss harvesting only works in taxable brokerage accounts. Gains and losses within tax-advantaged accounts like 401(k)s, IRAs, and HSAs are not recognized for tax purposes until distribution. Selling at a loss inside these accounts has no tax benefit.

Is there a limit to how much I can harvest in losses?

There is no limit on the amount of capital losses you can realize through harvesting. However, only $3,000 per year ($1,500 if married filing separately) of net capital losses can be deducted against ordinary income. Losses exceeding your gains plus the $3,000 carry forward indefinitely to future years with no expiration.

Does tax-loss harvesting work with mutual funds?

Yes, but mutual funds present additional considerations. You must avoid buying a substantially identical fund within the 30-day window. Switching from one S&P 500 index fund to another provider's S&P 500 fund may still trigger a wash sale if the holdings are nearly identical. Switching to a total market or different index fund is safer.

Calculate Your Capital Gains Tax

See how much you owe on investment gains and how harvested losses could reduce your tax bill.

Use the Capital Gains Calculator

Related Articles