HomeHelpful Guides › Wash Sale Rule
Investments

The Wash Sale Rule: What Investors Need to Know

You sell a stock at a loss to offset your gains. Smart move. Then you buy it back two weeks later because you still like the company. The IRS says: not so fast. The wash sale rule exists specifically to prevent investors from claiming artificial losses while maintaining the same economic position. Get it wrong and your tax deduction disappears — though the money isn’t lost forever. Here’s how the rule actually works.

The 61-Day Window

Most people call it the “30-day rule,”. But that’s only half the story. The wash sale rule covers a 61-day window: 30 days before the sale, the day of the sale, and 30 days after. If you buy a “substantially identical”. Security at any point during that window, your loss gets disallowed. This rule is codified in IRC Section 1091.

Think of it this way. For Wash Sale Rule Explained, you sell 100 shares of Apple at a $5,000 loss on March 15. If you bought Apple shares anytime between February 13 and April 14, you’ve triggered a wash sale. The $5,000 loss doesn’t disappear permanently — it gets added to the cost basis of the replacement shares — but you can’t claim it on this year’s return.

The 30-day-before rule catches a lot of people off guard. You might buy shares on March 1, then sell your older lot at a loss on March 20 thinking you’re harvesting a tax loss. Wrong. That March 1 purchase is a replacement within the window, and your loss is disallowed.

What “Substantially Identical” Means

The IRS has never published a precise definition of “substantially identical,”. Which is both frustrating and intentional. Here’s what we know from court rulings and IRS guidance, including IRS Publication 550:

  • Same stock = always substantially identical. Selling and rebuying the same company’s shares is the textbook wash sale.
  • Options on the same stock count. Selling shares at a loss and buying call options on the same stock within 30 days triggers the rule.
  • Preferred vs. common stock of the same company can be substantially identical depending on terms, but usually isn’t.
  • Mutual funds tracking different indexes are generally not substantially identical. Selling an S&P 500 index fund and buying a total stock market fund is typically safe, even though they overlap significantly.
  • ETFs vs. mutual funds tracking the same index is a gray area. Selling Vanguard’s S&P 500 ETF (VOO) and buying their S&P 500 mutual fund (VFIAX) might be considered substantially identical since they hold the exact same portfolio. The IRS hasn’t ruled definitively, but we’d advise caution.

The safest approach: if you’re harvesting losses, switch to a different index or asset class for at least 31 days. Sell the S&P 500 fund, buy a total market or a large-cap value fund. Different enough to be safe, similar enough to maintain your market exposure.

How Disallowed Losses Add to Cost Basis

Here’s the part people miss: a wash sale doesn’t destroy your loss. It defers it. The disallowed loss gets added to the cost basis of the replacement shares, which means you’ll recognize a larger loss (or smaller gain) when you eventually sell those replacement shares. The IRS explains this adjustment in Publication 550, Chapter 4.

Example: you bought Stock A for $10,000. You sell it for $7,000, taking a $3,000 loss. Within 30 days, you buy Stock A again for $7,500. Wash sale triggered — the $3,000 loss is disallowed. But your new cost basis isn’t $7,500. It’s $7,500 + $3,000 = $10,500. When you eventually sell those replacement shares, your basis is $10,500, so you’ll pay less tax (or take a bigger loss) at that point.

Your holding period also carries over. If you held the original shares for 11 months before the wash sale, and you hold the replacement shares for 2 more months, the total holding period is 13 months — qualifying as long-term capital gains. That’s a nice benefit, since long-term rates are lower than short-term.

The IRA Trap

This is the nastiest wash sale scenario, and a lot of investors don’t know about it. If you sell a stock at a loss in your taxable brokerage account and then buy substantially identical shares in your IRA within 30 days, the wash sale rule still applies. Your loss is disallowed. The IRS addressed this in Revenue Ruling 2008-5.

But here’s the brutal part: because the replacement shares are in an IRA, you can’t add the disallowed loss to the IRA shares’. Cost basis. IRAs don’t track cost basis the same way — distributions are taxed as ordinary income regardless. So the loss is effectively gone. Permanently. Not deferred, not recoverable. Just gone.

This applies to traditional IRAs, Roth IRAs, and even your spouse’s IRA. The IRS looks at all accounts you and your spouse control. We’ve seen clients lose five-figure deductions this way. It’s one of the most expensive mistakes in individual tax planning.

