How Is A Wash Sale Calculated

How Is a Wash Sale Calculated? Interactive Calculator

Estimate your disallowed loss, deductible loss, and adjusted replacement-share basis under the wash sale rule.

Enter values and click Calculate Wash Sale.

How is a wash sale calculated? The expert guide investors actually need

The wash sale rule is one of the most misunderstood tax rules in investing. Many people know the simple version: if you sell a security for a loss and buy it back too soon, your loss can be disallowed. But the practical question is usually this: how is a wash sale calculated in dollars and shares? The calculation is precise, and when you understand the logic, it becomes much easier to tax plan correctly during year end loss harvesting.

In U.S. federal tax law, the wash sale framework appears in Internal Revenue Code Section 1091. The core idea is to prevent taxpayers from claiming a current loss while effectively maintaining the same investment position. If you trigger a wash sale, the disallowed loss generally gets added to the basis of replacement shares in a taxable account. That means the tax benefit is delayed, not always lost. There are important exceptions and account level details, which we cover below.

The core wash sale formula

At a practical level, the standard taxable account calculation can be broken into five parts:

  1. Find your realized loss per share: original cost basis per share minus sale price per share.
  2. Find total realized loss: realized loss per share multiplied by shares sold.
  3. Determine the number of replacement shares bought in the 61-day window (30 days before sale date, sale date, and 30 days after).
  4. Calculate shares subject to wash sale: the lesser of shares sold at a loss or replacement shares bought.
  5. Calculate disallowed loss: realized loss per share multiplied by subject shares.

Then compute deductible loss as total realized loss minus disallowed loss. If replacement shares are in a taxable account, the disallowed loss is usually added to replacement-share basis. If replacement shares are in an IRA, that loss is generally not recoverable through basis adjustment in the same way.

Simple example with full wash sale

Suppose you bought 100 shares at $50 and sold them at $40. That is a $10 per share loss, or $1,000 total. If you buy 100 substantially identical shares within the wash sale window, all 100 loss shares are matched. Your disallowed loss is $1,000 and your currently deductible loss is $0. In a taxable account, the $1,000 disallowed loss is added to basis of replacement shares. If replacement shares were bought at $42, adjusted basis becomes $52 per matched share.

Partial wash sale example

Assume the same sale loss of $10 per share on 100 shares, but you repurchase only 40 shares in the window. The wash sale applies only to 40 shares. Disallowed loss is 40 x $10 = $400. The remaining $600 is generally deductible now (subject to net capital loss limitations and your broader tax profile). Those 40 replacement shares get a basis increase of $10 per matched share in taxable accounts.

What counts as substantially identical?

The phrase substantially identical is facts-and-circumstances based and is one reason investors should document decisions. A repurchase of the exact same stock ticker is the clearest case. Options and contracts to acquire stock can also trigger wash sale treatment. Similar but not identical ETFs may or may not qualify depending on holdings overlap, strategy, and structure. Many investors intentionally rotate into a different exposure to avoid accidental matching during tax-loss harvesting.

Comparison table: short-term and long-term capital gain tax framework (2024)

Category Holding period Federal rate structure Planning impact
Short-term capital gain 1 year or less Taxed at ordinary income brackets (10% to 37%) Losing short-term positions can create valuable offsets, but wash sale timing must be managed carefully.
Long-term capital gain More than 1 year Preferential 0%, 15%, 20% rates Wash sale deferral can delay using losses that could offset gains taxed at these preferential rates.

Comparison table: 2024 long-term capital gain thresholds by filing status

Filing status 0% rate up to 15% rate range starts 20% rate starts above
Single $47,025 $47,026 $518,900
Married filing jointly $94,050 $94,051 $583,750
Head of household $63,000 $63,001 $551,350

These thresholds matter because a disallowed loss affects when you can offset gains. Even if your strategy is sound economically, tax timing can change your after-tax return profile.

Step by step process professionals use to calculate wash sale exposure

  • Export all trades for the symbol and related instruments across all taxable accounts.
  • Identify every loss sale lot and map purchases in the 30 days before and after each sale date.
  • Match replacement shares to loss shares in lot sequence and calculate disallowed amounts per lot.
  • Adjust basis of matched replacement shares and carry forward holding period where applicable.
  • Review IRA and spouse account transactions that may create non-obvious wash sale outcomes.
  • Reconcile against broker 1099-B reporting and maintain independent records for edge cases.

Important edge cases that change the answer

Investors often assume the broker handles everything. Brokers do report many wash sales on Form 1099-B, but they may not see activity across all accounts, all entities, or all brokers. This creates a real risk of underreporting or overreporting your allowed losses.

  • Multiple accounts: Taxable account A may show a clean loss, while taxable account B repurchase creates the wash sale.
  • Spousal trading: Coordinated household trading can create matching concerns depending on facts and reporting setup.
  • IRA purchases: A loss sale in taxable followed by IRA repurchase can create a permanently disallowed loss scenario.
  • Options: Buying call options can trigger substantial identity analysis tied to the sold equity.
  • Year end timing: December loss sales can be affected by January buys inside the 30-day after-sale period.

Why basis adjustment is the key concept

Many investors think a wash sale means the loss disappears forever. In many taxable account situations, it does not disappear. It is deferred into basis of replacement shares. Higher basis means lower taxable gain (or larger loss) when those replacement shares are later sold in a non-wash transaction. This is why a correct spreadsheet that tracks adjusted basis by lot is essential for active investors.

Holding period rules can also shift. If the loss is disallowed and carried into replacement shares, the holding period of old shares may tack onto replacement shares, which can influence whether future gains are short term or long term. That can materially affect tax rate outcomes.

How this calculator should be used

Use this calculator as a planning and education tool. Enter your sale lot data and replacement purchase details to estimate:

  • Total realized loss from the sale.
  • Disallowed loss under wash sale matching.
  • Current deductible loss after wash sale adjustment.
  • Adjusted basis for matched replacement shares in taxable accounts.

Then compare calculator output to your broker statement and lot records. If numbers differ, inspect lot selection method, share counts, fees, and account-level transaction visibility.

Tax compliance and records checklist

  1. Keep lot-level purchase dates, costs, and sale confirmations.
  2. Track replacement purchases for at least 30 days before and after every loss sale.
  3. Record account location (taxable, traditional IRA, Roth IRA).
  4. Save 1099-B statements and reconciliation notes for each year.
  5. Document your rationale when swapping into similar but non-identical exposures.
  6. Review state tax implications and net investment income tax if applicable.

Authoritative references for wash sale rules

For primary source review and exact legal wording, use:

Educational use only. This page is not legal, tax, or investment advice. Wash sale outcomes can depend on detailed facts including lot identification, account ownership, and instrument type. For filing decisions, consult a qualified tax professional.

Leave a Reply

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