Partial Wash Sale & Adjusted Basis Calculator

Enter one loss sale and up to two replacement lots. The calculator matches eligible replacement shares in acquisition order and separates taxable-account basis deferral from IRA loss disallowance.

Your numbers
Enter the number of sold shares that have the same per-share adjusted basis.
Include purchase commissions and prior basis adjustments for the shares sold.
Enter sale proceeds after commissions and transaction fees.
The holding period of the loss shares is carried to matched replacement shares in a taxable account.
Use a negative number for a purchase before the loss sale, zero for the sale date, or a positive number after it.
Enter substantially identical shares acquired in the first replacement lot.
Include acquisition fees in the lot's original tax basis.
IRA and Roth IRA purchases can make the matched loss permanent instead of adding it to replacement-share basis.
The calculator sorts both lots by acquisition timing before matching shares.
Enter zero if there is no second replacement purchase.
Enter the original basis of the entire second replacement lot.
Choose where the second replacement lot was acquired.

What this calculator leaves out

  • This calculator assumes all shares in the loss-sale input have the same per-share adjusted basis and that purchase basis and sale proceeds already include commissions, fees, and prior adjustments.
  • It does not determine whether securities are substantially identical or resolve longer transaction chains, short sales, options, spouse purchases, controlled entities, broker lot elections, or state-tax treatment.
  • The result is educational and is not tax advice or a substitute for reviewing Forms 8949 and Schedule D with a qualified tax professional.

By using this calculator you agree to the Terms of Use. Results are estimates, not professional advice.

Total disallowed wash-sale loss$700.00

Realized loss before wash-sale adjustment
$1,000.00
Replacement shares matched
70
Currently deductible loss
$300.00
Loss deferred into taxable-account basis
$400.00
Permanently disallowed IRA loss
$300.00
Lot 1 adjusted basis per matched share
$55.00
Lot 2 adjusted basis per matched share
$43.00
Holding-period treatment
200 original holding days carry to the matched taxable-account shares; matched IRA shares receive no taxable replacement basis or holding-period adjustment in this calculation.
Replacement lot matching
LotDay offsetAccountEligible sharesMatched sharesDisallowed lossBasis per matched share
Lot 1-7Taxable account4040$400.00$55.00
Lot 210Traditional or Roth IRA3030$300.00$43.00

Assumes the sold shares in this input all have the same per-share adjusted basis.

Assumes replacement shares bought before the sale were still held immediately after the loss sale.

Loss matched to IRA or Roth IRA purchases is treated as permanently disallowed.

How to use this calculator

  1. Enter the shares sold, their adjusted basis, and the net proceeds from the loss sale.
  2. Enter the original holding period for the sold shares.
  3. Add each replacement lot with its day offset, share count, total cost, and account type.
  4. Use a negative day offset for a purchase before the sale and a positive offset for a purchase after the sale.
  5. Review the matched shares, disallowed loss, deductible loss, and per-lot basis treatment.

How a partial wash sale is calculated

A wash sale can be partial when fewer replacement shares are bought than the number of loss shares sold. It can also be partial when replacement purchases exceed the sale, because only replacement shares up to the number of loss shares sold are matched. This calculator treats the sold shares as one uniform tax lot, so every sold share has the same adjusted basis per share.

Let S be shares sold, B be their adjusted basis, and P be net sale proceeds. The realized loss before the wash-sale rule is:

R = max(0, B - P)

The loss assigned to each sold share is:

L = R / S

Each replacement lot is eligible only when its purchase date is within 30 days before or after the loss sale, including the sale date itself. The calculator sorts eligible lots from earliest to latest acquisition, using the input order to break a same-day tie. For each lot j, matched shares are:

M_j = min(Q_j, max(0, S - prior matched shares))

The disallowed loss assigned to that lot is:

D_j = M_j x L

Total disallowed loss is the sum of the lot disallowances. The currently deductible loss is the realized loss minus that disallowed amount.

Taxable-account basis and IRA treatment

For matched shares bought in a taxable account, the disallowed loss is not gone. It is added to the basis of the matched replacement shares. The adjusted basis per matched share is:

adjusted basis per matched share = original cost per share + L

The old holding period also carries to those matched taxable replacement shares. For matched shares bought by a traditional IRA or Roth IRA, Revenue Ruling 2008-5 treats the loss as disallowed without adding it to IRA basis. This calculator therefore reports that amount as permanently disallowed.

What moves the answer most

The biggest drivers are the per-share loss, the number of replacement shares inside the 30-day window, and the account where those shares were bought. A large replacement lot outside the window does not create a wash-sale match here. A smaller lot inside the window can disallow part of the loss, and an IRA lot changes the character of the disallowance because there is no taxable replacement basis increase.

What this calculator leaves out

This tool does not decide whether two securities are substantially identical, whether a pre-sale purchase was still held after the sale, or how broker lot elections affect the sold shares. It also does not model short sales, options, spouse purchases, controlled entities, state taxes, or longer chains of transactions. If the sold shares have different per-share bases, run each sold lot separately.

Worked example

Suppose 100 shares are sold with $5,000 of adjusted basis and $4,000 of net proceeds. The realized loss is $1,000, or $10 per sold share. Lot 1 bought 40 shares seven days before the sale in a taxable account for $1,800, so its original cost is $45 per share. Lot 2 bought 30 shares ten days after the sale in an IRA for $1,290, or $43 per share.

Both lots are inside the 30-day window and together match 70 replacement shares. The total disallowed wash-sale loss is $700. Of that amount, $400 is deferred into the taxable lot's basis, making its adjusted basis $55 per matched share, and $300 is permanently disallowed because it is matched to IRA shares. The remaining $300 of the original loss is currently deductible.

Common questions

How is a partial wash sale calculated?

First calculate the realized loss on the sale, then divide it by the number of loss shares sold. Eligible replacement shares are matched up to the number of shares sold. The matched shares get the disallowed portion of the loss, and any unmatched loss remains currently deductible.

Which replacement shares are matched first?

This calculator matches eligible replacement lots by acquisition date, from earliest to latest. If two lots have the same day offset, the lot entered first is matched first. Purchases outside the 30-day window are excluded.

Does the 30-day rule include the sale date?

Yes. Purchases 30 days before the sale, on the sale date, and 30 days after the sale are inside the window. A day offset of -31 or +31 is outside the window for this calculation.

What happens to the basis of replacement shares?

For matched replacement shares in a taxable account, the disallowed loss is added to the replacement shares basis. The original holding period of the sold shares also carries to those matched taxable shares. Unmatched replacement shares keep their original basis.

Why is a wash-sale loss permanent when the replacement is bought in an IRA?

Revenue Ruling 2008-5 says a loss can be disallowed when substantially identical stock is bought by an IRA or Roth IRA. The ruling also says the disallowed loss is not added to the IRA basis, so this calculator reports that matched amount as permanently disallowed.

Do fractional shares trigger a partial wash sale?

Fractional shares can be replacement shares if they are substantially identical and bought inside the wash-sale window. This calculator supports fractional share counts and assigns the per-share loss proportionally. The same matching limit applies: replacement shares are matched only up to the number of loss shares sold.

Put this calculator on your site

Paste the snippet below where you want the calculator to appear. It stays up to date automatically and links back here.

<iframe src="https://countfolk.com/embed/partial-wash-sale-adjusted-basis-calculator/" title="Partial Wash Sale & Adjusted Basis Calculator" width="100%" height="640" style="border:0;max-width:44rem" loading="lazy"></iframe>