Tax-Loss Harvesting: How Selling at a Loss Cuts Taxes

Tax-loss harvesting turns a losing investment into a real tax break. Here’s how selling at a loss can trim what you owe the IRS and keep more of your money compounding for you.

Top view of tax documents, calculator, magnifying glass, and calendar on a black surface.

What Tax-Loss Harvesting Actually Means

Tax-loss harvesting is the practice of selling an investment that’s worth less than you paid for it, then using that realized loss to reduce your taxable income. The strategy only works inside a taxable brokerage account — not a 401(k), traditional IRA, or Roth IRA, because those accounts are already shielded from year-to-year capital-gains taxes.

The key word is realized. A paper loss — a stock that’s down but still sitting in your account — does nothing for your tax bill. The IRS only recognizes the loss when you actually sell. Harvesting is simply the deliberate act of turning an unrealized loss into a realized one at a moment when it can offset a gain or lower your income.

Because markets move constantly, most diversified portfolios hold at least a few positions that are underwater at any given time, even in years when the overall balance is up. Harvesting lets you extract tax value from those laggards while keeping your broader investment plan intact — you’re not betting against your portfolio, you’re being tax-efficient with the parts that happened to dip.

This is educational, general information rather than personal tax advice; your bracket, state, and mix of gains will shape whether any of it helps you.

How Losses Offset Gains and Ordinary Income

The mechanics follow a specific order. First, your capital losses cancel out capital gains of the same type: short-term losses (on assets held a year or less) offset short-term gains, and long-term losses offset long-term gains. Then any leftover loss of one type nets against the remaining gain of the other. Short-term gains are the ones taxed at your ordinary-income rate, so wiping those out is often the most valuable move.

If your losses exceed all your gains for the year, you can deduct up to $3,000 of the excess against ordinary income — wages, salary, interest — on your federal return ($1,500 if married filing separately). That deduction reduces income taxed at your regular rate, which can be more valuable than offsetting a long-term gain taxed at 0%, 15%, or 20%.

Any loss beyond that $3,000 cap doesn’t disappear. It carries forward to future years indefinitely, offsetting gains and up to $3,000 of income each year until it’s used up. A large loss during a downturn can quietly shelter gains for years afterward.

A simple example shows the flow: suppose you realized $5,000 in short-term gains and then harvest a $9,000 loss. The loss first erases all $5,000 of gains, then $3,000 of what’s left reduces your ordinary income this year, and the final $1,000 carries forward to next year.

The Wash-Sale Rule You Can’t Ignore

The single biggest trap is the wash-sale rule. 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 — a 61-day window total — the IRS disallows the loss for that year. The rule exists to stop people from claiming a deduction while effectively staying invested in the exact same position.

A disallowed loss isn’t necessarily gone forever; it gets added to the cost basis of the replacement shares, so you may recover the benefit later when you sell those. But that delays the tax break and complicates your recordkeeping. The cleaner approach is to avoid triggering the rule in the first place.

Critically, the wash-sale rule reaches across accounts, including your IRA. If you sell a fund at a loss in your taxable account and buy it back inside your IRA within the window, the loss is permanently disallowed — you don’t even get the basis adjustment. Automatic dividend reinvestment and 401(k) contributions can trip the rule too, so check what’s buying on autopilot.

Many harvesters sidestep the problem by swapping into a similar-but-not-identical investment — for example, selling one broad index fund and buying a different provider’s fund that tracks a comparable index. That keeps your market exposure roughly constant while locking in the loss. Whether two funds count as “substantially identical” isn’t always black-and-white, which is one reason it’s worth reviewing your specific trades with a tax professional.

When Harvesting Makes Sense — and When It Doesn’t

Harvesting delivers the most value when you have short-term gains to offset, when you’re in a higher tax bracket, or when a market pullback has left otherwise solid positions temporarily down. Volatile years — the ones that feel worst — are often when the most tax value is sitting on the table.

It matters less, or not at all, in a few situations. If all your investments sit in tax-advantaged accounts, there’s nothing to harvest. If you’re in the 0% long-term capital-gains bracket, offsetting long-term gains saves you nothing. And harvesting a loss only to reinvest resets your cost basis lower, which can mean a larger taxable gain down the road — you’re often deferring tax, not erasing it.

That deferral still has real worth: paying less tax now leaves more money invested and compounding, and you may realize the eventual gain in a lower-bracket year, such as retirement. But it’s worth being honest that harvesting is a timing and rate-arbitrage tool, not free money. Watch transaction costs and bid-ask spreads too; churning a portfolio to chase small losses can cost more than it saves.

Putting It to Work Without Wrecking Your Plan

Start by finding your cost basis for each taxable holding — your brokerage reports it, and choosing “specific lot” identification when you sell lets you target the exact shares with the biggest losses rather than an average. This precision can meaningfully increase the loss you harvest.

Time it thoughtfully. Many investors review positions late in the year to offset realized gains before the December 31 deadline, but harvesting during a mid-year dip can capture losses that vanish if the market rebounds by year-end. There’s no rule that says you can only do this in December.

Keep the tax tail from wagging the investment dog. The goal is a portfolio that still matches your risk tolerance and goals after every trade; the tax savings are a bonus layered on top of sound investing, not a reason to abandon a strategy. Document every harvest, note the 30-day windows, and hold the replacement position at least 31 days before switching back if you intend to.

Finally, because rules like the $3,000 cap, bracket thresholds, and wash-sale definitions can shift and interact with your state taxes, treat this as a framework rather than a checklist. A quick conversation with a qualified tax advisor about your own numbers is usually worth far more than any general guide, including this one.