You sell an investment at a loss.
Then you buy the same thing back almost immediately.
Economically, you may feel like you lost money and simply re-entered the position.
For federal tax purposes, however, you may have created a wash sale.
At a high level, the wash-sale rule can prevent a taxpayer from deducting a loss currently when substantially identical stock or securities are acquired within the applicable period around a loss sale.
For active traders, this matters because repeatedly leaving and re-entering positions can create wash sales without the trader setting out to do anything especially exotic.
What creates a wash sale?
IRS Publication 550 describes a wash sale as occurring when stock or securities are sold at a loss and, within a period beginning 30 days before the sale and ending 30 days after the sale, substantially identical stock or securities are acquired or certain related acquisition transactions occur under the rule.
That gives the familiar wash-sale window:
30 days before
↓
Loss sale
↓
30 days after
The rule therefore is not merely:
Don’t buy it back for 30 days after selling.
Acquisitions before the loss sale can matter too.
That is one reason wash-sale tracking can become unpleasant for frequent traders.
Why does the rule exist?
The practical effect is to prevent a taxpayer from currently recognizing a loss while effectively replacing the position with substantially identical stock or securities within the statutory window.
From the trader’s perspective, the important thing is not memorizing the policy philosophy.
It is recognizing that:
Selling at a loss does not automatically mean the loss is currently deductible.
The surrounding acquisition activity matters.
A simple IRS example
IRS training material gives a straightforward example:
- a taxpayer buys 100 shares for $1,000
- sells the shares for $750
- within 30 days buys 100 shares of the same stock for $800
The IRS example says the $250 loss is not currently deductible because substantially identical stock was acquired within the wash-sale period.
But the example does not simply throw the $250 into a tax-code trash can.
Instead, the IRS example adds the disallowed $250 loss to the $800 cost of the replacement stock, producing a $1,050 basis in the new stock.
Conceptually:
Cost of replacement shares $800
Disallowed wash-sale loss $250
----
Basis in replacement shares $1,050
That basis adjustment is a critical part of understanding ordinary wash-sale treatment.
Does “disallowed” mean the loss vanished forever?
Not necessarily.
In the ordinary taxable-account example above, the disallowed loss is added to the basis of the replacement stock. The tax effect is therefore generally deferred into the replacement position rather than simply disappearing in that example.
That is why saying:
Wash sales erase your losses.
is too crude to be a reliable explanation.
A better statement is:
A wash sale can prevent the loss from being deducted on the original sale and can shift that loss into the basis of replacement property under the applicable rules.
But there are important exceptions and account interactions, including IRAs, where assuming the ordinary taxable-account basis treatment can be wrong.
We will get to that shortly.
What does “substantially identical” mean?
This is one of the places where traders want a wonderfully mechanical rule and tax law declines to provide one in the form of a universal ticker-symbol test.
The wash-sale rule refers to substantially identical stock or securities.
Whether two investments are substantially identical can depend on the facts and the instruments involved.
DoTaxes.com is not going to publish a homemade list claiming that every pair of similar ETFs, options, funds, or securities is either definitely safe or definitely identical.
When the answer matters, use current IRS guidance and appropriate professional advice for the actual instruments involved.
The 30-day rule is really a 61-day window
This is an easy conceptual trap.
People often say “the wash-sale rule is 30 days.”
But because the statutory period looks 30 days before the sale, the day of the sale, and 30 days after the sale, traders commonly think of it as a 61-day window surrounding the loss sale.
The important practical point is that buying replacement shares shortly before selling the losing shares can matter just as buying them afterward can.
So:
Bought replacement first
↓
Sold old shares at a loss
is not automatically outside the wash-sale problem merely because the replacement purchase happened first.
Why active traders can create chains of wash sales
An active trader may repeatedly buy and sell the same security or substantially identical securities.
That can cause a disallowed loss from one sale to affect the basis of replacement shares, which may later be sold while still inside another sequence of transactions.
The result can be a chain of basis adjustments rather than one isolated red line on a statement.
This is why wash-sale reporting can become much more annoying for active traders than for an investor who sells one losing position and does not touch it again for months.
The tax history can follow the replacement position.
What if only some replacement shares are purchased?
The wash-sale rules include matching concepts when the number of replacement shares differs from the number sold at a loss.
That can make partial replacements more complicated than the clean 100-shares-sold / 100-shares-repurchased example.
This introductory article is not going to improvise a share-matching algorithm.
If partial replacements, multiple tax lots, or many overlapping trades are involved, rely on the actual brokerage detail, current IRS rules, and qualified help where appropriate.
What does Form 1099-B show?
Form 1099-B includes Box 1g, Wash Sale Loss Disallowed.
The 2026 IRS Form 1099-B instructions contain specific wash-sale reporting guidance for brokers.
That can make the wash-sale adjustment visible on brokerage tax reporting.
But there is an important practical warning:
Broker reporting is not necessarily a complete cross-account picture of everything you did.
If substantially identical positions exist across different accounts or institutions, one broker’s statement may not have all of the information needed to understand transactions occurring elsewhere.
Do not assume “my broker didn’t mark it” automatically settles every possible wash-sale question involving your entire activity.
What if you trade at more than one broker?
This is where keeping complete records starts earning its keep.
Suppose a loss sale occurs at Broker A and replacement shares are acquired through Broker B within the applicable wash-sale period.
Each institution has records for activity inside its own systems, but the tax rule applies based on the taxpayer’s transactions under the law, not based solely on whether one brokerage platform can see another platform’s account history.
That is a general reason active traders with multiple accounts need to reconcile across accounts rather than treating each tax statement as a completely independent universe.
What about a spouse’s account?
Publication 550’s wash-sale guidance includes acquisitions by a taxpayer’s spouse among the circumstances relevant to the wash-sale rules.
That means looking only at one brokerage login can be incomplete when applicable spouse transactions fall within the rule.
The facts matter, and joint household trading can create questions that one broker’s automated wash-sale reporting may not resolve for you.
What about an IRA or Roth IRA?
This one deserves a warning because the result is not the ordinary taxable-account basis-shift example.
In Revenue Ruling 2008-5, the IRS addresses an individual who sells stock for a loss and causes the individual’s IRA or Roth IRA to acquire substantially identical stock within the wash-sale period.
The IRS concludes that the loss is disallowed.
Critically, that ruling also says the basis of the IRA or Roth IRA is not increased by the disallowed loss.
So this shortcut is dangerous:
Wash-sale loss is disallowed
therefore
It always gets added to replacement basis
Not when the replacement acquisition produces the IRA result addressed by Revenue Ruling 2008-5.
That can make an IRA-related wash sale considerably less forgiving than the ordinary taxable-account example.
If taxable and retirement accounts are trading overlapping positions, pay attention.
What about options?
The statutory wash-sale rule and IRS guidance can also involve contracts or options to acquire substantially identical stock or securities.
That makes options another area where “I didn’t literally buy the same shares again” may not end the analysis.
Because options and substantially-identical-security questions can become fact-specific quickly, this article will not invent universal option equivalence rules.
Active options traders should use guidance appropriate to their actual transactions.
Does selling everything before year-end fix wash sales?
Not automatically.
The wash-sale window reaches forward after a loss sale, so year-end activity near December 31 requires attention to what happens on both sides of the calendar boundary.
A December loss sale followed by a substantially identical acquisition during the applicable January window can still implicate the rule.
That makes “I sold it before New Year’s Eve” an incomplete wash-sale strategy by itself.
The calendar changed.
The 30-day-after period did not ask permission.
Why can year-end statements be surprising?
A trader may look at realized trading losses during the year and expect every one of those losses to be currently deductible.
Wash-sale adjustments can change that expectation.
If replacement positions remain open or trading continued around losses, some losses may have been deferred through basis adjustments rather than recognized where the trader expected.
This is one reason a brokerage tax statement can look different from a trader’s informal “winning trades minus losing trades” spreadsheet.
Accounting rules have opinions about your timing.
How does this connect to cost basis?
Directly.
For an ordinary wash sale involving taxable replacement shares, the disallowed loss can be added to the basis of the replacement stock under the wash-sale rules.
That means the replacement property’s adjusted basis carries information from the earlier loss transaction.
Which is exactly why our cost-basis article said:
Basis can carry tax history forward from one transaction into another.
Wash sales are one of the clearest examples.
How does this connect to holding period?
The wash-sale rules can also affect the holding period of replacement property under the applicable rules.
That can matter because holding period is relevant to whether gains and losses are generally classified as short-term or long-term.
Rather than bury that subject inside this article, we will cover holding periods in the upcoming Short-Term vs. Long-Term Capital Gains article.
Trader taxes apparently prefer linked lists.
What should an active trader do?
As practical recordkeeping guidance:
- preserve complete transaction history
- review wash-sale adjustments on brokerage statements
- do not assume one broker sees transactions at another broker
- consider spouse and IRA activity when applicable
- be cautious with repeated trading in the same or potentially substantially identical securities around loss sales
- investigate missing or unexpected wash-sale adjustments
- obtain qualified tax help when large numbers of overlapping transactions make the reporting difficult to reconcile
This is not a recommendation to avoid a legitimate investment transaction solely for tax reasons.
It is a recommendation to understand that trading decisions can have tax-reporting consequences.
The short version
A wash sale can occur when stock or securities are sold at a loss and substantially identical stock or securities are acquired within the applicable period surrounding the sale.
Remember:
30 days before
↓
Loss sale
↓
30 days after
In an ordinary taxable-account example, the disallowed loss may be added to the basis of replacement shares, deferring the tax effect into the replacement position.
But do not assume that treatment applies identically in every setting. The IRS specifically says an IRA/Roth IRA replacement purchase in the situation addressed by Revenue Ruling 2008-5 disallows the loss without increasing the IRA’s basis.
For an active trader:
- Watch both sides of the loss sale.
- Track more than one brokerage account when applicable.
- Remember that spouse and retirement-account activity can matter under the rules.
- Do not assume missing broker wash-sale reporting proves there was no wash sale.
- Understand that disallowed losses can affect replacement basis in ordinary taxable-account cases.
- Get help when repeated trades create chains you cannot confidently reconcile.
And if you thought selling something for a loss was the easy part of trader taxes:
Welcome to the wash.