VistaCoverInsurance & money, explained

The Wash Sale Rule: When a Loss Doesn't Count (Yet)

Selling at a loss and buying the same investment back within 30 days can disallow the loss for tax purposes. Here is how the rule works, with a worked example, and what happens to the disallowed loss.

Investing Article, 3 min read

Money background
Education, not advice. This page explains how things generally work. It doesn't consider your situation and isn't a recommendation. See our full disclaimer.

Selling an investment at a loss can reduce your taxes. But if you buy the same or a "substantially identical" investment within a short window around that sale, the wash sale rule disallows the loss for now. The loss isn't erased. It's added to the cost basis of the replacement shares, which defers it.

The 61-day window

A wash sale generally occurs if, within 30 days before or after selling at a loss, you buy substantially identical securities, including through certain related accounts. That makes a 61-day window around the sale date.

The wash sale window
0130 days before02Sale at a loss0330 days after04Loss deferred
  1. 30 days before. A purchase in this period can trigger the rule.
  2. Sale at a loss. The day you sell.
  3. 30 days after. A purchase in this period can also trigger the rule.
  4. Loss deferred. Disallowed loss is added to the basis of the replacement shares.

Worked example

A hypothetical investor:

  1. Bought 100 shares at $50 ($5,000).
  2. Sold all 100 at $40 ($4,000), a $1,000 loss.
  3. Bought 100 shares back at $42 ($4,200) two weeks later.

Because the repurchase came within 30 days, the $1,000 loss is disallowed for now.

New basis = Purchase price of replacement shares + Disallowed loss = $4,200 + $1,000 = $5,200, or $52 per share

If the investor later sells those shares at $55:

Without the wash sale adjustment: $5,500 − $4,200 = $1,300 gain With the adjustment: $5,500 − $5,200 = $300 gain
Tax effect over two sales
No wash sale (waited 31+ days)Wash sale (rebought in 2 weeks)$0$300$600$900$1,200$1,500$1,000$0Loss claimed on first sale$1,300$300Gain reported on later sale
Hypothetical. Over both sales the net result is a $300 gain either way; the wash sale only changes timing. Illustrative. Assumes the waiting investor rebuys at the same $42.
Show the numbers behind this chart
No wash sale (waited 31+ days)Wash sale (rebought in 2 weeks)
Loss claimed on first sale$1,000$0
Gain reported on later sale$1,300$300

Over the two transactions, the total is the same: a $300 net gain. The wash sale rule shifts the loss from the first sale to the second. The holding period of the original shares also generally carries over to the replacement shares.

What counts as substantially identical

Buying the same stock or the same fund clearly counts. Options and contracts to buy the same stock can count. Whether two different funds tracking similar indexes are substantially identical is less clear; the IRS has not provided a bright-line rule. Many investors who harvest losses switch to an investment that is similar in role but not identical.

Office work

Accounts that matter

The rule can apply across your own accounts, including in some cases purchases in an IRA after selling at a loss in a taxable account. When the replacement shares are bought in an IRA, the disallowed loss may not be recoverable through a basis adjustment. Purchases by a spouse can also count. Automatic dividend reinvestment can trigger a partial wash sale if it buys shares within the window.

Tax-loss harvesting

Tax-loss harvesting means deliberately selling investments at a loss to offset gains, and, within annual limits, ordinary income, with unused losses carried forward. The wash sale rule is the main constraint. Typical approaches include waiting at least 31 days to repurchase, or buying a different but similar investment so your market exposure continues.

The takeaway

Selling at a loss and buying back within 30 days, before or after, generally defers the loss rather than letting you claim it now. Know the window, watch for automatic purchases and other accounts, and get tax advice for significant transactions.

Keep reading

Ask a question about this page

Spotted an error, or something here isn't clear? Tell us. We use messages to fix and improve our articles. We can't give personal advice or quotes, and we don't pass your details to anyone who sells insurance.

Please don't include policy numbers, account numbers, health details, or other sensitive information. See our privacy policy.