The wash sale rule blocks you from claiming a tax loss on a security if you buy a substantially identical one within 30 days before or after you sold it. It exists because the IRS got tired of investors selling losers on December 30th and buying them right back on January 2nd just to harvest a deduction. Break this rule and your loss doesn't disappear. It gets disallowed for now and pushed into your cost basis, which means you pay for it later whether you like it or not.
Most investors learn about the wash sale rule the hard way, usually from a 1099-B with a box checked that they didn't expect. The mechanics are simple once you see them laid out. The traps are in the details nobody reads until it's too late.
You trigger a wash sale when you sell a stock, ETF, mutual fund, or bond at a loss and buy the same security, or one the IRS considers substantially identical, within the wash sale window. This applies across every account you control. It doesn't matter if you sold in your brokerage account and bought in your Roth IRA, or if your spouse bought the shares in their own account. The IRS looks at the household, not the account number.
Options count too. Selling stock at a loss and buying a call option on the same stock triggers the rule. Selling a put and having it assigned counts as a purchase. People assume options live in a separate universe from stock for tax purposes. They don't, not here.
The rule only applies to losses. If you sell at a gain and buy back the same stock the next day, nothing happens. There's no rule against realizing gains fast. The IRS only cares when you're trying to manufacture a deduction while keeping your position intact.
Here's where most people get the math wrong. The wash sale window isn't 30 days. It's 30 days before the sale, the day of the sale itself, and 30 days after. That's 61 days total, and it runs in both directions.
This matters because investors who tax-loss harvest often think only about what they buy after selling. But if you bought more shares of a stock in the three weeks before you sold your losing lot, that earlier purchase can trigger the wash sale rule on the sale you make today. You don't need to buy back in after the fact. The buy can come first and still poison the loss.
Dividend reinvestment plans make this worse. If you have DRIP turned on and your stock pays a dividend during the window, that automatic reinvestment counts as a purchase. You can trigger a wash sale on a stock you never manually traded, just because your dividend got reinvested at the wrong moment. Turn off DRIP before you plan to harvest a loss. This one detail catches more people than any other part of the rule.
The IRS never defined "substantially identical" with a clean list. That's not an oversight. It's a design choice meant to stop people from engineering around a bright-line test.
Buying back the same stock is obviously identical. Buying a different share class of the same company (say, Class A versus Class C shares of the same corporation) is generally treated as identical too. Convertible bonds and warrants on the same underlying stock can count as substantially identical to the stock itself, depending on the terms.
ETFs are the gray zone everyone asks about. Selling SPY and buying VOO, two different funds from different issuers that both track the S&P 500, is widely treated by practitioners as not a wash sale, because they're legally distinct securities from different sponsors. But selling one S&P 500 fund and buying another S&P 500 fund from the exact same provider, or swapping between two funds that track literally the same index with near-identical holdings, sits closer to the line. The IRS hasn't issued a clean ruling on ETF-to-ETF swaps, and that ambiguity is exactly why most advisors tell clients to swap into a different index entirely (large-cap to total-market, for example) rather than trying to find a twin fund and hope it survives audit.
A disallowed wash sale loss doesn't vanish. It gets added to the cost basis of the replacement shares you bought, and the holding period of the old shares tacks onto the new ones. You're not losing the deduction forever. You're losing it now and getting it back later, usually when you finally sell the replacement shares for good.
| Step | Detail |
|---|---|
| You buy 100 shares | Cost basis: $10,000 ($100/share) |
| You sell 100 shares at a loss | Sale price: $7,000. Loss: $3,000 |
| You buy 100 shares back within 30 days | New purchase price: $7,200 |
| Wash sale rule applies | $3,000 loss disallowed this year |
| New cost basis on replacement shares | $7,200 + $3,000 = $10,200 |
Notice what happened. The loss didn't disappear, it moved into the new basis. When you eventually sell those replacement shares for good, you'll have a bigger cushion against gains, or a bigger loss if the stock keeps falling. The tax benefit is deferred, not destroyed, as long as you eventually sell outside any future wash sale window.
Here's the version that actually costs people money permanently. If you sell a stock at a loss in a taxable account and buy the same stock in your IRA within the wash sale window, the loss is disallowed exactly the same way. But IRAs don't track cost basis for this purpose the way taxable accounts do. Revenue Ruling 2008-5 made clear that the disallowed loss doesn't get added to the basis of the IRA shares. It just disappears for good.
This is the version of the wash sale rule that should scare people more than it does. A wash sale in two taxable accounts is a timing problem. A wash sale between a taxable account and an IRA is a permanent loss of the deduction, with no future basis bump to recover it. If you're rebalancing across both account types near year end, check what you're buying in the IRA before you sell anything at a loss in the brokerage account.
The cleanest fix is patience. Wait 31 days after selling before buying the same security back. This guarantees you're outside the window and removes any ambiguity about substantially identical securities, because you're just buying the same thing again after the rule no longer applies.
If you don't want to sit in cash for a month, swap into something similar but legally distinct. Sell a large-cap growth fund, buy a total-market fund. Sell one bank stock, buy a regional bank ETF. You keep market exposure in the same general sector without touching the exact security or anything close enough to invite scrutiny.
Most brokerages flag wash sales automatically within a single account and adjust your 1099-B, but they can't see across accounts or across households. If you and your spouse both trade, or if you hold accounts at more than one broker, you're on your own to track this. Keep a simple log of any loss sale and check it against purchases 30 days on either side, in every account you or your spouse control.
As of now, no. The wash sale rule under current law applies to securities, and the IRS classifies cryptocurrency as property, not a security. That means you can sell crypto at a loss and buy it right back the same day without triggering a wash sale, though lawmakers have proposed closing this gap more than once. Check current guidance before relying on this, since the rule could change with new legislation.
The wash sale rule itself is about disallowing a tax deduction, and most 401(k) trades don't generate a reportable loss in the first place because the account is already tax-deferred. However, a wash sale can still be triggered if you sell a stock at a loss in a taxable account and buy the same stock inside your 401(k) within the window, and in that case the loss is disallowed with no basis adjustment, similar to the IRA rule.
No. The wash sale rule applies to you as a taxpayer, not to a specific brokerage account. Buying the same or substantially identical security through a different firm within the 61-day window still triggers the rule. Brokers can't see your outside accounts, so the disallowance often has to be tracked and reported by you, not automatically caught on your 1099-B.
Nothing punitive happens beyond the loss being disallowed for that tax year. Your broker will typically adjust the reported loss on your 1099-B if the trade happened within one account, and the disallowed amount gets added to the cost basis of your replacement shares. You simply claim less loss this year and get a larger basis, and therefore a smaller future gain or larger future loss, when you eventually sell the replacement shares.
No. The wash sale rule only restricts losses. If you sell a security at a profit and buy it back immediately, there's no wash sale issue at all, since the rule exists specifically to stop investors from manufacturing tax deductions while keeping their position. You can trade in and out of winning positions as often as you like without any wash sale consequence.