I am new to stock trading and am confused by the usage of the word "before" in the wash sale rule. There is one scenario in particular that I am confused on. For simplicity's sake, let's assume the following are the only moves I make on ABC all year. Take the following example:

Monday: Buy 100 shares of ABC at $10. Later that same day, I sell all 100 shares at $11.

Tuesday: Buy 100 shares of ABC at $10. Later that same day, sell all 100 shares at $8.

Is this scenario going to trigger a wash sale? If so, how does this play out when it comes to taxes?

  • Where are you? Tax questions require a country tag. Commented Mar 25, 2019 at 18:24
  • Do other countries have a wash-sale rule ? Also aren't day-traders exempt from wash-sale rules ?
    – xyious
    Commented Mar 26, 2019 at 18:08

3 Answers 3


This is really just to expand on Bob Baerker's answer and clarify the before language and where that might apply.

Consider these transactions:

Day 1: Buy 100 Shares XYZ for $1,000

Day 20: Buy 50 Shares of XYZ for $700

Day 20: Sell 50 Shares of XYZ for $400

The day 20 sale results in a loss.

Either way, this loss is washed because within 30 days of the transaction that resulted in a loss you opened a position in a substantially similar security. Depending on the accounting you're using, usually FIFO (first in first out), you would have sold 50 of the Day 1 shares or all of the Day 20 shares.

After the sale you're now holding, for simplicity lets just use FIFO.

Day 1: 50 Shares of XYZ which cost you $500

Day 20: 50 Shares of XYZ which cost you $700

Disallowed loss of $100

The disallowed loss needs to be applied to either the shares in the Day 1 or Day 4 transactions.

So from a tax standpoint you're holding:

Day 1: 50 Shares of XYZ which cost you $600

Day 20: 50 Shares of XYZ which cost you $700

If on Day 50 you sell 50 more shares of XYZ and there is a loss, your loss would be washed by the Day 20 buy.


The purpose of the wash sale rule is to prevent investors from selling a security at a loss so they can claim tax benefits, only to turn around and immediately buy the same security again (within 30 days before or after realization of the loss).

In your example, the first trade is a gain. It has no relevance to a wash sale because there was no loss. Your second round trip was a loss but you did not repurchase shares (which remain open) in order to realize the loss while maintaining the position.

  • I'm not sure where you get the rule in the second paragraph from. See Investopedia. "To be more specific, a wash sale involves selling a security at a loss and repurchasing the same security, or one that is substantially identical, within 30 days before or after the sale." The second sale is a wash sale. The purchase can be before or after, closed or open, and at a gain or at a loss. Commented Mar 26, 2019 at 19:36
  • 1
    You need to go beyond your quoted sentence and look at the sequence of trades and the entire position. Second sentence of your link: "Wash sales are a method investors employ to try and recognize a tax loss without limiting their exposure to the security." The OP has no exposure since all purchases are closed. There is no adjustment of cost basis. There is no loss deferral. Your link negates your conclusion. Commented Mar 26, 2019 at 19:58
  • No. That a particular sale doesn't exploit the loophole wash sales were intended to avoid doesn't mean that it's not a wash sale. My quote clearly explains what the definition of a wash sale is, and you can double check it with the IRS. The law clearly requires an adjustment of cost basis. (This is a case where the wash sale rule does strange things for no good reason. It's not a perfect rule that always and only catches people doing bad things.) Commented Mar 26, 2019 at 20:00
  • Please square your answer with the text of 26 USC 1091(a), the law that definitively states which losses are disallowed under the wash sale rule. Commented Mar 26, 2019 at 20:37
  • Your reading didn't disallow a loss.
    – quid
    Commented Mar 26, 2019 at 20:52

Under US law, the second sale is technically a wash sale. The definition of a wash sale in the United States is a sale of a security at a loss in which you bought any other shares of an identical, or substantially similar security, within 30 days before or after the sale.

All the elements are met here. The sale on Tuesday was a sale at a loss. The purchase on Monday was for different shares of the same security and it was within 30 days.

