Wash Sales and Tax-Loss Harvesting: The Rules in Plain English

What the IRS wash sale rule covers, how a disallowed loss moves into the basis of new shares, the IRA exception, and the capital loss limits behind what people call tax-loss harvesting.

· Updated

A person seen from behind raking fallen autumn leaves into a tidy pile on a green lawn at golden hour.

Selling an investment for less than you paid creates a capital loss, and in a taxable account the tax rules let that loss offset gains and, within limits, other income. “Tax-loss harvesting” is the informal name for selling investments partly to realize those losses. The wash sale rule is the main limit on it: it stops a loss from counting if you buy the same, or substantially the same, investment back too soon.

This guide explains what the federal rules say. It doesn’t suggest whether realizing a loss makes sense for anyone, which depends on their whole tax picture and investment plan. State rules may differ and aren’t covered here.

What a capital loss is worth under the rules

A capital loss first offsets capital gains. If your losses for the year are bigger than your gains, the rules let you deduct up to $3,000 of the excess against other income, or $1,500 if married filing separately. Any loss above that carries forward to later years (IRS Topic 409, checked November 9, 2026). The Schedule D instructions (2025 edition, checked November 9, 2026) say you can deduct capital losses “up to the amount of your capital gains plus $3,000,” and include a worksheet that tracks short-term and long-term carryovers.

An invented example. A single filer has no capital gains and realizes an $8,000 net capital loss this year. Up to $3,000 is deducted against other income, and $5,000 carries forward. If the next year brings no gains, another $3,000 is deducted and $2,000 carries forward again.

Losses are classified as short-term or long-term by the same more-than-one-year holding period that applies to gains. How that interacts with the different tax rates on gains is covered in how capital gains are taxed.

The wash sale rule: the 61-day window

IRS Publication 550 says a wash sale occurs when you sell or trade stock or securities at a loss and, “within 30 days before or after the sale,” you:

(IRS Publication 550, 2025 edition, checked November 9, 2026.)

Thirty days before, the sale day, and thirty days after make a 61-day window. A purchase before the loss sale counts as much as one after it. The rule also applies if your spouse, or a corporation you control, buys substantially identical stock in the window. It covers losses, not gains: selling at a gain and buying back immediately isn’t a wash sale.

The rule is broader than outright purchases. Because a reinvested dividend buys new shares, an automatic dividend reinvestment in the window can count as an acquisition (see reinvested dividends). Publication 550 also applies the rule to losses from sales of contracts and options to buy or sell stock, and covers short sales.

The loss is postponed, not erased (usually)

When a wash sale happens, the loss isn’t deductible for that sale. Publication 550 tells you to “add the disallowed loss to the cost of the new stock or securities,” which becomes your basis in the new shares. That adjustment “postpones the loss deduction until the disposition of the new stock or securities.” Your holding period for the new shares also includes the holding period of the shares you sold.

An invented example. You bought shares for $2,000 and sold them for $1,600, a $400 loss. Two weeks later you bought the same shares again for $1,700.

Check the total: without the wash sale, you’d have had a $400 loss and then a $500 gain ($2,200 − $1,700), a net of $100. The rule gives the same $100 overall, but shifts the timing.

If you buy fewer shares than you sold, only part of the loss is disallowed. Publication 550’s example: sell 100 shares at a $1,000 loss after buying 75 substantially identical shares within the 30 days before the sale, and $750 of the loss is disallowed while $250 is allowed.

The IRA exception: where the loss can be lost

The IRA case works differently. Publication 550’s basis instruction applies “except in (4) above,” the fourth trigger being an acquisition of substantially identical stock for your IRA or Roth IRA. So when the replacement shares are bought in an IRA or Roth IRA, the disallowed loss is not added to their basis, and the postponement described above doesn’t happen. A tax professional can confirm how this applies when both a taxable account and an IRA hold the same investment.

What “substantially identical” means

The IRS doesn’t publish a complete list. Publication 550 says that, ordinarily, stocks or securities of one corporation aren’t substantially identical to those of another, while a corporation’s convertible preferred stock can be substantially identical to its common stock, depending on factors such as convertibility, voting rights and how closely their prices move together.

For funds, the publication gives no bright-line test. It doesn’t say, for example, whether two funds from different providers that track the same index are substantially identical, so the answer depends on the facts. Its general instruction is to consider all the facts and circumstances in the particular case. A tax professional can give a view on a specific pair of funds; this site doesn’t.

Two nearly identical lush potted herbs in matching aged terracotta pots sitting side by side on a windowsill.

What your broker reports, and what it doesn’t

Form 1099-B has a box for wash sales. Publication 550 says box 1g shows the amount of wash sale loss disallowed only if the shares are covered securities and the replacement shares have the same CUSIP number (the security’s identifying code) and were bought in the same account. The Form 1099-B instructions (2026 edition, checked November 9, 2026) describe box 1g as “wash sale loss disallowed.”

That leaves gaps a broker can’t see: purchases in a different account, at a different firm, in an IRA, or by a spouse, and purchases of a different but substantially identical security. Publication 550 is clear that even without a 1099-B entry, “you cannot deduct a loss from a wash sale.” Tracking those cases falls to the taxpayer.

On the return, a wash sale is reported on Form 8949 with code W in column (f) and the disallowed amount entered as a positive adjustment in column (g) (Form 8949 instructions, 2025 edition, checked November 9, 2026). The form instructions are the authority on how to report it. How the adjusted basis carries into future sales is covered in cost basis and Form 1099-B.

Where people get caught out

The rules above produce a handful of common surprises, all from the same sources:

Rebalancing a portfolio can involve selling some holdings at a loss, which is one place these rules come up; see rebalancing. The rules apply the same way whether or not tax was the reason for selling.

Common questions

How long do I have to wait to buy back after selling at a loss? The rule looks at purchases within 30 days before or after the sale. A purchase of substantially identical stock outside that 61-day window doesn’t trigger it.

Does the wash sale rule apply to gains? No. It applies to sales at a loss. A gain is taxable whether or not you buy back the same investment.

Is a wash-sale loss gone for good? Usually not. It’s added to the basis of the replacement shares and affects the gain or loss when those are sold. The exception is a replacement purchase in an IRA or Roth IRA, where the loss isn’t added to basis.

Does the rule apply across different brokerage accounts? Yes. The rule is about your purchases (and your spouse’s), not one account. Brokers generally report wash sales only within the same account and the same CUSIP.

How much capital loss can I deduct in a year? Losses offset all of your capital gains, plus up to $3,000 of other income ($1,500 if married filing separately). The rest carries forward.

Sources checked November 9, 2026: IRS Publication 550 (2025); IRS Topic 409, Capital gains and losses; Schedule D instructions (2025); Instructions for Form 1099-B (2026); Form 8949 instructions (2025).