Cryptocurrency and the Wash Sale Rule

For years, crypto was exempt from the wash sale rule because the IRS classified digital assets as property, not securities. You could sell Bitcoin at a loss and buy it back a minute later, claiming the full loss. That loophole was widely used for tax-loss harvesting.

the field has shifted. The Infrastructure Investment and Jobs Act and subsequent IRS guidance have been tightening rules around digital assets. As of 2025, crypto brokers are required to report transactions on Form 1099-DA, and proposed regulations would extend wash sale treatment to digital assets. For 2026, check current IRS guidance before assuming crypto is still exempt — the rules are actively changing.

Our take: even if the wash sale rule doesn’t technically apply to crypto yet in your tax year, don’t build a strategy around a loophole that’s clearly closing. The IRS has been consistent in its direction here. For more on reporting, see our cryptocurrency tax reporting guide.

Tax-Loss Harvesting Without Triggering Wash Sales

Tax-loss harvesting — selling losing positions to offset gains — is a legitimate and effective strategy. The wash sale rule doesn’t prevent it. You just have to be thoughtful about execution.

  • Wait 31 days. The simplest approach. Sell the losing position, park the cash (or invest in something clearly different) for 31 days, then buy back if you want.
  • Switch to a similar but not identical fund. Sell your S&P 500 ETF at a loss and buy a Russell 1000 ETF. Both give you large-cap U.S. equity exposure, but they track different indexes. Not substantially identical.
  • Sell individual stocks, buy the sector ETF. Sell your Apple shares at a loss and buy a technology sector ETF. You still have tech exposure, but you’ve diversified away from a single company. The IRS wouldn’t consider a broad tech ETF substantially identical to Apple stock.
  • Harvest losses in December carefully. Year-end harvesting is popular, but remember the 30-day-after window extends into January. If you sell on December 20 at a loss, you can’t repurchase until January 20 of the following year.

For a deeper walkthrough, see our tax-loss harvesting guide. And remember that harvested losses can offset up to $3,000 of ordinary income per year (per IRC Section 1211), with any excess carrying forward indefinitely under IRC Section 1212.

Automatic Dividend Reinvestment Problems

Here’s a trap that’s easy to fall into. You sell a stock at a loss, but you’ve got dividend reinvestment (DRIP) turned on. The stock pays a dividend three weeks later, and your broker automatically buys more shares. Wash sale. Your loss is partially or fully disallowed because the DRIP purchase counts as buying substantially identical securities within the 30-day window.

If you’re planning to harvest a loss, turn off DRIP for that position before you sell. Or at minimum, be aware that the reinvested dividend shares could trigger a wash sale on the portion of shares that match.

Common Mistakes

  • Buying before selling. Purchasing additional shares and then selling the old lot at a loss within 30 days. The new purchase is a replacement, and the loss is disallowed.
  • Ignoring spousal accounts. Your spouse buying the same stock you just sold at a loss triggers the wash sale rule. The IRS treats you as one unit for this purpose.
  • Forgetting about the IRA. As discussed above, buying replacement shares in an IRA permanently kills the loss.
  • Trading the same stock frequently. Day traders and active traders often trigger wash sales repeatedly on the same security, creating a bookkeeping nightmare and potentially disallowing losses across multiple transactions.
  • Not adjusting cost basis. If you do trigger a wash sale, make sure the disallowed loss gets added to your replacement shares’. Basis. Your broker should handle this on your 1099-B, but verify — errors happen.

How Brokers Report Wash Sales

Your broker reports wash sales on Form 1099-B using code “W”. In Box 1f. They’ll show the disallowed loss amount in Box 1g. However, brokers can only track wash sales within the same account at the same brokerage. Cross-account and cross-broker wash sales are your responsibility to track and report.

If you have accounts at Fidelity and Schwab, and you sell Apple at a loss at Fidelity then buy Apple at Schwab within 30 days, neither broker will flag it. You need to catch it yourself (or your CPA needs to catch it). Failing to report a wash sale that the IRS can see through matching 1099s is a good way to get a notice. You’ll report wash sale adjustments on Schedule D and Form 8949.

Frequently Asked Questions

Where can I find the wash sale rule explained in simple terms?

