complete.tools

Wash Sale Rule Calculator

Identify wash sale violations and calculate adjusted cost basis when securities are sold at a loss and repurchased within 30 days

What is the wash sale rule?

The wash sale rule (IRS Section 1091) prevents investors from claiming a tax deduction on a security sold at a loss if they buy the same or a substantially identical security within 30 days before or after the sale. The rule exists to stop investors from "harvesting" paper losses for tax purposes while maintaining essentially the same market position.

When a wash sale occurs, the disallowed loss is not gone forever. Instead, it is added to the cost basis of the newly purchased shares. This defers the tax benefit until you eventually sell those shares without triggering another wash sale.

The wash sale rule applies to stocks, bonds, mutual funds, ETFs, and options on those securities. It applies across all of your taxable accounts and also includes purchases in your IRA, Roth IRA, or your spouse's accounts.

The 61-day wash sale window

The wash sale window covers 61 days total: 30 days before the sale, the day of the sale itself, and 30 days after the sale. Any purchase of the same or substantially identical security within this window disallows the loss.

**Example:** - You sell 100 shares of AAPL on June 15 at a \$3,000 loss - The wash sale window runs from May 16 through July 15 - If you buy AAPL any time in that window, the loss is disallowed (proportionally, if you buy fewer shares than you sold)

"Substantially identical" is defined broadly. It includes the same stock in the same company, options to buy the same stock, and mutual funds or ETFs tracking the same index. It does not include stocks of different companies in the same industry.

How wash sale losses are calculated

**Disallowed loss formula:**

If shares repurchased is less than or equal to shares sold: \`\`\` Disallowed Loss = (Shares Repurchased / Shares Sold) × Total Loss \`\`\`

If shares repurchased exceeds shares sold, the entire loss is disallowed.

**Adjusted cost basis formula:** \`\`\` Adjusted Cost Basis = (Shares Repurchased × Repurchase Price) + Disallowed Loss Adjusted Cost Basis per Share = Adjusted Cost Basis / Shares Repurchased \`\`\`

**Holding period carryover:** The holding period of your original shares carries over to the new shares. This matters for determining whether a future sale produces short-term or long-term capital gains.

**Example:** You bought 100 shares at \$50 (total cost: \$5,000), sold all 100 at \$35 (proceeds: \$3,500, loss: \$1,500), and bought 100 shares back at \$38 within 30 days (cost: \$3,800). The \$1,500 loss is fully disallowed. Your adjusted cost basis becomes \$3,800 + \$1,500 = \$5,300, or \$53 per share.

How to use this calculator

1. Enter the security name or ticker symbol (optional, for your reference) 2. Enter the original purchase date and price per share, along with the number of shares purchased 3. Enter the sale date, sale price per share, and number of shares sold 4. If you repurchased shares within 30 days before or after the sale, enter the repurchase date, price, and share count 5. Click "Check for Wash Sale" to see your results 6. The calculator will tell you whether a wash sale occurred, the disallowed loss amount, and the adjusted cost basis of your repurchased shares

You can leave the repurchase fields blank if you have not yet repurchased shares. The calculator will show your total loss and the 61-day window you need to avoid to preserve the deduction.

Tax loss harvesting and wash sales

Tax loss harvesting is a strategy where investors intentionally sell positions at a loss to offset capital gains elsewhere. The wash sale rule limits this strategy if you want to maintain your market exposure.

To harvest a loss without triggering a wash sale, you have several options:

- **Wait 31 days** before repurchasing the same security - **Buy a similar but not substantially identical security** — for example, sell one S&P 500 ETF and buy a different one tracking a similar but distinct index - **Double up, then sell** — buy additional shares first, wait 31 days, then sell the original lot (note: this increases your market exposure temporarily)

Many brokerage tax-loss harvesting services automate this process, but errors can still occur, especially across multiple accounts or when options are involved.

FAQs

Q: Does the wash sale rule apply to IRAs? A: Yes. Purchases in a traditional IRA, Roth IRA, or your spouse's accounts all count as wash sales. The IRS considers these "related" accounts for wash sale purposes. This is a common trap for investors who sell at a loss in a taxable account and then buy the same security in their IRA.

Q: What does "substantially identical" mean? A: The IRS has not defined this precisely, but it generally means the same stock or bond, options on the same stock, or funds tracking the exact same index. Stocks in the same sector or industry are not substantially identical. A different S&P 500 ETF from a different provider may or may not qualify, depending on index construction.

Q: Is the disallowed loss gone forever? A: No. The disallowed loss is added to the cost basis of your new shares. When you eventually sell those shares outside a wash sale window, you will realize the full economic loss at that time. The wash sale rule defers the loss, it does not eliminate it.

Q: What if I only repurchased some of my shares? A: The wash sale rule applies proportionally. If you sold 100 shares and repurchased only 40, then 40% of the loss is disallowed. The remaining 60% of the loss (representing the 60 shares not repurchased) is fully deductible.

Q: Does the wash sale rule apply to crypto? A: As of 2024, cryptocurrency is not subject to the wash sale rule because the IRS classifies it as property, not a security. However, proposed legislation may change this. Always verify the current rules with a tax professional.

Q: My brokerage shows a wash sale adjustment on my 1099-B. What does that mean? A: Your brokerage tracks wash sales across your accounts with them and reports disallowed losses on Form 1099-B with a "W" code. However, brokerages do not track wash sales across different institutions or in your spouse's accounts. You are responsible for identifying and reporting any wash sales your brokerage missed.

Explore Similar Tools

Explore more tools like this one:

- Rule of 72 Calculator — Estimate how long it takes for an investment to double... - Bitcoin Cost Basis Calculator — Calculate average Bitcoin cost basis across multiple... - Empirical Rule Calculator — Apply the 68-95-99.7 rule to calculate percentage of... - Quartile Calculator – IQR Calculator — Calculate quartiles (Q1, Q2, Q3) and interquartile range... - Stock Average Calculator — Calculate average stock purchase price across multiple...