Select Page

Written by Samuel, Certified Public Accountant

Affiliate Disclosure: This page may contain affiliate links. If you make a purchase or sign up through these links, we may earn a commission at no extra cost to you.

If you hold investments in a regular taxable brokerage account, selling your losers on purpose before December 31 can lower this year’s tax bill. This is tax-loss harvesting, and it works well as long as you understand the one rule that trips up almost everyone who tries it: the wash-sale rule.

What Tax-Loss Harvesting Actually Does

When you sell an investment for less than you paid, you realize a capital loss. That loss first offsets any capital gains you realized elsewhere in the same year, dollar for dollar. If your losses are bigger than your gains, up to $3,000 of the excess ($1,500 if married filing separately) can offset your ordinary income for the year. Anything left over after that does not disappear. It carries forward indefinitely to future tax years until it is used up.

The Wash-Sale Rule (IRC Section 1091)

The wash-sale rule disallows your loss if you buy the same security, or one the IRS considers “substantially identical,” within 30 days before or 30 days after the sale that generated the loss. That creates a 61-day window in total (30 days on each side, plus the day of sale) where a repurchase can wipe out the tax benefit. When that happens, the disallowed loss does not simply vanish. It gets added to the cost basis of the replacement shares, deferring the benefit rather than destroying it entirely.

The rule is easy to violate by accident because it applies across every account you and your spouse own, including retirement accounts. If you sell a stock at a loss in your taxable brokerage account and buy it back inside your IRA or Roth IRA during that same window, the loss is disallowed and, because IRAs do not track cost basis the same way, permanently lost rather than deferred.

How to Harvest Losses Without Breaking the Rule

Most investors handle this by swapping into something similar but not “substantially identical.” Selling a single stock at a loss and buying a sector ETF that tracks the same industry keeps your money invested and exposed to a similar market move without triggering the wash sale. If you genuinely want to buy back the exact same position, simply waiting 31 days after the sale before repurchasing clears the rule entirely.

How This Fits Into Your Broader Tax Picture

Tax-loss harvesting reduces your taxable income whether you end up taking the standard deduction or itemizing, since capital losses are calculated on Schedule D before that choice even comes into play. It also stacks cleanly with maxing out your 401(k) or IRA contributions for the year. One lowers taxable income through investment losses, the other through pre-tax retirement savings, and there is nothing stopping you from doing both in the same tax year.

Source: Fidelity, wash-sale rules guidance; Internal Revenue Code Section 1091.

Bottom Line

Tax-loss harvesting is one of the few tax strategies that turns a bad investment outcome into a real, current-year tax benefit. The wash-sale rule is the only real trap, and it is entirely avoidable once you know it covers all of your accounts, not just the one where you made the sale.