So the answer to your question is yes. As a consequence, you must add the loss in the second sale to the basis of the first stock. This results in the first sale being reported as a loss for tax purposes.

The time at which the shares in the substantially identical security are sold has no effect on the operation of the wash sale rule.

The wash sale rule is intended to catch people who close positions just to mine them for tax losses where they have another purchase that prevents the loss from really being taken. However, it is not perfect and it does occasionally apply to situations in which there is absolutely nothing nefarious going on. Fortunately, it doesn't really do any harm here -- it just moves the loss in time by a small amount.


Here is 26 USC 1091(a):

In the case of any loss claimed to have been sustained from any sale or other disposition of shares of stock or securities where it appears that, within a period beginning 30 days before the date of such sale or disposition and ending 30 days after such date, the taxpayer has acquired (by purchase or by an exchange on which the entire amount of gain or loss was recognized by law), or has entered into a contract or option so to acquire, substantially identical stock or securities, then no deduction shall be allowed under section 165 unless the taxpayer is a dealer in stock or securities and the loss is sustained in a transaction made in the ordinary course of such business. For purposes of this section, the term “stock or securities” shall, except as provided in regulations, include contracts or options to acquire or sell stock or securities.

If you think the rule doesn't apply, then please state which part of the test isn't satisfied. The second sale is a loss. There is an acquisition in the 60 day period. The securities are identical. So no deduction is allowed for the second sale. We're not talking about a dealer. The law is very, very clear.

  • The "before" language is to include short selling activities where the sale occurrs chronologically before the buy and the buy is the transaction that may result in a loss. When you apply the rule in a manner that you describe the loss occurs now chronologically earlier which means a shrewd investor could shove a loss in to a prior tax year; opening a whole new loop hole. Really though, there's a circular effect, now the Monday sale results in a loss, which would need to step up the cost basis of the Tuesday buy, and so on. The government WANTS the $1 gain from the Monday transaction.
    – quid
    Commented Mar 26, 2019 at 20:09
  • 1
    If your loss was disallowed because of the wash sale rules, add the disallowed loss to the cost of the new stock or securities (except in (4) above). The result is your basis in the *new* stock or securities. This adjustment *postpones* the loss deduction *until* the disposition of the *new* stock or securities. Your holding period for the *new* stock or securities includes the holding period of the stock or securities sold. from Pub 550. Postpones.
    – quid
    Commented Mar 26, 2019 at 20:32
  • 1
    If I buy and sell two lots within 30 days of each other, both at a loss, your linked 26 USC 1091 (a) is telling me both losses are disallowed because of the other purchase; (d) is not explicit about where the basis ends up, unless it's up to me(???) to elect that time flows like an arrow and a later purchase moves loss to the basis of the second purchase. As a non-lawyer taxpayer, it's enough for me that Pub 550's time flows like an arrow.
    – user662852
    Commented Mar 27, 2019 at 19:12
  • 1
    I admit I didn't recognize (c) applied because of a "not less" = "greater than or equal to" sloppy misreading but I agree with you on closer parsing. Since (c) states "the particular shares ... shall be determined under regulations prescribed by the Secretary" I am now confident in my personal position that Pub 550 (=regulations prescribed by the Secretary of the Treasury) can be understood by their plain English understanding in cases where (c) applies, and loss is thus postponed. Btw I'm not @quid but you engaged me in a related question and this chain fit better.
    – user662852
    Commented Mar 28, 2019 at 21:04
  • 1
    @user662852 This rule is so complicated that almost nobody gets it 100% right. It's a good thing brokers are required to compute this for their customers and I feel truly sorry for anyone who trades using foreign brokers or multiple brokers/accounts and has to work this out for themselves. Fortunately, I can't imagine the IRS will care if you do something technically wrong that just changes when a loss is materialized inside the very same tax year and generally speaking, there's no penalty for good faith mistakes that don't cause tax underpayments. Commented Mar 28, 2019 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .