Investing insights
What are wash sales and how they work
5 min read
Wash sales can be intimidating, but once you understand what triggers them and how the IRS treats them, the underlying rules are straightforward.
What are wash sales, and why do they exist?
A wash sale occurs when you sell a security at a loss and buy the same or a substantially identical security within a 61 day period. You can also trigger one if you acquire a contract or option to buy substantially identical shares within this window. This window covers 30 days before the sale, the day of the sale, and 30 days after the sale.
The IRS created this rule to prevent investors from reducing their tax bill while maintaining the same economic position.

What happens to your loss if you trigger a wash sale?
If a wash sale is triggered, your loss does not disappear forever.
In a taxable brokerage account, the loss is deferred and added to the cost basis of the stock you bought after you sold, also known as replacement shares. Your holding period also carries over, which means the IRS treats your replacement shares as if you’ve been holding them since you bought the original shares. The only major exception is when the replacement shares are purchased inside an IRA or Roth IRA. In that case, the loss is permanently disallowed.
Here’s an example:
- On January 1, you buy 20 shares of AAPL at $100.
- On January 8, the price drops to $80 and you sell all 20 shares to capture the $400 loss.
- On January 15, which is within the 61 day wash sale window, you buy 30 shares of AAPL at $90.
Because you repurchased the stock so quickly, you’ve triggered a wash sale.
The $400 loss then gets deferred and added to the cost basis of 20 of the 30 newly purchased shares. The cost basis for the 20 shares is now $110 per share ($90 purchase price plus $20 of deferred loss per share) and are treated as if they were purchased on January 1. The other 10 shares maintain the original $90 cost basis, and their holding period starts on January 15.
Understanding replacement shares
Replacement shares are central to wash sale mechanics. These are the shares you still own after capturing the loss that were purchased within the 61 day window.
If you sell every share on the loss day and do not repurchase afterward, you have zero replacement shares and thus no wash sale is triggered. Shares you purchased before the 61 day window do not count as replacement shares either. So in theory, you could sell a portion of that position at a loss and keep the rest of your investment intact as long as the shares you keep were purchased earlier, and you don’t repurchase during the wash sale period.

What is substantially identical?
The IRS has never issued a precise definition of what it means to be “substantially identical,” so investors and tax professionals rely on common practice and CUSIP matching. The principle is simply: if you sell an investment at a loss, the replacement must leave you in a meaningfully different economic position.
Markers generally considered “substantially identical” include:
- The same ticker
- Different share classes of the same company
- Funds tracking an identical index
Frec uses stock symbols to determine whether two securities are substantially identical to manage wash sales for direct indexing accounts on our platform.
Markers generally not considered “substantially identical” include:
- Funds tracking different indices
- Two different individual stocks from different companies
- Broad vs. narrower index funds
- ETFs with similar exposure but different index construction
For example, selling SPY (tracks the S&P 500) and buying VTI (tracks the CRSP US Total Market Index) is not considered a substantially identical investment due to the differing benchmarks and construction. On the other hand, selling VOO (S&P 500) and buying SPY (S&P 500) is at a higher risk of being considered substantially similar because they track the same index with nearly identical holdings.
Special cases: Bonds and preferred stock
Most of the time, bonds or preferred stock from a company are not considered the same as that company’s common stock. However, they can be treated as substantially identical if they are very similar to common stock.3
For example, preferred stock might be considered the same as common stock if:
- You can easily turn it into common stock
- It has the same voting rights as the common stock
- It pays dividends in the same way
- Its price is close to what you’d get if you converted it to common stock
- There are no restrictions stopping you from converting it
In general, when evaluating whether a position is substantially identical, the greater the overlap in holdings and methodology, the higher the risk that the IRS could treat the two securities as substantially identical.
How Frec helps manage wash sales
Wash sales are a common concern with direct indexing, but at Frec, we handle this automatically for you. Our direct indexing algorithm avoids buying replacement securities that could be treated as substantially identical. It uses correlated but distinct alternatives to maintain exposure while avoiding wash sales. You can learn more about our algorithm in our technical white paper here.
We also automatically account for single-stock positions held in your self-managed account when managing wash sales. If you hold positions outside of Frec, you can use our customization features to exclude specific stocks or add trade restrictions.
What now?
If you plan to tax-loss harvest, the key is to avoid buying back into the same economic exposure too quickly. Remember to look at the dates of your recent trades, identify which lots fall inside the 61 day window, and choose a replacement that gives you similar market exposure without being substantially identical. Doing so allows you to maintain your portfolio’s performance while maximizing potential tax benefits.


