MALI
MALI Platform
AI Stock Research
Sign in

The Wash Sale Rule for Active Traders

By MALI ·

The wash sale rule for active traders

The wash sale rule disallows a loss on selling stock or securities if you buy substantially identical stock or securities within 30 days before or after the sale. That makes a 61-day window: the 30 days before, the day of the sale, and the 30 days after. The disallowed loss isn't lost for good: it's added to the cost basis of the replacement shares, and their holding period includes the time you held the shares you sold. The main exception is a buy in an IRA, where the loss is disallowed and doesn't move into any basis.

This article covers US federal income tax rules (Internal Revenue Code section 1091) for individual investors and traders. It's educational, not tax advice; check your own situation with a tax professional. It's part of portfolio management for self-directed investors.

What triggers a wash sale

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:

  1. buy substantially identical stock or securities,
  2. acquire substantially identical stock or securities in a fully taxable trade,
  3. acquire a contract or option to buy substantially identical stock or securities, or
  4. acquire substantially identical stock for your individual retirement arrangement (IRA) or Roth IRA.

It also counts if you sell and your spouse or a corporation you control buys substantially identical stock.

Points active traders miss:

  • The window looks back as well as forward. Buying more shares, then selling the original lot at a loss within 30 days, is a wash sale even if you never buy again.
  • Options count. Buying a call on the same stock within the window is acquiring an option to buy substantially identical stock. Publication 550 also says the rules apply to losses on contracts and options themselves.
  • Small buys count. A reinvested dividend or an employer stock award within the window is a purchase of identical stock, and can make part of a loss a wash sale. Publication 550 gives a bonus-share example.
  • Year-end doesn't reset it. A loss sale in late December followed by a buy in early January is still a wash sale.

Substantially identical

Publication 550 says to consider all the facts and circumstances. Ordinarily, the stock of one corporation isn't substantially identical to the stock of another, although it can be in a reorganization. Bonds or preferred stock usually aren't substantially identical to the same company's common stock, unless they're convertible and trade in line with it. Publication 550 gives no specific rule for two different funds that track the same index. Treat that as a gray area: it's why tools and tax advisers tend to flag such swaps as a caution rather than rule on them.

What happens to the loss

Basis and holding period

When the loss is disallowed, Publication 550 says you add it to the cost of the new shares; the result is your basis in them. That postpones the loss until you sell the replacement shares. Your holding period for the new shares includes the holding period of the shares you sold.

Partial replacements

If you buy fewer shares than you sold, only the loss on the matched number of shares is disallowed. If you buy more, the wash sale applies to the matching number, starting with the first shares bought.

IRAs: Revenue Ruling 2008-5

In Revenue Ruling 2008-5, the IRS held that if you sell stock at a loss in a taxable account and cause your IRA or Roth IRA to buy substantially identical stock within the window, the loss is disallowed under section 1091, and your basis in the IRA is not increased. The loss is gone, not deferred. Publication 550 reflects this: the basis adjustment doesn't apply to the IRA case.

A worked example

In this illustrative example, a trader buys and sells a hypothetical stock in 2026 (commissions ignored).

  1. 2 February: buys 100 shares at $50. Cost: $5,000.
  2. 2 March: sells all 100 at $40. Proceeds: $4,000. Loss: $1,000.
  3. 20 March (18 days later): buys 100 shares at $42. Cost: $4,200.

Because the buy falls within 30 days after the loss sale, the $1,000 loss is disallowed. It's added to the new shares' basis: $4,200 + $1,000 = $5,200, or $52 a share. The new shares' holding period includes the 28 days the first shares were held.

  1. 1 June: sells the 100 shares at $45. Proceeds: $4,500. Loss: $4,500 − $5,200 = $700, deductible if no new purchase falls within 30 days of this sale.

Check the total: the trader paid $9,200 and received $8,500, an economic loss of $700. The wash sale didn't remove any loss; it moved $1,000 of it into the later sale, where it netted against the $300 rise from $42 to $45.

If only 60 shares were bought back on 20 March, only 60 of the 100 shares sold would be matched: $600 of the loss would be disallowed and added to the 60 new shares' basis, and the other $400 could be deducted for the March sale.

If the 20 March buy were in the trader's IRA, the $1,000 loss would be disallowed and, under Rev. Rul. 2008-5, wouldn't be added to any basis.

What your broker reports, and what it doesn't

The Instructions for Form 1099-B require brokers to report a loss disallowed under section 1091 when both the sale and the purchase occur in the same account and involve covered securities with the same CUSIP number. Brokers may report others but aren't required to. So a buy in a different account, at a different broker, in an IRA, or by your spouse may not show on your 1099-B. You're still responsible for applying the rule on your return.

Traders with a mark-to-market election

IRS Topic 429 explains that a taxpayer who qualifies as a trader in securities can elect mark-to-market accounting under section 475(f), and that the wash sale rules don't apply to traders using that method. The election has strict deadlines, and qualifying as a trader is a facts-and-circumstances test that most active investors don't meet. Without a valid election, the wash sale rules apply.

Avoiding accidental wash sales

  1. Before a loss sale, list every buy of the same security in the previous 30 days, in every account you and your spouse control, including IRAs and reinvested dividends.
  2. Pause dividend reinvestment on a position you plan to sell at a loss.
  3. Wait at least 31 days after the sale before buying back, or buy a security that isn't substantially identical.
  4. Track the window's end date for each loss sale.
  5. Pick lots deliberately: Tax lots: FIFO vs specific identification explains how the lot you sell changes the loss.

Where MALI fits

The portfolio tracker flags a loss sale as a possible wash sale when the same symbol was bought within 30 days before or after it, shows the replacement buys and when the window closes, and warns before you harvest a lot that recent buys could turn it into a wash sale. It names funds tracking the same index, or another share class of the same company, as a caution without ruling on them. It sees only the accounts you import, so it can't see an IRA, a spouse's account or another broker you haven't imported.

The Compliance Co-pilot (Edge) checks a proposed trade for a possible wash sale under IRC section 1091 from the figures you enter, and marks the check "not evaluated" rather than passed when it's missing what it needs. Neither is tax advice.

FAQ

What is the 30-day wash sale rule?

If you sell stock or securities at a loss and buy substantially identical ones within 30 days before or after the sale, the loss is disallowed for that sale. The disallowed loss is added to the basis of the replacement shares.

Does the wash sale rule apply to IRAs?

Yes. If you sell at a loss in a taxable account and buy substantially identical stock in your IRA or Roth IRA within the window, the loss is disallowed. Under Revenue Ruling 2008-5, your basis in the IRA isn't increased, so the loss isn't recovered later.

Does a wash sale mean I lose the loss forever?

Usually not. The disallowed loss is added to the replacement shares' basis and recognized when you sell them. The exception is a replacement bought in an IRA.

Does the rule apply if my spouse buys the shares?

Yes. Publication 550 says a sale by you and a purchase of substantially identical stock by your spouse or a corporation you control is also a wash sale.

Sources

This article is educational and is not investment advice. MALI is a research and analytics platform; it does not recommend buying or selling any security.