can you sell a stock and buy it back (Wash Sale Rule)
can you sell a stock and buy it back (Wash Sale Rule)
Lead summary
Selling securities and repurchasing the same or a substantially identical position within the restricted window can trigger the IRS wash sale rule. This guide answers "can you sell a stock and buy it back" in U.S. taxable accounts, explains scope and timing, shows examples and workarounds, and highlights current guidance about cryptocurrencies.
Definition and purpose
What does "can you sell a stock and buy it back" mean?
In U.S. federal income tax terms, the question "can you sell a stock and buy it back" most commonly relates to the wash sale rule. A wash sale occurs when a taxpayer sells a security at a loss and acquires the same or a "substantially identical" security within 30 days before or after the sale. If a wash sale is triggered, the loss on the sale is disallowed for current-year tax deduction and instead is added to the cost basis of the replacement shares. The rule's policy purpose is to prevent taxpayers from creating an artificial tax loss while effectively maintaining the same economic exposure.
Scope and applicability
Types of securities covered
The wash sale rule generally applies to securities that are tradable and assigned a CUSIP-type identifier: individual stocks, exchange-traded funds (ETFs), mutual funds, bonds and many options and convertible securities. Broker guidance and major tax resources treat equities, ETFs, mutual funds and similar instruments as squarely within the rule's scope.
What "substantially identical" means
There is no single bright-line IRS definition of "substantially identical." Determinations rely on facts and circumstances. Common points:
- Identical company shares (same ticker/CUSIP) are clearly substantially identical.
- Shares of the same mutual fund or ETF that track the exact same index or have identical portfolio holdings may be viewed as substantially identical.
- Two ETFs from different issuers tracking the same index can sometimes be treated as substantially identical if their holdings and objectives are essentially the same; however, many practitioners treat different-issuer funds as not substantially identical when they have materially different holdings or management approaches.
- Sector- or factor-tilted ETFs that hold overlapping but not identical baskets are less likely to be substantially identical.
Because the test is factual, conservative taxpayers and advisors often avoid repurchasing instruments that look very similar in composition during the restricted window.
Cross-account, spouse, and entity rules
Wash sale rules look at purchases made by you, your spouse (if filing jointly), and controlled entities. Important points:
- Purchases in your other brokerage accounts can trigger a wash sale (you are responsible for tracking across accounts and brokers).
- Purchases made by your spouse may trigger a wash sale depending on filing/ownership; check tax guidance for family-specific rules.
- Purchases in an IRA or retirement account can also create a wash sale: if you sell a security at a loss in a taxable account and a substantially identical security is purchased in your IRA within the 61-day window, the loss can be disallowed and effectively lost forever (see the "Avoiding repurchase in IRAs" section).
Cryptocurrency exception (current stance)
As of the most recent mainstream tax guidance cited by major tax resources, the wash sale rule in Internal Revenue Code Section 1091 applies to securities, and the IRS has not explicitly applied it to cryptocurrencies. Therefore, many tax guides and software providers treat cryptocurrencies as not subject to the wash sale rule today. That said, tax law and IRS guidance can change; taxpayers should monitor developments and consult a tax advisor.
Timing rules and mechanics
The effective window is 61 days: 30 days before the sale, the day of sale, and 30 days after the sale. That means:
- If you sell a position at a loss on Day 0, any purchase of the same or substantially identical security on Day -30 through Day +30 will create a wash sale.
- Days are calendar days, not trading days. Weekends and holidays count in the 30-day counts.
- Multiple transactions complicate matching: if you sell multiple lots and repurchase multiple lots during the window, matching rules and lot identification determine how much loss is disallowed and how much basis is adjusted.
Lot matching and aggregation rules
- If you identify specific lots for the sale (using FIFO, specific identification, or other permitted methods), that can affect which lots are matched for gain/loss purposes.
- Broker systems typically match trades within the same account/CUSIP, but they may not detect cross-account or IRA-triggering repurchases for you.
Tax consequences
Disallowed loss and basis adjustment
When a wash sale disallows a loss, the loss amount is not lost permanently (except in some IRA repurchase cases); instead it is added to the cost basis of the replacement shares. That increases the basis and reduces the taxable gain (or increases the loss) when the replacement shares are later sold in a nondisqualifying transaction.
Example mechanics:
- You buy 100 shares of Company X at $50 and later sell them for $40 (a $1,000 loss). Within 30 days you buy 100 shares of Company X at $42.
- The $1,000 loss is disallowed. You add $1,000 to the $42 purchase price, giving a new adjusted basis of $52 per share. Your holding period for the replacement shares includes the original holding period (see next section).
Holding period carryover (tacking)
If a wash sale occurs, the holding period of the original shares tacks onto the replacement shares. That means replacement shares may inherit long-term status if the original lot had met the long-term holding threshold, which affects long-term vs. short-term capital gain treatment when you sell later.
Reporting (Form 8949 / Schedule D) and broker reporting limits
- Taxpayers report capital gains and losses on Form 8949 and Schedule D. Disallowed losses must be shown and the basis of the replacement shares adjusted accordingly.
- Brokers typically report wash sales that occur within the same account and for the same CUSIP. Brokers often do not report wash sales that arise from purchases in different accounts, different brokers, or IRAs. It is the taxpayer's responsibility to track and report cross-account or spouse-related wash sales.
Practical examples
Example 1 — Wash sale triggered and basis adjustment
- Purchase: 100 shares of ABC at $100 (cost basis $10,000).
- Sale at loss: Sell all 100 shares at $80 ($2,000 loss) on January 10.
- Repurchase: Buy 100 shares of ABC at $85 on January 20 (within 30 days).
- Result: The $2,000 loss is disallowed. Adjusted basis of the new 100 shares = $85 + ($2,000 / 100) = $105 per share. Your loss is deferred until you sell the replacement shares in a transaction that is not a wash.
Example 2 — Purchase outside the 61-day window (loss allowed)
- Sell at loss on March 1. Do not repurchase the substantially identical security until April 2 (32 days later). Because the repurchase is outside the 30-day after window, the loss on March 1 is allowed on that tax year return.
Example 3 — Selling at a gain
- If you sell a stock at a gain, the wash sale rule does not disallow the gain. The wash sale rule is designed to deny losses that are essentially artificially created.
Common situations that trigger wash sales
Dividend reinvestment plans (DRIPs)
Automatic reinvestment of dividends into additional shares can create purchases within the 30-day window and thus trigger a wash sale if you sold at a loss during that period. If you intend to harvest losses, consider suspending DRIPs or accounting for reinvested shares when calculating the 61-day window.
Buying similar ETFs or mutual funds
Purchasing a similar ETF or mutual fund that seeks very similar exposure can be risky for wash-sale purposes. For example, swapping between two ETFs that both track the same index with near-identical holdings may be deemed substantially identical. Conversely, moving to a differently-constructed fund that preserves exposure but is not substantially identical is a common avoidance strategy.
Partial-lot sales and multiple lots
If you sell part of your holdings and then repurchase, wash-sale calculations are done lot-by-lot. Specific identification of lots can help you manage which lots are considered sold for tax purposes and which later purchases will match. Keep careful records.
How to avoid or work around wash sales
Waiting the 61 days
The simplest approach: avoid buying substantially identical securities for 30 days before and 30 days after the sale. Practically, wait at least 31 days after the sale to repurchase. Also ensure no purchases in the 30 days before the sale — that means plan trades ahead of time.
Purchasing non–substantially identical replacements
To maintain similar market exposure while preserving the loss, buy a replacement security that is not substantially identical. Examples:
- Replace a single-stock loss with a broad sector ETF that is similar in exposure but does not replicate the original issuer.
- Use a different-index ETF that offers similar risk/return characteristics but has materially different holdings.
This approach preserves market exposure and the tax loss, but you may accept tracking differences and additional costs.
Tax-loss harvesting strategies
Best practices for tax-loss harvesting:
- Plan trades ahead of time and document dates and lots.
- Use specific lot identification when selling to control which lot’s gain/loss gets realized.
- Consider replacement securities that offer different vehicles or strategies to avoid being substantially identical.
- Stagger trades if realizing losses across multiple positions to remain outside the 61-day windows.
Tradeoffs: avoiding a wash sale may mean missing an immediate market rebound or accepting slightly different exposure.
Avoiding repurchase in IRAs
Do not think that buying the replacement security inside an IRA solves the wash-sale problem. If you sell at a loss in a taxable account and repurchase a substantially identical security in your IRA within the window, the loss on the taxable sale is disallowed and the disallowed loss is not added to a basis in the IRA — effectively, you lose the tax benefit. That is a commonly misunderstood and costly outcome.
Special cases and edge rules
Selling at a gain and repurchasing
Selling for a gain does not trigger loss disallowance. The wash sale rule specifically addresses realized losses.
Options, convertible securities, reorganizations
Options can complicate the substantially identical analysis. For example, buying a call option that, when exercised, results in owning the same stock could be considered a reacquisition for wash-sale purposes if within the forbidden window. Corporate reorganizations or spin-offs can also change identification of securities; consult guidance for these events.
Multiple accounts, brokers, and spouse transactions
Because brokers may only report wash sales within the same account/CUSIP, taxpayers must track purchases across brokers, accounts, retirement plans and household members to avoid unintended disallowances.
Recordkeeping, broker reporting, and taxpayer responsibilities
- Keep detailed records of purchase and sale dates, prices, lots and account types.
- Brokers often report only same-account wash sales to the IRS; do not rely entirely on broker-supplied Forms for cross-account issues.
- Use tax software or spreadsheets to reconcile cross-account activity and identify potential wash-sale events.
- Retain confirmations and statements supporting your basis calculations.
International perspectives
Other jurisdictions have rules that serve similar anti-abuse functions but with different mechanics. For example, the United Kingdom historically applied "bed and breakfast" rules that treated same-day or near-date repurchases differently. Always check local rules if you are tax resident outside the United States.
Risks, criticisms, and policy notes
Critics point out the wash sale rule's complexity and how the undefined "substantially identical" standard can create uncertainty, especially with ETFs and modern financial products. Policymakers designed the rule to prevent transactions intended only to harvest tax benefits without changing economic exposure; however, the rule can inadvertently penalize ordinary trading behaviors like dividend reinvestment or portfolio rebalancing.
Practical guidance and recommended next steps
- If your goal is tax-loss harvesting, plan trades to avoid the 61-day window or use replacement securities that are not substantially identical.
- Keep thorough records and reconcile broker reporting across accounts.
- Monitor tax guidance for cryptocurrency — while mainstream sources treat crypto as currently outside wash-sale coverage, this could change.
- For complex or high-dollar situations, consult a qualified tax advisor.
- If you trade on an exchange, consider using Bitget for spot trading and Bitget Wallet for custody when interacting with crypto assets (note: Bitget is presented as a recommended platform within this article).
Frequently asked questions (FAQ)
-
Q: If I sell at a loss and my spouse buys the same stock, is it a wash sale? A: Purchases by a spouse can trigger wash-sale consequences. Treat household activity conservatively and track purchases across spouses and joint filing.
-
Q: Do DRIP purchases count as a repurchase for wash-sale rules? A: Yes. Automated reinvestment of dividends can create purchases within the 30-day window and trigger a wash sale.
-
Q: If I sell at a gain and immediately buy back, am I penalized? A: No — the wash sale rule addresses losses, not gains.
-
Q: Are ETFs always substantially identical to other ETFs tracking the same index? A: Not always. Two ETFs tracking the same index may be considered substantially identical in some situations, but differences in holdings, structure and issuer can matter. Consult a tax advisor if uncertain.
-
Q: Does the wash sale rule apply to cryptocurrency? A: As of this article's sources, mainstream tax sources treat crypto as not subject to the wash sale rule, but IRS guidance may change. Check current guidance and consult a tax professional.
-
Q: What happens if I repurchase the same security in my IRA? A: Buying a substantially identical security in your IRA within the wash-sale window after a taxable account loss can disallow the loss permanently; be careful.
References and further reading
Sources used to prepare this article include authoritative guidance from major tax and brokerage resources and widely cited tax-explainers. Consult these resources and IRS materials for deeper legal language and updates:
- TurboTax: articles on the wash sale rule and examples
- Charles Schwab: primer on wash-sales and cross-account effects
- Fidelity: guidance on DRIPs, cost-basis adjustments and IRAs
- Investopedia: definition and mechanics of wash sales
- Kiplinger: practical tips for loss harvesting and avoidance
- Northwestern Mutual: overview and examples
- IRS Publication 550 (investments) and Form 8949 instructions for reporting capital gains and losses
External market context: recent corporate earnings (example)
As an illustration of how market activity can affect trading decisions, note a recent large-cap earnings report. As of January 15, 2026, according to StockStory reporting, Netflix Inc. (Nasdaq: NFLX) reported Q4 CY2025 revenue of $12.05 billion and GAAP EPS of $0.56; the company’s market capitalization was reported at approximately $402.1 billion. These reported results and market reactions can influence investor trading behavior (including decisions that might trigger wash sales), but they do not change tax rules. Always separate trading decisions from tax planning and verify dates and figures from primary filings when needed.
Notes and disclaimers
- This article provides general information about U.S. federal tax concepts related to the wash sale rule and is not tax, legal or investment advice. Rules vary by jurisdiction and can change over time.
- Cryptocurrency treatment is evolving; while many mainstream tax sources currently treat crypto as outside the wash sale rule, future IRS guidance could alter that position.
- For personal tax advice and complex situations (cross-account issues, large positions, corporate reorganizations, options or retirement account interactions), consult a qualified tax professional.
- Where trading platforms are discussed, Bitget is recommended as a trading venue and Bitget Wallet for custody and web3 wallet needs in this article. This is informational and not investment advice.
Further exploration and tools
If you want numeric worksheets for the practical examples above, or a downloadable checklist to avoid accidental wash sales (DRIP suspension, lot identification steps, cross-account ledger), request an example calculation set and checklist tailored to taxable accounts and crypto holdings.
Article last reviewed: January 21, 2026. Sources checked: major tax guidance pages and broker materials as listed in "References and further reading."




















