Wash Sale Loss Calculator
Match a loss sale with one acquisition of substantially identical shares during the 30-days-before through 30-days-after window. The result separates currently allowed loss from disallowed loss and shows how a taxable-account replacement lot can absorb the deferred loss into adjusted basis.
What creates a wash sale
A wash sale generally occurs when stock or securities are sold at a loss and substantially identical stock or securities are acquired within 30 days before or 30 days after the sale. The replacement event can be a purchase, a fully taxable exchange, or acquisition of a contract or option to buy substantially identical property. The sale date sits in the center of a 61-day review window.
The rule defers some or all of the loss; it does not change a loss sale into a gain. When replacement shares are purchased in a taxable account, the disallowed amount is generally added to their basis, and the holding period of the loss shares is carried into the replacement shares. The deferred amount can affect gain or loss when the replacement position is eventually disposed of in a non-wash transaction.
The calculator first verifies that the sale price is below basis, the acquisition date is within 30 calendar days on either side, and “substantially identical” is selected. It then matches no more replacement shares than shares sold. If 100 shares are sold at a loss but only 60 are replaced, loss on 60 shares is disallowed and loss on 40 remains currently recognizable, assuming no other acquisitions.
Taxable-account replacement and IRA replacement are different
Replacement in a taxable account
The matched loss is generally added to the cost of replacement stock or securities. That basis reservoir postpones the deduction. The holding period of the sold shares also carries over to the matched replacement shares, which can affect later short- or long-term status.
Replacement in an IRA or Roth IRA
IRS guidance states that the basis-addition rule does not apply to the IRA replacement described in the wash-sale rule. The taxable-account loss can be disallowed without increasing IRA basis, making the tax cost materially different. This calculator labels the basis result unavailable for that route.
A purchase by a spouse or a corporation the taxpayer controls can also trigger the rule. A broker’s same-account report may not see a spouse’s account, another brokerage, an IRA, an employee stock plan, automatic dividend reinvestment, or an option acquisition. Household-wide records matter even if Form 1099-B box 1g is blank.
How partial-share matching works
When replacement shares are fewer than loss shares, match the replacement shares with an equal number of sold shares. When multiple replacement acquisitions exist, Publication 550 directs taxpayers to match shares in the order the replacement shares were acquired, beginning with the first acquisition. Tax-lot identification on the sale and chronological replacement matching can therefore change which basis and holding period move forward.
This calculator handles one sale lot and one acquisition. It assumes the per-share loss is uniform across the sold lot. If a trade disposed of several lots with different bases, separate each loss lot before matching. If some sale lots generated gains, wash-sale loss from another block generally cannot simply offset same-day gain on identical blocks contrary to the special reporting rules.
Fractional shares from dividend reinvestment can cause a partial wash sale. Even a small automatic purchase inside the window may disallow the corresponding fraction of a loss. The whole transaction is not automatically disallowed merely because one share was replaced; matching is based on quantities.
Determining whether property is substantially identical
Shares of the same company and same class are a clear starting point, but “substantially identical” is a facts-and-circumstances standard. Common stock and preferred stock of one issuer are not automatically identical; convertibility, voting rights, dividend restrictions, and price relationships can matter. Options, warrants, and contracts can trigger the rule when they provide rights to acquire substantially identical securities.
Two diversified funds tracking different indexes may not be substantially identical, but changing ticker symbols alone does not settle the issue. Funds tracking the same index with nearly identical portfolios deserve careful review. Cryptocurrency treatment under current wash-sale statutes is a separate legal question from stock or securities, and proposed legislation or a security classification can change the analysis.
Select “Unsure” when the replacement is not literally the same security. The calculator will conservatively show the potential match but flag that legal classification requires review. It should not be used to bless a tax-loss harvesting pair.
A chronological review process for real accounts
- Identify each sale lot with a loss. Reconcile proceeds, basis, adjustments, and share quantity. Wash-sale rules are irrelevant to a lot sold at a gain.
- Open the full 61-day window. Review acquisitions from 30 days before through 30 days after the sale, including the sale date. Look beyond the selling account.
- Classify substantially identical positions. Include direct purchases, reinvestments, spouse transactions, controlled-corporation activity, options, and retirement-account acquisitions that meet the rule.
- Match shares chronologically. Apply replacement acquisitions in order and allocate the per-share loss. Preserve which sold holding period moves to which taxable replacement lot.
- Report and maintain basis. Form 8949 generally uses code W and a positive adjustment for the disallowed loss. Update records even if the broker does not.
Example: 100 shares sold and 60 replaced
Assume 100 shares have a $50 per-share basis and are sold for $40 each on December 20. The economic and tax loss before the wash-sale rule is $10 per share, or $1,000. The taxpayer purchases 60 substantially identical shares for $42 each on January 5, sixteen days after the sale.
The acquisition falls inside the 30-day-after period, so 60 sold shares are matched. A $600 loss is disallowed and $400 remains allowed, assuming no other replacement acquisitions. The 60 replacement shares cost $2,520. In a taxable account, adding the $600 deferred loss creates a $3,120 adjusted basis, or $52 per replacement share. Their holding period includes the holding period of the matched sold shares.
If the 60 shares were acquired by the taxpayer’s IRA, the $600 would still be disallowed, but the calculator would not add it to IRA basis. If another 40 shares were purchased later within the window, a second calculation would be required and the rest of the loss might also be disallowed.
Reporting limits of Form 1099-B
A broker generally reports a wash-sale adjustment in box 1g for covered securities when substantially identical stock with the same CUSIP was bought in the same account. That reporting scope is narrower than the taxpayer’s legal responsibility. Cross-broker purchases, spouse purchases, IRA acquisitions, and securities that are substantially identical without sharing the reporting identifier can be missed.
Form 8949 reporting generally enters “W” in column (f) and the disallowed loss as a positive adjustment in column (g). The adjusted gain or loss then flows through Schedule D. A taxpayer should not delete a legitimate broker adjustment merely because shares were later sold; instead, trace the replacement basis and any subsequent transaction.
Broker basis can also become unreliable after account transfers. Keep a wash-sale ledger showing the original sale, matched shares, disallowed loss, replacement account, basis adjustment, and carried holding period. This information may be needed years later.
Tax-loss harvesting without accidental replacement
A common control is to turn off automatic dividend reinvestment before harvesting and review scheduled purchases in every account. Waiting more than 30 days after the loss sale is not enough if substantially identical shares were purchased during the 30 days before the sale; the lookback is symmetrical.
Investors may choose a non-identical exposure during the waiting period, but investment similarity and tax “substantial identity” are not the same test. The replacement should fit the portfolio rather than exist solely for a tax result. Transaction costs, bid-ask spreads, tracking differences, and market movement can outweigh the expected tax value.
A disallowed wash-sale loss is often deferred rather than destroyed in a taxable replacement lot. Still, deferral changes timing, and an IRA replacement can prevent the normal basis recovery. Model the after-tax outcome rather than treating every disallowance as a permanent loss or every harvest as immediate savings.
Questions investors ask about wash sales
Is the window 30 days or 61 days?
It includes 30 days before the loss sale, the sale date, and 30 days after it—a 61-day review period. An acquisition on either boundary can matter.
Does replacing fewer shares disallow the entire loss?
Not automatically. Replacement shares are matched by quantity. With one uniform loss lot, replacing 40 of 100 shares generally disallows loss attributable to 40 shares, subject to other acquisitions.
Can a purchase in my spouse’s account trigger the rule?
Yes. IRS Publication 550 includes a spouse’s purchase of substantially identical stock among transactions that can produce a wash sale. Same-account broker reporting is not the full legal test.
When do I recover a taxable-account disallowed loss?
The disallowed amount is generally added to the replacement shares’ basis, postponing recognition until those shares are disposed of in a transaction that allows the loss. Later wash sales can continue the deferral.
Does the calculator decide whether two ETFs are substantially identical?
No. That classification depends on facts and legal interpretation. Use “Unsure” and review index, holdings, rights, structure, and applicable guidance with a qualified adviser.
References
Core wash-sale, matching, basis, IRA, and reporting rules: IRS Publication 550, Investment Income and Expenses. Transaction reporting: IRS Instructions for Form 8949.
Planning notice: This calculator models one uniform loss lot and one replacement acquisition. It does not determine substantial identity, reconstruct multi-account chronological matching, classify cryptocurrency, apply straddle rules, model short sales, or prepare Form 8949. Review all household and controlled-entity accounts.