Yes, you can sell and rebuy the same stock, and investors do it all the time to harvest tax losses, rebalance, or step back into a position after a price move. Two rules shape whether it costs you anything. If you sold at a loss, the IRS wash sale rule disallows that loss when you reacquire the same or substantially identical security within 30 days before or after the sale. If you round-trip the same stock in a single day repeatedly, FINRA can label you a pattern day trader and require $25,000 of equity in your margin account. Selling at a gain and rebuying carries no special penalty at all.
When the Wash Sale Rule Kicks In
The wash sale rule lives in 26 U.S.C. § 1091. It exists to stop taxpayers from claiming a capital loss while effectively keeping the same investment. The trigger is a 61-day window: the 30 days before your sale, the sale date itself, and the 30 days after.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities If you sold at a loss and acquired substantially identical stock or securities anywhere in that window, the IRS disallows the loss for that tax year.
Two features surprise people. First, the rule catches purchases you made before the sale. Doubling a position and then selling the original lot at a loss triggers a wash sale, because you were already holding replacement shares when you sold. Second, the rule applies only to losses. Selling at a gain and rebuying the next minute is fine.
The disallowed loss isn’t gone forever. It’s deferred, which still hurts if you were counting on it this year. Net capital losses can offset only $3,000 of ordinary income per year, or $1,500 if married filing separately.2Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Losing the ability to apply a harvest against this year’s gains can mean a materially bigger tax bill.
One narrow exception: dealers whose actual business involves maintaining a securities inventory for customers are exempt for losses sustained in the ordinary course of that business.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Retail traders, however active, don’t qualify.
What Counts as Substantially Identical
You don’t have to buy the exact same ticker to trip the rule. Section 1091 sweeps in contracts and options to acquire or sell stock or securities.1Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities So selling shares at a loss and buying call options on the same stock re-establishes your economic exposure and disallows the loss.
Preferred stock can be substantially identical to common stock when it’s freely convertible and tracks the common shares closely. Shares of a company that has renamed itself or split its stock stay identical because the underlying company hasn’t changed. A bond from the same issuer generally isn’t identical to that issuer’s stock because the economic characteristics differ.
ETFs and Index Funds
This is the gray zone. A common tax-loss harvesting move is to sell one S&P 500 fund at a loss and buy a different provider’s S&P 500 ETF, hoping they aren’t substantially identical. The IRS has never ruled on the question. A now-discontinued IRS publication once said that shares of one mutual fund aren’t generally considered substantially identical to shares of another, but that language left room for facts-and-circumstances exceptions. The safer path is to move to a fund tracking a different index — a total stock market fund in place of an S&P 500 fund, for example — so the exposure is similar but not identical.
What Happens to the Loss You Can’t Deduct
When the IRS disallows a wash sale loss under Section 1091(d), the amount is added to the cost basis of the replacement shares. Sell shares for a $1,000 loss, then repurchase for $5,000, and your new basis is $6,000. Down the road, when you sell without triggering another wash sale, the higher basis produces either a smaller gain or a larger loss.
Your holding period carries over too. Under 26 U.S.C. § 1223(3), the time you held the original shares is tacked onto the replacement shares.3Office of the Law Revision Counsel. 26 USC 1223 – Holding Period of Property That matters because long-term capital gains, on assets held more than a year, are taxed at lower rates than short-term gains.4Internal Revenue Service. Topic No 409 – Capital Gains and Losses
Partial Repurchases
The rule applies share-for-share. Sell 200 shares at a loss and buy back only 100 within the window, and the loss on those 100 is disallowed. The remaining 100-share loss stays deductible. The disallowed portion attaches to the 100 replacement shares as added basis.
Automatic dividend reinvestment is a quiet trap. If you sell a position for tax purposes but the stock’s dividends automatically reinvest a few shares within 30 days, you’ve triggered a partial wash sale on those shares. Turning off dividend reinvestment before a tax-loss sale is a small step that many investors skip.
Reporting It on Your Return
Brokerages report wash sale loss disallowances on Form 1099-B, box 1g, for covered securities with the same CUSIP number sold and repurchased in the same account.5Internal Revenue Service. 2026 Instructions for Form 1099-B – Proceeds From Broker and Barter Exchange Transactions On your return, the disallowed loss goes on Form 8949 using adjustment code “W” in column (f), with the nondeductible amount entered as a positive number in column (g).6IRS. Instructions for Form 8949
The blind spot: brokerages track wash sales only within the same account and only for identical CUSIPs. Sell in one brokerage and rebuy in another, or rebuy inside an IRA, and your 1099-B likely won’t flag it. Catching cross-account wash sales is on you.
The IRA Version Is Worse
Sell a stock at a loss in your taxable brokerage account, then buy the same stock in your IRA or Roth IRA within the 61-day window, and the loss is disallowed with no basis adjustment. Revenue Ruling 2008-5 established that because an IRA is a tax-exempt trust, the disallowed loss cannot be added to the IRA’s basis.7Internal Revenue Service. Revenue Ruling 2008-5 – Losses From Wash Sales of Stock or Securities The loss vanishes permanently. No deferral, no future recovery, no benefit.
Anyone harvesting losses in a taxable account needs to check whether scheduled contributions or automatic rebalancing inside a retirement account might buy back the security they just sold. This is the most expensive way to trip the wash sale rule.
Spouses and Related Parties
Section 1091 mentions only the “taxpayer” acquiring replacement securities. It does not spell out what happens when a spouse buys the shares. The IRS has successfully challenged losses under the related-party rules of Section 267 when a husband sold at a loss and his wife immediately purchased the same shares, treating the transactions as indirect sales between related persons. Section 1041 separately disallows losses on direct transfers between spouses. The safe assumption is that a spouse’s purchase inside the window puts your loss at risk.
Dividends Can Get Reclassified
Selling and rebuying can also cost you the preferential rate on dividends. To qualify for the lower qualified dividend rate, you must hold the stock at least 61 days during the 121-day period that begins 60 days before the ex-dividend date.8Internal Revenue Service. IRS Gives Investors the Benefit of Pending Technical Corrections on Qualified Dividends Timing a sale and rebuy around a dividend can knock you below that threshold, which means ordinary-income rates instead.
The Section 1223 carryover helps here in a wash sale situation, since the original holding period tacks onto the replacement shares. But if you wait more than 30 days to avoid a wash sale and then rebuy right before a dividend, your holding period restarts.
A Note on Cryptocurrency
The wash sale rule applies to “stock or securities.” The IRS classifies cryptocurrency as property, not securities, so as of early 2026 selling crypto at a loss and immediately rebuying still produces a deductible loss. Multiple legislative attempts to close this gap have not passed. Starting in 2026, crypto exchanges must report transactions on Form 1099-DA, which includes a box for wash sale loss disallowances, and must report cost basis on covered digital assets acquired after January 1, 2026. The reporting scaffolding is being built even though the substantive rule hasn’t changed, so anyone relying on this treatment should watch for legislation.
Same-Day Round Trips and the Pattern Day Trader Rule
Tax law isn’t the only constraint on selling and rebuying. FINRA Rule 4210 sets equity requirements for investors who repeatedly buy and sell the same security within a single day. Execute four or more day trades within five business days in a margin account, and your broker must designate you a pattern day trader.9FINRA. 4210 – Margin Requirements A day trade is buying and selling, or selling short and buying to cover, the same security on the same day.
Once designated, you must keep at least $25,000 in equity in the margin account at all times, and that minimum has to be deposited before day trading continues.9FINRA. 4210 – Margin Requirements Exceed your day-trading buying power and fail to meet the resulting margin call within five business days, and your account gets restricted to cash-only trading for 90 days.10SEC. Margin Rules for Day Trading
These rules apply to margin accounts only. Trade in a cash account and the PDT label doesn’t attach, but settlement rules still bind you: cash from a sale must settle, typically one business day for stocks under T+1, before you can use it to buy again.
The Mark-to-Market Escape Hatch
Investors whose trading rises to the level of a business can sidestep the wash sale rule entirely by electing mark-to-market accounting under Section 475(f). All year-end holdings are treated as sold at fair market value on the last business day, and gains and losses are ordinary rather than capital.11Office of the Law Revision Counsel. 26 USC 475 – Mark to Market Accounting Method for Dealers in Securities Section 475(d)(1) explicitly says the wash sale rule doesn’t apply to securities under mark-to-market treatment, so a valid 475(f) election lets a trader sell and rebuy without watching the 61-day clock.12Internal Revenue Service. Topic No 429 – Traders in Securities
Qualifying is hard. The IRS looks for someone seeking profit from daily market swings rather than dividends or long-term appreciation, with substantial activity conducted with continuity and regularity. Frequency of trades, typical holding periods, dollar amounts, and time devoted all factor in. A few dozen trades a year won’t cut it.12Internal Revenue Service. Topic No 429 – Traders in Securities
Timing is strict. The election has to be made by the due date, without extensions, of the return for the year before the election takes effect. For a calendar-year individual wanting the election in 2026, the deadline was the filing due date for the 2025 return. Late elections generally aren’t allowed. New taxpayers who didn’t file a prior-year return have until two months and 15 days after the start of their first tax year.12Internal Revenue Service. Topic No 429 – Traders in Securities
The cost: all gains become ordinary income at your regular rate rather than preferential capital gains rates. You also lose the option of treating some positions as long-term investments unless you identify them in your records on the day you acquire them. It’s a good fit for high-volume traders whose losses are constantly getting caught by wash sales, and a poor fit for anyone mixing active trades with buy-and-hold positions.