Wash Sale Rule Calculator
Accurately determine disallowed losses and adjusted cost basis for tax purposes.
Wash Sale Rule Calculator
The date you originally bought the shares you later sold at a loss.
The date you sold the shares at a loss.
The quantity of shares sold at a loss.
The original cost per share of the shares sold at a loss.
The price per share at which you sold the shares at a loss.
The date you repurchased substantially identical shares.
The quantity of substantially identical shares repurchased. Enter 0 if no repurchase.
The price per share at which you repurchased the shares.
Calculation Results
$0.00
No Wash Sale
$0.00
N/A
Wash Sale Impact Visualization
This chart illustrates the original cost, sale price, repurchase price, and the impact of the wash sale on your total loss and disallowed loss.
Transaction Summary
| Transaction Type | Date | Shares | Price/Share | Total Value | Loss/Gain |
|---|
Detailed breakdown of your loss sale and repurchase transactions.
What is the Wash Sale Rule?
The Wash Sale Rule is a critical provision in U.S. tax law designed to prevent taxpayers from claiming artificial losses on investments for tax purposes. It specifically targets situations where an investor sells a security at a loss and then repurchases the “substantially identical” security within a 61-day window. This window includes 30 days before the sale, the day of the sale itself, and 30 days after the sale.
When a wash sale occurs, the IRS disallows the loss claimed on the sale. Instead of being lost entirely, this disallowed loss is added to the cost basis of the newly acquired, substantially identical security. This adjustment effectively defers the loss rather than eliminating it, impacting future capital gains or losses when the repurchased security is eventually sold.
Who Should Use the Wash Sale Rule Calculator?
Anyone who trades securities, especially those engaging in tax loss harvesting, should understand and use a Wash Sale Rule Calculator. This includes:
- Individual Investors: To ensure compliance with IRS regulations when selling investments at a loss.
- Day Traders and Active Investors: Who frequently buy and sell securities and are at higher risk of inadvertently triggering a wash sale.
- Financial Advisors and Tax Professionals: To assist clients in accurately reporting their investment transactions and avoiding penalties.
- Anyone Planning Tax Loss Harvesting: To strategically plan sales and repurchases to maximize tax benefits without violating the rule.
Common Misconceptions About the Wash Sale Rule
- “It only applies to stocks”: The rule applies to stocks, bonds, mutual funds, exchange-traded funds (ETFs), and options, as long as they are “substantially identical.”
- “It only applies if I buy the exact same stock”: The term “substantially identical” is broader than just the same ticker symbol. It can include convertible bonds, preferred stock, or even options on the same underlying security if they are considered equivalent.
- “It only applies if I repurchase in the same account”: The rule applies across all your accounts, including IRAs, Roth IRAs, and even accounts owned by your spouse.
- “I can just wait 31 days”: While waiting 31 days avoids the wash sale, it’s crucial to understand the full 61-day window (30 days before, the sale day, and 30 days after).
- “The loss is gone forever”: The loss is not gone; it’s deferred. It’s added to the cost basis of the repurchased shares, which will reduce future capital gains or increase future capital losses.
Wash Sale Rule Calculator Formula and Mathematical Explanation
Understanding the mechanics behind the Wash Sale Rule Calculator is key to navigating its implications. The core principle is to identify if a loss was realized and if a “substantially identical” security was acquired within the prohibited period.
Step-by-Step Derivation:
- Calculate Initial Loss:
Loss Per Share = Cost Basis per Share (Loss Sale) - Sale Price per Share (Loss Sale)Total Realized Loss = Loss Per Share × Number of Shares Sold at Loss- If Total Realized Loss is not positive, no wash sale can occur.
- Determine Wash Sale Window:
- The wash sale period is 61 days: 30 days before the Date of Loss Sale, the Date of Loss Sale itself, and 30 days after the Date of Loss Sale.
Wash Sale Window Start Date = Date of Loss Sale - 30 daysWash Sale Window End Date = Date of Loss Sale + 30 days
- Check for Repurchase within Window:
- If the Date of Repurchase falls within the
Wash Sale Window Start DateandWash Sale Window End Date, a potential wash sale exists.
- If the Date of Repurchase falls within the
- Calculate Disallowed Loss:
Shares Subject to Wash Sale = MIN(Number of Shares Sold at Loss, Number of Shares Repurchased)Disallowed Loss Amount = Shares Subject to Wash Sale × Loss Per Share- If no repurchase or repurchase outside the window, Disallowed Loss Amount is $0.
- Calculate Adjusted Cost Basis:
- The disallowed loss is added to the cost basis of the repurchased shares.
Adjusted Cost Basis of Repurchased Shares = (Number of Shares Repurchased × Repurchase Price per Share) + Disallowed Loss Amount
- Determine Effective Holding Period Start Date:
- If a wash sale occurs, the holding period of the repurchased shares includes the holding period of the original shares sold at a loss. Therefore, the
Effective Holding Period Start Datebecomes theOriginal Purchase Date (Loss Shares). - If no wash sale, the
Effective Holding Period Start Dateis simply theDate of Repurchase.
- If a wash sale occurs, the holding period of the repurchased shares includes the holding period of the original shares sold at a loss. Therefore, the
Variable Explanations and Table:
The following variables are used in the Wash Sale Rule Calculator to perform its calculations:
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| Original Purchase Date (Loss Shares) | Date when the shares sold at a loss were initially acquired. | Date | Any valid date |
| Date of Loss Sale | The specific date the security was sold at a loss. | Date | Any valid date |
| Number of Shares Sold at Loss | The quantity of shares sold that resulted in a loss. | Shares | 1 to 1,000,000+ |
| Cost Basis per Share (Loss Sale) | The original cost per share of the security sold at a loss. | Currency ($) | $0.01 to $10,000+ |
| Sale Price per Share (Loss Sale) | The price per share at which the security was sold. | Currency ($) | $0.01 to $10,000+ |
| Date of Repurchase | The date when substantially identical securities were bought back. | Date | Any valid date |
| Number of Shares Repurchased | The quantity of substantially identical shares bought back. | Shares | 0 to 1,000,000+ |
| Repurchase Price per Share | The price per share at which the substantially identical security was repurchased. | Currency ($) | $0.01 to $10,000+ |
Practical Examples (Real-World Use Cases)
Let’s illustrate how the Wash Sale Rule Calculator works with a couple of scenarios.
Example 1: Clear Wash Sale
Sarah bought 100 shares of XYZ stock on January 1, 2023, for $50 per share. On March 15, 2023, she sold all 100 shares for $40 per share, realizing a loss. Hoping for a rebound, she repurchased 100 shares of XYZ stock on March 25, 2023, for $42 per share.
- Original Purchase Date (Loss Shares): 2023-01-01
- Date of Loss Sale: 2023-03-15
- Number of Shares Sold at Loss: 100
- Cost Basis per Share (Loss Sale): $50.00
- Sale Price per Share (Loss Sale): $40.00
- Date of Repurchase: 2023-03-25
- Number of Shares Repurchased: 100
- Repurchase Price per Share: $42.00
Outputs:
- Total Realized Loss: ($50 – $40) * 100 = $1,000
- Wash Sale Period Status: Yes, a wash sale occurred (repurchase within 30 days after sale).
- Disallowed Loss Amount: $1,000 (since 100 shares were repurchased)
- Adjusted Cost Basis of Repurchased Shares: (100 * $42) + $1,000 = $4,200 + $1,000 = $5,200
- Effective Holding Period Start Date for Repurchased Shares: 2023-01-01 (inherits original holding period)
Interpretation: Sarah cannot claim the $1,000 loss for 2023. Instead, the cost basis of her new 100 shares is adjusted from $4,200 to $5,200. This means when she eventually sells these new shares, her taxable gain will be $1,000 lower (or her loss $1,000 higher).
Example 2: No Wash Sale (Repurchase Outside Window)
David bought 200 shares of ABC stock on February 1, 2023, for $75 per share. On April 10, 2023, he sold all 200 shares for $60 per share, realizing a loss. He waited until May 15, 2023, to repurchase 150 shares of ABC stock for $62 per share.
- Original Purchase Date (Loss Shares): 2023-02-01
- Date of Loss Sale: 2023-04-10
- Number of Shares Sold at Loss: 200
- Cost Basis per Share (Loss Sale): $75.00
- Sale Price per Share (Loss Sale): $60.00
- Date of Repurchase: 2023-05-15
- Number of Shares Repurchased: 150
- Repurchase Price per Share: $62.00
Outputs:
- Total Realized Loss: ($75 – $60) * 200 = $3,000
- Wash Sale Period Status: No Wash Sale (repurchase on May 15 is outside the 61-day window around April 10).
- Disallowed Loss Amount: $0.00
- Adjusted Cost Basis of Repurchased Shares: (150 * $62) = $9,300 (no adjustment)
- Effective Holding Period Start Date for Repurchased Shares: 2023-05-15 (new holding period starts)
Interpretation: David can claim the full $3,000 loss for tax purposes in 2023 because his repurchase occurred outside the wash sale window. The cost basis of his new 150 shares remains $9,300, and their holding period starts from May 15, 2023.
How to Use This Wash Sale Rule Calculator
Our Wash Sale Rule Calculator is designed for ease of use, providing clear insights into potential wash sale implications. Follow these steps to get your results:
- Enter Original Purchase Date (Loss Shares): Input the date you initially bought the shares that you later sold at a loss.
- Enter Date of Loss Sale: Provide the exact date you sold the shares at a loss.
- Enter Number of Shares Sold at Loss: Input the total quantity of shares you sold at a loss.
- Enter Cost Basis per Share (Loss Sale): Input the original cost per share of the shares you sold at a loss.
- Enter Sale Price per Share (Loss Sale): Input the price per share at which you sold the shares.
- Enter Date of Repurchase: Input the date you repurchased substantially identical shares. If you did not repurchase, you can leave this blank or enter a date far outside the window.
- Enter Number of Shares Repurchased: Input the quantity of substantially identical shares you repurchased. Enter ‘0’ if no repurchase.
- Enter Repurchase Price per Share: Input the price per share at which you repurchased the shares.
- Click “Calculate Wash Sale”: The calculator will automatically update the results in real-time as you adjust inputs.
- Review Results: Examine the “Calculation Results” section for the primary disallowed loss, total realized loss, wash sale status, adjusted cost basis, and effective holding period.
- Use “Reset” and “Copy Results”: The “Reset” button clears all fields to default values, while “Copy Results” allows you to easily transfer the output for your records.
How to Read Results:
- Disallowed Loss Amount: This is the most critical output. If greater than $0, it indicates the portion of your loss that cannot be claimed for tax purposes in the current year.
- Total Realized Loss: The full loss you incurred from the sale before any wash sale adjustments.
- Wash Sale Period Status: Clearly states whether a wash sale occurred based on your input dates.
- Adjusted Cost Basis of Repurchased Shares: This is the new cost basis for the shares you repurchased, which includes the disallowed loss. This figure is crucial for calculating future gains or losses.
- Effective Holding Period Start Date for Repurchased Shares: Shows the date from which the holding period for your repurchased shares is considered to have begun. This impacts whether future sales are short-term or long-term capital gains/losses.
Decision-Making Guidance:
Using the Wash Sale Rule Calculator helps you make informed decisions:
- Tax Loss Harvesting Strategy: Plan your sales and repurchases carefully to avoid inadvertently triggering a wash sale and losing immediate tax benefits.
- Record Keeping: Use the results to accurately report your transactions on IRS Form 8949 and Schedule D.
- Future Planning: Understand how the adjusted cost basis will affect your future tax liabilities when you eventually sell the repurchased securities.
Key Factors That Affect Wash Sale Rule Results
Several factors play a crucial role in determining whether a transaction constitutes a wash sale and how the Wash Sale Rule Calculator will interpret your inputs:
- Timing of Repurchase: This is the most critical factor. The 61-day window (30 days before, the sale date, and 30 days after) is strictly enforced. Even a single day outside this window can mean the difference between a disallowed loss and a deductible one.
- “Substantially Identical” Securities: The IRS defines this broadly. It’s not just the exact same stock. It can include options, convertible bonds, or even different classes of stock from the same company if they are considered equivalent. For example, buying an ETF that tracks the same index as a mutual fund you just sold at a loss could trigger a wash sale.
- Quantity of Repurchased Shares: If you repurchase fewer shares than you sold at a loss, only a proportional amount of the loss is disallowed. The Wash Sale Rule Calculator accounts for this by taking the minimum of shares sold and repurchased.
- Type of Account: The wash sale rule applies across all your accounts, including taxable brokerage accounts, IRAs, Roth IRAs, and even accounts owned by your spouse. Repurchasing in an IRA after selling in a taxable account at a loss will still trigger the rule, but the disallowed loss cannot be added to the IRA’s basis.
- Intent: Unlike some tax rules, the wash sale rule is objective. Your intent (whether you meant to trigger a wash sale or not) does not matter. If the conditions are met, the rule applies.
- Tax Implications: The primary effect is the deferral of the loss. While not immediately deductible, the disallowed loss increases the cost basis of the new shares, reducing future capital gains or increasing future capital losses. This can impact your overall capital gains tax calculator results.
- Holding Period Adjustment: If a wash sale occurs, the holding period of the original shares is added to the holding period of the repurchased shares. This is crucial for determining whether a future sale will result in short-term or long-term capital gains/losses, which are taxed at different rates.
Frequently Asked Questions (FAQ)
Q: What exactly is a “substantially identical” security?
A: The IRS does not provide a precise definition, but generally, it refers to securities that are not identical but are so similar in terms of their rights, privileges, and features that they are considered interchangeable. This can include common stock and preferred stock of the same corporation, or even options to buy or sell stock. It’s a complex area, and if in doubt, it’s best to consult a tax professional or assume they are substantially identical to be safe.
Q: Does the wash sale rule apply if I sell a stock at a loss and then buy a different stock in a different company?
A: No, the wash sale rule only applies if you repurchase a “substantially identical” security. If you sell Apple stock at a loss and buy Microsoft stock, it’s not a wash sale because Apple and Microsoft stocks are not substantially identical.
Q: What if I sell at a loss in my taxable brokerage account and repurchase in my IRA?
A: Yes, this is a common trap. The wash sale rule applies across all your accounts, including IRAs. If you repurchase in an IRA, the loss is still disallowed, but you cannot add the disallowed loss to the basis of the shares in your IRA. This means the loss is effectively lost forever for tax purposes, making it a particularly punitive outcome.
Q: Can I avoid a wash sale by buying shares from a different broker?
A: No, the wash sale rule applies to you as an individual taxpayer, regardless of which brokerage account or firm you use for the transactions. The IRS looks at your overall activity.
Q: What happens if I repurchase fewer shares than I sold at a loss?
A: If you repurchase fewer shares, only the loss attributable to the number of repurchased shares is disallowed. For example, if you sell 200 shares at a loss but only repurchase 100 shares, only the loss on those 100 shares is disallowed. The loss on the remaining 100 shares can still be claimed.
Q: Does the wash sale rule apply to gains?
A: No, the wash sale rule only applies to sales made at a loss. If you sell a security for a gain and repurchase it within the 61-day window, there are no wash sale implications.
Q: How does the wash sale rule affect my holding period?
A: If a wash sale occurs, the holding period of the original shares sold at a loss is added to the holding period of the newly acquired, substantially identical shares. This means your new shares effectively inherit the old holding period, which can be important for determining if a future sale results in short-term or long-term capital gains/losses.
Q: Is there a way to “undo” a wash sale?
A: Once a wash sale occurs, the loss is disallowed. You cannot “undo” it. However, by understanding the rule, you can plan future transactions to avoid it. For example, if you want to repurchase a security after selling it at a loss, simply wait at least 31 days after the sale date before repurchasing.
Related Tools and Internal Resources
To further assist you in managing your investments and understanding tax implications, explore our other helpful financial calculators and resources: