📐 Math

Wash Sale Calculator

Free wash sale calculator — instant accurate results with step-by-step breakdown. No signup required.

⚡ Free to use 📱 Mobile friendly 🕒 Updated: June 03, 2026
🧮 Wash Sale Calculator
📊 Disallowed Losses by Wash Sale Trigger Date

What is Wash Sale Calculator?

A Wash Sale Calculator is a specialized financial tool designed to determine the disallowed loss and adjusted cost basis when a taxpayer sells a security at a loss and repurchases a substantially identical security within a 61-day window (30 days before and 30 days after the sale). This calculation is critical for accurate tax reporting, as the Internal Revenue Service (IRS) under the Wash Sale Rule (IRS Section 1091) prohibits claiming a capital loss on such transactions to prevent taxpayers from manufacturing tax-deductible losses while maintaining their investment position.

Active traders, day traders, and long-term investors who engage in tax-loss harvesting rely heavily on this calculator to avoid costly IRS penalties and ensure compliance with complex tax regulations. Without proper calculation, traders may inadvertently overstate their capital losses, leading to underpayment of taxes and potential audits. The tool matters because even a single wash sale can cascade through multiple lots, creating a web of adjusted cost bases that are nearly impossible to track manually across hundreds of trades.

This free online Wash Sale Calculator eliminates manual spreadsheet errors by instantly computing disallowed losses, adjusted basis of replacement shares, and the holding period reset. It provides a transparent, step-by-step breakdown of each calculation, making it accessible for both novice investors and seasoned professionals without requiring any registration or software installation.

How to Use This Wash Sale Calculator

Using this Wash Sale Calculator is straightforward and requires only basic trade data. The tool is designed to handle single-lot and multi-lot scenarios, including partial share repurchases, with real-time validation to prevent input errors. Follow these five steps to get accurate results in seconds.

  1. Enter the Sale Date: Input the exact date you sold the security at a loss. This date anchors the 61-day wash sale window. The calculator automatically computes the 30-day lookback period (before the sale) and the 30-day forward period (after the sale) to identify any repurchases of substantially identical securities.
  2. Input Sale Details: Enter the number of shares sold and the sale price per share. Then provide your cost basis per share (the price you originally paid). The calculator will compute the realized loss as (Sale Price – Cost Basis) × Shares Sold. Ensure you use the per-share cost basis, not total cost, for accurate adjustments.
  3. Specify Repurchase Information: If you repurchased any shares of the same or substantially identical security within the 61-day window, enter the repurchase date, number of shares bought, and purchase price per share. You can add multiple repurchase lots if you bought shares on different dates. The tool supports up to 10 repurchase lots for complex trading patterns.
  4. Review the Disallowed Loss Calculation: After clicking "Calculate," the tool displays the total disallowed loss—this is the portion of your realized loss that the IRS will not allow you to deduct. The disallowed loss equals the lesser of your realized loss or the cost of repurchased shares (when repurchased shares are fewer than sold shares).
  5. Check Adjusted Cost Basis and Holding Period: The final output shows the adjusted cost basis of your replacement shares. This is calculated as the original purchase price of the replacement shares plus the disallowed loss allocated to those shares. The holding period for those shares resets to the repurchase date, meaning they are treated as short-term even if you held the original shares long-term.

For best accuracy, ensure all dates are in MM/DD/YYYY format and that you include both the sale and repurchase transactions. If you sold multiple lots at a loss on the same day, process each lot separately to account for individual cost bases. The tool also includes a "Clear All" button to reset inputs for new calculations.

Formula and Calculation Method

The Wash Sale Calculator uses a deterministic algorithm based on IRS Section 1091 regulations. The core formula adjusts the cost basis of replacement shares by adding the disallowed loss, ensuring the economic loss is deferred rather than eliminated. The method prioritizes the order of repurchases (FIFO by default) and handles partial matching when repurchased shares are fewer than sold shares.

Formula
Disallowed Loss = min(Realized Loss, (Number of Replacement Shares × Sale Price per Share))

Adjusted Basis per Replacement Share = Original Purchase Price of Replacement Share + (Disallowed Loss / Number of Replacement Shares)

Realized Loss = (Sale Price per Share – Cost Basis per Share) × Number of Shares Sold

Each variable in the formula plays a distinct role in determining the tax impact. The realized loss is the actual economic loss you incurred on the sale. The disallowed loss is the portion the IRS prohibits from deduction. The adjusted basis ensures the loss is deferred to the eventual sale of the replacement shares.

Understanding the Variables

The Sale Price per Share is the net proceeds you received per share, excluding commissions or fees (which are separately accounted for in your cost basis). The Cost Basis per Share includes the purchase price plus any commissions, fees, or adjustments from previous wash sales. The Number of Shares Sold must be an integer or fractional share; fractional shares are rounded to four decimal places for accuracy. The Number of Replacement Shares refers to shares of the same security or a substantially identical security (such as options or ETFs tracking the same index) bought within the 61-day window. The Original Purchase Price of Replacement Share is the price you paid for the replacement shares, before any wash sale adjustments.

Step-by-Step Calculation

First, compute the Realized Loss by subtracting the cost basis from the sale price, then multiplying by shares sold. For example, if you sold 100 shares at $45 each with a cost basis of $50 each, your realized loss is ($45 – $50) × 100 = -$500. Next, identify the Total Cost of Replacement Shares by multiplying the number of replacement shares by the sale price per share. If you repurchased 50 shares at $48 each, the cost is 50 × $45 = $2,250 (using sale price for comparison). The Disallowed Loss is the lesser of the realized loss ($500) and the replacement cost ($2,250), so $500 is disallowed. Finally, the Adjusted Basis per replacement share is the original purchase price ($48) plus the disallowed loss allocated per share ($500 / 50 = $10), resulting in an adjusted basis of $58 per share. This means when you eventually sell the replacement shares, your cost basis is $58, not $48, deferring the $500 loss.

Example Calculation

Let's walk through a realistic scenario that a day trader might encounter. Imagine you are actively trading shares of Apple Inc. (AAPL) and want to tax-loss harvest a losing position while staying invested.

Example Scenario: On March 15, 2025, you sold 200 shares of AAPL at $150 per share. You originally purchased these shares on January 10, 2025, at $175 per share (cost basis). On March 20, 2025 (5 days after the sale), you repurchased 150 shares of AAPL at $155 per share. No other trades occurred in the 61-day window.

Step 1: Calculate Realized Loss. Sale price ($150) – Cost basis ($175) = -$25 per share loss. Multiply by 200 shares = -$5,000 realized loss.

Step 2: Determine Replacement Cost. You repurchased 150 shares. The replacement cost for comparison is 150 shares × $150 sale price = $22,500. Note: The calculator uses the sale price, not the repurchase price, for the matching test per IRS rules.

Step 3: Compute Disallowed Loss. The disallowed loss is the lesser of $5,000 (realized loss) and $22,500 (replacement cost). Therefore, $5,000 is disallowed. However, since you only repurchased 150 shares out of 200 sold, the disallowed loss is prorated: ($5,000 × 150/200) = $3,750. The remaining $1,250 loss is allowed and can be deducted on your tax return.

Step 4: Adjust Cost Basis of Replacement Shares. Original purchase price of replacement shares: $155 per share. Disallowed loss per share: $3,750 / 150 shares = $25 per share. Adjusted basis = $155 + $25 = $180 per share. Your new cost basis for the 150 replacement shares is $180 each, totaling $27,000. The holding period resets to March 20, 2025, making these shares short-term regardless of the original long-term holding period.

Result: You cannot deduct $3,750 of the loss this tax year. That loss is added to the cost basis of your replacement shares, deferring it to a future sale. You can deduct $1,250 on your current tax return.

Another Example

Consider a different scenario involving partial repurchase and multiple lots. On June 1, 2025, you sold 500 shares of XYZ Corp at $20 per share, with a cost basis of $30 per share (realized loss = -$5,000). On June 10, 2025, you repurchased 300 shares at $22 per share. On June 25, 2025, you repurchased another 200 shares at $19 per share. Both repurchases fall within the 61-day window. The calculator processes each repurchase in chronological order. First repurchase: 300 shares matched against 500 sold. Disallowed loss = $5,000 × (300/500) = $3,000. Adjusted basis for those 300 shares = $22 + ($3,000/300) = $32 per share. Remaining disallowed loss from first match: $5,000 – $3,000 = $2,000. Second repurchase: 200 shares matched. Disallowed loss = $2,000 (since 200 shares × $20 sale price = $4,000, and $2,000 is less). Adjusted basis for second lot = $19 + ($2,000/200) = $29 per share. Total disallowed loss = $5,000. No allowed loss. Your cost basis for the 500 replacement shares is now a blend: 300 shares at $32 and 200 shares at $29, with reset holding periods.

Benefits of Using Wash Sale Calculator

This free Wash Sale Calculator delivers tangible advantages that save time, reduce tax liability errors, and empower informed trading decisions. Whether you're a high-frequency trader or a buy-and-hold investor, these benefits directly impact your bottom line and compliance confidence.

  • Eliminates Manual Calculation Errors: Spreadsheet errors are common when tracking multiple trades across different accounts. Manual calculations often miss partial matching, FIFO sequencing, or holding period resets. This calculator uses IRS-validated logic to ensure every disallowed loss and adjusted basis is mathematically correct, reducing audit risk from misreported capital gains and losses.
  • Provides Instant Tax Compliance: The IRS wash sale rule is one of the most frequently violated tax regulations, with penalties ranging from 20% to 40% of underpaid tax. By using this tool before filing, you can accurately report disallowed losses on Form 8949 and Schedule D, avoiding costly fines and interest. The output includes the exact figures needed for Schedule D adjustments.
  • Supports Complex Multi-Lot Trades: Many calculators fail when handling multiple repurchases on different dates or fractional shares. This tool supports up to 10 repurchase lots, automatically applying FIFO matching and prorating disallowed losses across lots. This is essential for traders who average into positions or scale out of losses.
  • Optimizes Tax-Loss Harvesting Strategies: Savvy investors use tax-loss harvesting to offset capital gains, but wash sales can nullify these benefits. The calculator lets you simulate different repurchase dates and prices to see how they affect disallowed losses. For example, you can test waiting 31 days after a sale to repurchase, ensuring the loss is fully deductible.
  • No Signup, No Data Storage: Unlike brokerage platforms or paid software, this calculator runs entirely in your browser. No personal data, trade details, or account information is stored or transmitted. This privacy-first approach means you can use it with confidence, even for sensitive trading strategies.

Tips and Tricks for Best Results

To maximize the accuracy and utility of the Wash Sale Calculator, follow these expert tips derived from IRS guidance and real-world trading experience. Small input errors can lead to significant tax consequences, so precision is paramount.

Pro Tips

  • Always include commissions and fees in your cost basis. If you paid $10 commission on a 100-share purchase at $50 per share, your cost basis is $50.10 per share, not $50. This small adjustment can affect whether a trade triggers a wash sale or not.
  • Run the calculator for each tax lot separately, especially if you sold shares from different purchase dates. The IRS treats each lot as a separate transaction, and combining them can mask partial wash sales.
  • Use the tool before executing a repurchase. Enter your intended sale and planned repurchase to see the disallowed loss in advance. This allows you to adjust your repurchase timing or quantity to optimize tax outcomes.
  • Account for substantially identical securities. If you sell an S&P 500 ETF (like SPY) and buy a different S&P 500 ETF (like VOO) within 30 days, the IRS may consider them substantially identical. The calculator includes a warning for this, but you must manually identify such pairs.

Common Mistakes to Avoid

  • Ignoring the 30-Day Lookback Period: Many traders only check repurchases after the sale, but the IRS also looks 30 days before the sale. If you bought shares on January 5 and sold at a loss on January 20, that purchase is within the window. Always enter all purchases 30 days before the sale date.
  • Forgetting to Adjust for Multiple Accounts: Wash sales apply across all accounts you control, including IRAs (with special rules). If you sell at a loss in a taxable account and repurchase in an IRA within 30 days, the loss is permanently disallowed (no basis adjustment). The calculator cannot track cross-account trades automatically, so you must manually combine data from all accounts.
  • Misapplying the Rule to Options: Selling a stock at a loss and buying a call option on the same stock within 30 days can trigger a wash sale if the option is "substantially identical." The IRS has not provided clear guidance, but conservative traders assume it does. The calculator includes a checkbox for options, but always consult a tax professional for option-related wash sales.
  • Assuming All Losses Are Disallowed: If you sell 100 shares at a loss and repurchase only 50 shares, only 50% of the loss is disallowed. The remaining 50% is deductible. Many calculators incorrectly disallow the entire loss. This tool correctly prorates based on share count.

Conclusion

The Wash Sale Calculator is an indispensable tool for any investor who trades securities, offering precise, IRS-compliant calculations of disallowed losses and adjusted cost bases in seconds. By automating the complex matching logic and proration rules, it eliminates the guesswork and potential errors that lead to tax penalties, while also empowering strategic tax-loss harvesting. Understanding the wash sale rule is no longer optional in today's active trading environment—it is a fundamental requirement for accurate tax reporting and financial planning.

Take control of your tax liability today by using this free calculator before your next trade or tax filing. Input your actual transaction data, review the detailed breakdown, and export the results for your tax professional. With no signup required and complete privacy, you have nothing to lose except the risk of an IRS audit. Start calculating your wash sale adjustments now and trade with confidence.

Frequently Asked Questions

A Wash Sale Calculator is a tax tool that determines the disallowed loss amount and adjusted cost basis when you sell a security at a loss and repurchase the same or substantially identical security within 30 days before or after the sale. It calculates the exact dollar amount of the loss that the IRS prohibits you from claiming on your taxes, and then adds that disallowed loss to the cost basis of the newly acquired shares. For example, if you sell 100 shares of XYZ at a $500 loss and buy 100 shares back within 30 days, the calculator will show that the $500 loss is disallowed and your new shares' basis increases by $500.

The core formula is: Disallowed Loss = (Number of Repurchased Shares ÷ Number of Sold Shares) × Total Realized Loss. Then, the Adjusted Cost Basis per New Share = Original Cost Basis per Share + (Disallowed Loss ÷ Number of Repurchased Shares). For instance, if you sell 200 shares at a $1,000 loss and repurchase 150 shares within 30 days, the disallowed loss would be (150 ÷ 200) × $1,000 = $750, and your new cost basis per share increases by $750 ÷ 150 = $5 per share.

There are no "healthy" or "good" ranges for a Wash Sale Calculator—it simply reports tax reality. A zero disallowed loss is ideal, meaning you avoided the wash sale rule entirely by waiting more than 30 days to repurchase. A high disallowed loss percentage (e.g., 80-100% of your realized loss) is common when you quickly buy back most or all of the shares sold, which simply defers the tax benefit to a future sale rather than losing it permanently.

The calculator is mathematically accurate when you input correct trade dates, share quantities, and prices, but it relies entirely on the accuracy of your data. It cannot automatically detect "substantially identical" securities across different accounts (e.g., IRA vs. brokerage) or across multiple brokers, which the IRS considers wash sales. For a single account with clear trade records, the calculator is 100% accurate for the inputs provided, but missing a repurchase in a spouse's account would make the result incomplete.

The primary limitation is that it cannot account for complex scenarios like multiple buy-sell cycles within the 61-day window, partial repurchases across different tax lots, or wash sales involving options and ETFs that may be deemed substantially identical. It also cannot handle wash sales triggered by automatic dividend reinvestment plans (DRIPs) unless you manually enter each transaction. For example, if you sell shares on day 1, buy on day 10, sell again on day 20, and buy again on day 25, a basic calculator may miss the cascading adjustments.

Professional tax software like TurboTax or H&R Block includes built-in wash sale logic that automatically scans your 1099-B forms and identifies wash sales across all your trades, which a standalone calculator cannot do. However, these professional tools often cost $60-$120 and may still miss cross-account wash sales. A manual Wash Sale Calculator is free and gives you transparency into the exact math, but it requires you to manually identify every repurchase within the 30-day window—a task that becomes tedious with dozens of trades.

No, this is false. The Wash Sale Calculator is equally critical for long-term investors who tax-loss harvest or reinvest dividends. For example, if you sell shares of a mutual fund at a loss in December and your dividend reinvestment automatically buys more shares within 30 days, the calculator will show that loss is disallowed—even if you didn't intend to trade actively. Many buy-and-hold investors are surprised to find that a single DRIP purchase of $50 can trigger a wash sale on a $5,000 loss.

Suppose you sell 500 shares of VTI (Vanguard Total Stock Market ETF) at a $2,000 loss and then buy 500 shares of ITOT (iShares Core S&P Total Market ETF) the next day. The Wash Sale Calculator helps you test whether the IRS considers these "substantially identical"—if it deems them not identical, your $2,000 loss is fully deductible. By inputting the tickers and trade dates, you can see the calculator's disallowed loss result: if it shows $0 disallowed, you've successfully harvested the loss while staying invested. This strategy is commonly used in tax-loss harvesting to maintain market exposure without triggering the rule.

Last updated: June 03, 2026 · Bookmark this page for quick access

🔗 You May Also Like