The wash sale rule is a tax rule that stops you from claiming a loss on a security when you move back into the same position too quickly. In plain terms, if you sell a stock or other security at a loss and you acquire a substantially identical security within 30 days before or after that sale, the loss is disallowed for the current year. Count 30 days on each side of the sale, add the sale day itself, and you get a 61-day window in which a repurchase can trip the rule. The loss does not disappear. It is deferred, and it moves into the cost basis of the shares that caused the problem. The rule was written to stop taxpayers from selling only to book a paper loss while holding the same economic position the whole time. It reaches more than a simple repurchase, because buying a call option on the same stock, or entering a contract to acquire it, can also start the clock, since each one restores the exposure you just sold. This guide keeps the wash sale rule explained in plain English, with the tax mechanics kept separate from any investment decision. The Publication 550 discussion of investment income and expenses is the primary IRS source for the rule, and the underlying sale is reported on Schedule D and Form 8949.

Here is a worked example. You bought 100 shares for 10,000 dollars and later sold them for 7,000 dollars, a loss of 3,000 dollars. Fifteen days after the sale you buy 100 shares of the same stock for 6,800 dollars. Because the repurchase fell inside the 61-day window, the 3,000 dollars loss is disallowed for this year. The loss is not gone for good. It attaches to the replacement shares, so their basis becomes 6,800 plus 3,000, which is 9,800 dollars, and you recover the benefit when you finally sell those shares in a later trade that is not itself a wash sale. If you replace only part of the position, only the matching portion is a wash sale, and the loss on the shares you did not replace stays fully deductible. Selling 100 shares at a loss and buying back only 40 within the window disallows the loss on those 40 shares and leaves the other 60 alone. The Reed Corporation is a CPA and tax firm. We describe how the rule affects your tax return and coordinate with your own licensed investment advisor. We do not tell you which securities to buy or sell, and nothing on this page is investment advice.

The common mistake is believing that a disallowed loss is lost for good, when it is only delayed until you exit the replacement position cleanly. Another slip is watching only the 30 days after a sale and forgetting the 30 days before it, which count exactly the same. A quieter trap is a dividend reinvestment that buys a few more shares inside the window and creates a partial wash sale you never intended. Because the tax result can differ from what a brokerage statement shows on its face, careful preparation matters, and our individual tax return preparation checks the trade history behind each reported loss. One reassuring point is that the rule applies only to losses and never to gains, so a sale at a profit followed by an immediate repurchase raises no wash sale question at all. Once you can see the window and the basis shift, the rest of the rule falls into place. A short review before year end is usually enough to keep a routine sale from turning into a disallowed loss you did not plan for.

What does substantially identical mean under the wash sale rule?

The phrase substantially identical is the part of the rule that decides whether a repurchase counts. Shares of the very same company in the same class are substantially identical to each other, so selling and rebuying the same common stock is the clearest case of all. Stock in two different companies is generally not substantially identical, even for two close competitors in one industry, because the test looks at the specific security rather than the sector. A call option or a contract to buy the same stock can be treated as substantially identical to the stock itself, since it locks in the same economic exposure. Preferred shares that convert into common stock on fixed terms can be treated as identical to that common. Warrants and convertible securities are judged the same way, on whether they carry the same underlying stake. Bonds usually turn on the issuer and the terms, so two bonds with different maturities or coupon rates are often not identical, while a move to a different credit usually breaks the link entirely. A useful rule of thumb is that the closer two securities track the same returns over time, the more likely the tax law treats them as one. The Publication 550 guidance lays out these distinctions, and it is the reference we point to when a client asks where the line actually sits.

Here is a worked example. You sell a broad-market index fund at a 4,000 dollars loss and, within a week, you buy a nearly identical index fund from another fund family that tracks the same underlying index. Many tax professionals treat those two funds as substantially identical because they follow the same basket of stocks, so the 4,000 dollars loss would likely be disallowed. If the replacement fund tracks a genuinely different index, with different holdings and weightings, the two are far less likely to be substantially identical, and the tax analysis changes with it. The same care applies to two mutual funds that share an index but sit at different providers, and to a target-date fund swapped for a plain index fund, where the holdings diverge enough that the pair is usually not identical. This is a facts and circumstances judgment, and reasonable advisors sometimes disagree about a close call, so written documentation is the safe path. You report the sale and any adjustment on Form 8949, which carries the wash sale code whenever one applies to a lot.

