Wash Sale Calculator Software




Wash Sale Calculator Software: Calculate Disallowed Loss & Adjusted Cost Basis


Wash Sale Calculator Software

Determine your disallowed loss and adjusted cost basis for tax purposes.



The price you sold each share for at a loss.


The total number of shares sold in the transaction that resulted in a loss.


The original cost basis per share for the shares you sold.


The price you paid for the new, substantially identical shares.


Number of shares repurchased within the 30-day window before or after the sale.


Disallowed Loss

$0.00

Initial Loss on Sale

$0.00

New Adjusted Cost Basis

$0.00

New Basis Per Share

$0.00

Formula Explanation: The wash sale rule prevents you from claiming a tax loss if you buy a “substantially identical” security within 30 days before or after the sale. The disallowed loss is not permanently lost; instead, it is added to the cost basis of the new replacement shares, deferring the tax consequence until you sell the new position.

What is a Wash Sale?

A wash sale occurs when you sell or trade a security (like a stock or option) at a loss and, within 30 days before or after the sale, you buy a “substantially identical” security. The IRS wash sale rule, found in section 1091 of the Internal Revenue Code, prohibits taxpayers from deducting that loss on their tax return. This rule covers a 61-day window: the 30 days before the sale, the day of the sale, and the 30 days after the sale. [2, 6]

The purpose of this rule is to prevent investors from creating artificial losses for tax benefits without genuinely changing their investment position. For instance, selling a stock for a loss on December 30th to lower your taxes and then buying it back on January 2nd would be a classic wash sale. Our wash sale calculator software helps you easily identify and calculate the impact of these transactions.

The Wash Sale Formula and Explanation

While the disallowed loss can’t be claimed immediately, it’s not gone forever. The amount of the disallowed loss is added to the cost basis of the newly acquired (replacement) shares. This effectively postpones the loss deduction until the replacement shares are sold. [5]

The core calculations are:

  • Initial Loss = (Sale Price per Share – Original Purchase Price per Share) * Number of Shares Sold
  • Disallowed Loss = (Original Purchase Price per Share – Sale Price per Share) * Number of Wash Sale Shares
  • Adjusted Cost Basis for New Shares = (Repurchase Price * Repurchase Shares) + Disallowed Loss
  • New Cost Basis Per Share = Adjusted Cost Basis for New Shares / Repurchase Shares

This wash sale calculator software performs these precise calculations for you. For an even deeper dive, a cost basis calculator can help you with more complex scenarios.

Table of Variables Used in Wash Sale Calculations
Variable Meaning Unit Typical Range
Sale Price The price per share at which the security was sold. Currency ($) $0.01 – $10,000+
Original Purchase Price The cost basis per share of the security that was sold. Currency ($) $0.01 – $10,000+
Repurchase Price The price per share paid for the new, replacement security. Currency ($) $0.01 – $10,000+
Number of Shares The quantity of shares involved in the sale and repurchase. Shares (unitless) 1 – 1,000,000+
Disallowed Loss The total loss from the sale that cannot be claimed for tax purposes in the current period. Currency ($) Calculated Value

Practical Examples

Example 1: Full Wash Sale

An investor buys 100 shares of XYZ stock at $50 per share. A month later, they sell all 100 shares at $45 per share, realizing a loss of $500. Two weeks after the sale, they repurchase 100 shares of XYZ at $48 per share.

  • Inputs: Sale Price=$45, Sale Shares=100, Original Purchase Price=$50, Repurchase Price=$48, Repurchase Shares=100.
  • Initial Loss: ($45 – $50) * 100 = -$500.
  • Result: Because the investor repurchased the same number of shares within 30 days, the entire $500 loss is disallowed. This $500 is added to the cost basis of the new shares. The new adjusted cost basis is ($48 * 100) + $500 = $5,300, or $53 per share.

Example 2: Partial Wash Sale

