Tax-Loss Harvesting: How to Reduce Your Tax Bill by Selling Losing Investments

Every investor has losing trades. Tax-loss harvesting turns those losses into a tax deduction — potentially saving you thousands of dollars every year.

Tax-loss harvesting is the practice of selling investments that have declined in value to realize a capital loss, which you can then use to offset capital gains from other investments. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income each year and carry forward any remaining losses to future years. It is one of the few strategies in investing that lets you turn a bad situation — a losing trade — into a tangible financial benefit.

How Tax-Loss Harvesting Works

1
Identify Losses

Find positions in your portfolio trading below your purchase price

2
Sell Losing Positions

Realize the capital loss by selling before year-end

3
Offset Gains

Use the realized loss to offset capital gains from other sales

4
Deduct Remaining Loss

Apply up to $3,000 of excess loss against ordinary income

5
Reinvest Proceeds

Buy a similar (not substantially identical) investment to stay in market

How Tax-Loss Harvesting Works

The mechanics are straightforward. When you sell an investment for less than you paid for it, you realize a capital loss. This loss can offset capital gains from other investments you sold at a profit. If you have more losses than gains, you can apply up to $3,000 of the remaining loss against your regular income, reducing your overall tax bill. Any losses beyond $3,000 carry forward to future tax years indefinitely.

Real-world example: You bought 100 shares of Apple at $180/share ($18,000 total) and sell them at $150/share ($15,000) for a $3,000 loss. You also sold Amazon stock this year for a $5,000 gain. Your net capital gain is $2,000 instead of $5,000. At a 20% capital gains rate, you save $600 in taxes. Without tax-loss harvesting, you would pay $1,000 in capital gains tax. With it, you pay only $400 — a 40% reduction in your tax bill from a single trade.

You can then reinvest the proceeds from the Apple sale into a similar (but not substantially identical) investment — such as selling Apple and buying Microsoft or an S&P 500 ETF — maintaining your market exposure while capturing the tax benefit. This is what makes tax-loss harvesting so powerful: you get the tax deduction without having to leave the market.

The Wash-Sale Rule

The wash-sale rule is the most important restriction to understand. If you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed for tax purposes. The 30-day window spans both directions: if you bought more shares of Apple on December 15 and sold your original position at a loss on January 5, the loss is still disallowed because you bought a substantially identical security within 30 days of the sale.

"Substantially identical" is not precisely defined by the IRS, but it generally means the same security or a derivative of it. Selling Apple stock and buying Apple call options would likely trigger the wash-sale rule. Selling one S&P 500 ETF (VOO) and buying a different S&P 500 ETF (IVV) is less clear and is a gray area most tax professionals consider acceptable, though not guaranteed. Selling a stock and buying a different stock in the same industry is fine — selling Apple and buying Microsoft is clearly not a wash sale.

To avoid wash-sale violations, wait at least 31 days before buying back the same security, or immediately buy a different but similar security that is not substantially identical. Most automated tax-loss harvesting services handle this for you, but if you are doing it manually, tracking the 30-day window is your responsibility.

Wash Sale Rule Warning

  • If you buy the same or substantially identical security within 30 days before or after a loss sale, the loss is disallowed
  • The 61-day restricted period spans 30 days before the sale, the sale day, and 30 days after
  • Applies across all accounts you control, including IRAs and 401(k)s
  • Disallowed loss is added to the cost basis of replacement shares (deferred, not lost)
  • Crypto is exempt from wash sale rules as of 2026 — harvest freely

When to Harvest Losses

The most popular time for tax-loss harvesting is December. By late in the year, most investors have a clear picture of their realized gains and losses, making it easy to identify which losing positions to sell. December harvesting is so common that it contributes to the "December effect" where beaten-down stocks often decline further as investors sell for tax purposes.

However, you do not have to wait until December. Tax-loss harvesting can be done at any time of year. The optimal approach is to check your portfolio quarterly for meaningful losses — positions down more than 10-15% from your purchase price — and evaluate whether harvesting makes sense. The earlier you harvest a loss, the sooner you can use it to offset gains that may occur later in the year.

Consider transaction costs and spreads when deciding whether to harvest. If the commission and spread on selling and buying replacement positions eat up most of the tax benefit, it may not be worth it. With most brokers now offering commission-free trading, this is less of a concern, but it is still relevant for thinly traded securities with wide spreads.

Where Tax-Loss Harvesting Works Best

Tax-loss harvesting only works in taxable brokerage accounts. In tax-advantaged accounts like IRAs, 401(k)s, and Roth IRAs, capital gains and losses have no tax impact — you are not taxed on trades inside those accounts, so there is nothing to offset. In fact, harvesting losses in a taxable account and then buying in an IRA within 30 days can still trigger the wash-sale rule, because the wash-sale rule applies across all accounts you control, including retirement accounts.

The strategy is most valuable for investors with large taxable portfolios who regularly realize capital gains. If you trade frequently or rebalance your portfolio, you will naturally generate gains that can be offset by harvested losses. For buy-and-hold investors who rarely sell, the benefit is smaller because there are fewer gains to offset, though you can still harvest losses against the $3,000 ordinary income deduction each year.

Tax-loss harvesting becomes more valuable as your tax bracket increases. At a 20% long-term capital gains rate plus the 3.8% Net Investment Income Tax, the maximum benefit is 23.8% of the harvested loss. High-income investors in the top bracket benefit most, but even investors in lower brackets save meaningful money.

Is tax-loss harvesting worth it for small portfolios?

Yes, but the benefit scales with portfolio size. For a $10,000 portfolio, the annual tax savings might be $50-100 — not life-changing, but still worth the few minutes it takes to identify and execute the trades. For portfolios over $100,000, the savings can reach thousands of dollars per year. Many brokers now offer automated tax-loss harvesting as a free feature, making it worthwhile at any portfolio size. The key is that it costs nothing except a few minutes of your time, so even small savings are pure upside.

What happens if I have more losses than gains?

If your total realized capital losses exceed your realized capital gains, you can deduct up to $3,000 of the excess against your ordinary income ($1,500 if married filing separately). This deduction directly reduces your taxable income at your marginal tax rate. If you are in the 24% bracket, a $3,000 deduction saves you $720. Any losses beyond $3,000 carry forward to future tax years indefinitely, where they will offset future gains or provide another $3,000 ordinary income deduction. There is no expiration on capital loss carryforwards, making them a valuable tax asset you can use year after year.

Can I do tax-loss harvesting with crypto?

Yes. The IRS treats cryptocurrency as property for tax purposes, meaning capital gains and losses rules apply the same way they do to stocks. Selling Bitcoin, Ethereum, or any other crypto at a loss generates a capital loss that can offset gains from other crypto trades or stock trades. The wash-sale rule is a critical point of difference: as of 2026, the wash-sale rule does not apply to cryptocurrency, meaning you can sell crypto at a loss and immediately buy it back without the loss being disallowed. This makes crypto particularly attractive for tax-loss harvesting. However, this may change in future legislation, so consult a tax professional for the current rules. Learn about crypto risks and scams to watch for →

What is the wash-sale rule?

The wash-sale rule prevents you from claiming a tax loss on a security if you buy the same or a substantially identical security within 30 days before or after the sale. If triggered, the disallowed loss is added to the cost basis of the replacement shares, deferring the tax benefit rather than eliminating it entirely. The rule exists to prevent investors from selling purely for tax purposes while maintaining their exact same position. The 30-day window applies to both purchases before the sale and repurchases after the sale, so you must avoid the security entirely for 61 days (30 days before, the sale day, and 30 days after) to safely claim the loss.

Related Resources