The common mistake is assuming that two exchange-traded funds are automatically safe because they carry different ticker symbols, when funds tracking the same index can still be treated as identical. Another error is assuming a purchase in a spouse’s account does not count, when the rule reaches a spouse’s holdings as part of the same household. A related misread is thinking that switching between share classes of one fund sidesteps the rule, which it usually does not do. A further point that surprises active traders is that the rule can reach short sales and options positions, not only ordinary share purchases, so a busy trading account has more ways to trip it than a buy-and-hold portfolio does. Because the answer depends on the specific facts, our tax strategy consulting reviews the holdings on both sides of a sale before a loss is claimed on the return. When a client is unsure, we would rather review both holdings first than defend a disallowed loss later. Keep a note of why a replacement security was treated as different, and a later question about that loss becomes far easier to answer with confidence.

How does a disallowed loss add to the basis of the replacement shares?

When a wash sale disallows a loss, the tax code does not throw the loss away. It shifts the disallowed amount into the cost basis of the replacement shares, and it also adds the holding period of the shares you sold onto the new ones. That basis adjustment is the mechanism that turns a wash sale into a matter of timing rather than a permanent loss. It is also the part of the wash sale rule explained least often, which is why so many taxpayers assume they have simply forfeited the deduction for good. This deferral has no time limit of its own, so the disallowed loss stays parked in the replacement shares until you sell them in a clean transaction, whether that comes next month or years later. The holding-period carryover has its own effect, because a position you had held long enough for long-term treatment stays long-term after the wash sale, so a later gain can still qualify for the lower long-term rate. That carryover can matter as much as the basis bump when a stock has climbed since you first bought it. The basis rules that govern this sit in Publication 551, and the wash sale treatment itself is covered in Publication 550.

Here is a worked example with round numbers. You buy 200 shares for 12,000 dollars and later sell them for 9,000 dollars, a loss of 3,000 dollars. Within the window you buy 200 replacement shares for 8,500 dollars. The 3,000 dollars loss is disallowed and added to the 8,500 dollars, so your basis in the replacement shares becomes 11,500 dollars. If you later sell those shares for 13,000 dollars in a clean sale, your gain is only 1,500 dollars rather than 4,500 dollars, because the deferred loss finally counts against the proceeds. The math works out so that you are not taxed twice, as long as the basis was adjusted correctly on Form 8949. If the replacement lot is a different size than the shares you sold, the disallowed loss is prorated across the matching shares, so a smaller repurchase carries a smaller basis bump while the unmatched loss stays allowed now. Say you sold 200 shares at a 3,000 dollars loss but rebought only 100 within the window. Then 1,500 dollars of the loss is disallowed and added to the 100 replacement shares, and the other 1,500 dollars remains deductible this year. Round numbers make the mechanics clear, though real trades rarely land so neatly, which is one reason the adjustment is easy to miss.

The common mistake is paying tax on the full gain because the basis was never stepped up for the disallowed loss, which effectively taxes the same money twice. A brokerage statement does not always carry the adjustment when the replacement shares sit in a different account, so the correction often falls to you at filing time. Another error is forgetting the holding-period carryover and reporting a long-term position as short-term, which can raise the rate on a later sale. Broker cost-basis reporting has improved over the years, but it still breaks down across separate accounts, so this reconciliation is worth doing by hand when trades span more than one login. Our individual tax return preparation reconciles the basis on replacement shares so the deferred loss is captured rather than lost. A separate note of the wash sale date and the replacement lot makes the next filing far simpler, since the adjustment can be hard to reconstruct a year later. Track the adjusted basis the moment a wash sale happens, and the benefit you deferred will be waiting for you when you finally close the position.

Does the wash sale rule apply across accounts, including an IRA?

Yes, and this catches a lot of investors by surprise. The rule looks at you as a taxpayer, not at a single brokerage account in isolation. A loss sold in one taxable account and a repurchase in another taxable account still trigger the rule. Purchases in a spouse’s account can count as well, because the tax law treats the household as one economic unit for this purpose. Two different brokers do not create a shield either, since a wash sale can straddle two firms that never see each other’s records. Retirement accounts you do not direct, such as a plan left at a former employer, sit in a grayer area, but the accounts you actively control are squarely inside the rule. Even a business entity you own can be drawn in when its trades are closely tied to your own. Investors want the wash sale rule explained across their accounts, not just inside one statement, because that is where the real exposure tends to hide. The Publication 550 guidance states that the rule applies to the accounts you control, and it is the source we cite when a client is sure that separate accounts keep them clear.