An investor sells 100 shares at a loss of $5 per share (a $500 total loss). Within the wash sale window, they only repurchase 50 shares of the same stock.

  • Inputs: Sale Price=$45, Sale Shares=100, Original Purchase Price=$50, Repurchase Shares=50.
  • Result: Since only half the shares were replaced, only half the loss is disallowed. The disallowed loss is $5 * 50 shares = $250. The remaining $250 loss on the other 50 shares can be claimed on their taxes. The $250 disallowed loss is added to the cost basis of the 50 new shares.

How to Use This Wash Sale Calculator Software

Using our wash sale calculator software is straightforward:

  1. Enter Sale Details: Input the price per share you sold the security for and the number of shares sold.
  2. Enter Purchase Details: Provide the original purchase price per share for the shares you sold.
  3. Enter Repurchase Details: Input the price and number of shares you repurchased within the 61-day window.
  4. Review Results: The calculator will instantly show the total disallowed loss, your initial loss on the sale, and the new adjusted cost basis for your replacement shares. This is crucial for accurate tax reporting.

Understanding these figures is key to proper tax loss harvesting strategies and can be visualized with an investment return calculator that accounts for tax implications.

Key Factors That Affect a Wash Sale

  • The 61-Day Window: This is the most critical factor. The rule applies to purchases made 30 days before and 30 days after the sale that generated the loss. [9]
  • “Substantially Identical” Securities: This is not strictly defined by the IRS but generally includes stock of the same company. It can also include options, warrants, or convertible bonds of that same company. [1]
  • Number of Shares Repurchased: If you repurchase fewer shares than you sold, the wash sale rule only applies to the number of shares you repurchased. [8]
  • Multiple Accounts: The wash sale rule applies across all of your accounts, including IRAs, brokerage accounts, and even your spouse’s account. [1]
  • IRA and Roth IRA Transactions: If you sell a security at a loss in a taxable account and buy a substantially identical one in your IRA, the loss is disallowed permanently. You cannot add the loss to the IRA’s cost basis. [11]
  • FIFO vs. Specific Lot Identification: The accounting method used by your broker (First-In, First-Out vs. identifying specific shares) can affect which lots are considered sold, potentially triggering a wash sale unexpectedly. [7]

For a broader view of your financial health, consider using a portfolio analysis tools.

Frequently Asked Questions (FAQ)

1. What is the main purpose of the wash sale rule?
The rule exists to prevent investors from claiming tax losses on securities they haven’t truly parted with, ensuring that claimed losses reflect a genuine change in economic position. [2]
2. Does the wash sale rule apply to gains?
No, the rule only applies to losses. Gains on sales are always taxable, regardless of subsequent purchases.
3. What happens to the disallowed loss?
The disallowed loss is added to the cost basis of the replacement shares. This defers the tax impact until you sell the new shares. [5]
4. What does “substantially identical” really mean?
While stock of the same company is clearly identical, the IRS can also consider convertible bonds, preferred stock, or options of the same company as substantially identical. Stock of two different companies in the same sector is generally not considered identical. [9]
5. Do wash sale rules apply to cryptocurrencies?
Historically, the wash sale rule did not apply to cryptocurrency because the IRS classified it as property, not a security. However, tax laws are evolving, and it’s critical to consult a tax professional for the latest guidance.
6. How can I avoid a wash sale?
The simplest way is to wait at least 31 days after selling at a loss before repurchasing the same or a substantially identical security. Alternatively, you can purchase a similar but not “substantially identical” security, like an ETF from a different provider that tracks the same index.
7. What if I buy more shares *before* selling at a loss?
The rule still applies. The window is 30 days *before* or after the sale. Buying shares and then selling older shares at a loss within 30 days will trigger the wash sale rule. This is a common practice known as “doubling up.” [10]
8. Can my broker’s 1099-B be wrong about wash sales?
Yes. Brokers are required to report wash sales within a single account, but they typically cannot track activity across different brokerage firms or in your spouse’s account. The ultimate responsibility for correct reporting lies with the taxpayer. Our wash sale calculator software helps you manage this. You might also want to review your portfolio with a stock profit calculator. [15]

© 2026 Your Company Name. All Rights Reserved. This calculator is for informational purposes only and does not constitute financial or tax advice. Consult with a qualified professional before making any financial decisions.



Leave a Reply

Your email address will not be published. Required fields are marked *