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.
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
| Lot | Day offset | Account | Eligible shares | Matched shares | Disallowed loss | Basis per matched share |
|---|---|---|---|---|---|---|
| Lot 1 | -7 | Taxable account | 40 | 40 | $400.00 | $55.00 |
| Lot 2 | 10 | Traditional or Roth IRA | 30 | 30 | $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
- Enter the shares sold, their adjusted basis, and the net proceeds from the loss sale.
- Enter the original holding period for the sold shares.
- Add each replacement lot with its day offset, share count, total cost, and account type.
- Use a negative day offset for a purchase before the sale and a positive offset for a purchase after the sale.
- 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.