The IRA case is the harshest version of the rule. Under IRS guidance, if you sell a security at a loss in a taxable account and buy the substantially identical security inside your traditional or Roth IRA within the window, the loss is disallowed and you get no basis increase in the IRA to recover it later. The loss is simply gone, because an IRA does not carry taxable basis the way a brokerage account does. Here is a worked example. You sell a stock in your brokerage account at a 5,000 dollars loss and, eleven days later, your IRA buys the same stock. You lose the 5,000 dollars deduction and nothing is added back anywhere, so the deferral you expected never happens at all. This is the one place where a wash sale converts a deferral into a genuinely permanent loss, which is why it deserves extra care. A Roth IRA produces the same harsh result, since it also lacks the taxable basis needed to hold the disallowed amount. The IRA contribution rules that make this outcome so unforgiving are described in Publication 590-A, and any resulting change in your net gains can feed into the net investment income tax on Form 8960.

The common mistake is assuming that an IRA or a second broker keeps a loss safe, when both can pull the loss into the wash sale rule. Automatic dividend reinvestment inside a fund can also create a small wash sale without any deliberate trade, because each reinvested dividend is a fresh purchase of shares. A further misstep is booking a loss in December while a standing automatic purchase quietly refills the same position a few days later. Turning off automatic reinvestment during a loss-harvesting window is one way investors and their advisors keep a clean break, though that timing choice belongs to them rather than to us. Our tax strategy consulting maps the trades across every account before a loss is booked, so a wash sale that spans two brokers or reaches into an IRA does not slip through unnoticed. Line up your accounts before you claim a loss, and you keep control of the timing instead of handing it to the calendar.

How do I report a wash sale on Form 8949 and Schedule D?

Reporting starts with the broker’s 1099-B, which flags a wash sale with code W and shows the disallowed amount in the adjustment column for sales within that one account. You carry each sale onto Form 8949, enter code W in the adjustment column, and show the disallowed loss as a positive number that reduces the loss you can claim for the year. Each wash sale gets its own row, with the proceeds and cost shown as reported and the disallowed loss added back as a positive adjustment in the wash sale column. The totals then flow to Schedule D, which nets your gains and losses and carries the result to your return. Here is the wash sale rule explained for the actual forms, so the numbers land exactly where the IRS expects to see them. The single most common slip at this step is entering the disallowed loss as a negative number, which deepens the loss instead of removing it. Take the columns in order, one row at a time, and the form does the rest. The reporting mechanics and the code definitions are set out in Publication 550, which is worth a look before you fill in the adjustment column for the first time.

Here is a worked example. Your 1099-B lists a 2,000 dollars loss with a 2,000 dollars wash sale adjustment, so the allowed loss for the year is zero and the full 2,000 dollars shifts to the basis of your replacement shares. Put another way, proceeds of 20,000 dollars against a basis of 22,000 dollars look like a 2,000 dollars loss, but the 2,000 dollars adjustment brings the allowed loss to zero and the deferred amount rides along in the shares you still hold. You still list the sale on Form 8949 with code W rather than leaving it off, because the IRS matches your return against the broker form and a missing line draws a notice. If part of a position is a wash sale and part is not, you split the lot and report each piece on its own row, which keeps the allowed loss and the deferred loss clearly apart. Keeping tidy records behind these entries is where our bookkeeping service earns its keep, because the trade detail has to agree with the forms line for line. Software can handle most of this, but it still needs the trade history loaded correctly, so the input is where errors slip in.

The common mistake is trusting the 1099-B to catch everything, when a single broker only tracks wash sales within its own accounts and only for identical security numbers. Cross-broker sales and purchases in an IRA can create wash sales the broker never sees, and so can a spouse’s trades, so the fix falls to you at filing. Traders with heavy volume face the most exposure, because dozens of small repurchases can each create an adjustment that no single broker statement pulls together on its own. This is where a careful review pays for itself, and clients who want that review can request a consultation with a CPA who handles investment tax reporting. We coordinate with your own advisor on the trade data and keep the tax treatment squarely in our lane, because we do not give investment advice. A short year-end check of every account together is usually enough to catch the wash sales a broker form would miss. Reported correctly, a wash sale is only a delay, and the loss you defer this year lowers the tax on the gain you report later.

Contact Us