How Wash Sale Rules Affect Your Tax Losses

How Wash Sale Rules Affect Your Tax Losses: a replacement buy executed within 30 calendar days before or after a closing transaction that realizes a decline voids the immediate write-off, and the disallowed amount is added to the replacement lot’s cost basis. The window is 61 calendar days total: the 30 days before the disposition, the disposition date, and the 30 days after it. A 31-day gap after the closing transaction keeps that particular replacement outside the provision.

Section 1091 of the Internal Revenue Code governs the matching. A repurchase can be direct or indirect: an individual retirement account (IRA), a spouse’s account, or a controlled entity can create the trigger. If the replacement sits in a retirement account, the disallowed amount usually does not return as basis in that account, so the deduction can vanish permanently. In an ordinary brokerage account, the disallowed amount normally shifts into the replacement’s basis and changes the result when that replacement is later liquidated: it lowers a later gain or deepens a later decline.

Recordkeeping decides whether the adjustment is captured correctly. Broker reports may miss cross-account matching, especially when the closing transaction and the replacement occur at different custodians, so reconcile the 1099-B against 8949 entries and attach a dated schedule of acquisitions, disposals, quantities, and adjusted cost basis. Outcomes depend on the filer’s bracket, state, and facts; consult a certified public accountant (CPA) or an enrolled agent (EA) before applying Section 1091 to a specific portfolio. This material explains mechanics only and does not direct any trade.

What Counts as a Substantially Identical Security Under the Wash Sale Rule

Treat two holdings as substantially identical when they share the same issuer, claim priority, maturity, coupon, and conversion terms; a shared CUSIP is conclusive, while a fixed conversion ratio between one asset and another also meets the test.

Different issuers usually fail the test.

Common shares and preferred shares from one company normally differ because voting rights, dividend treatment, and liquidation priority differ. Two bonds from the same issuer with distinct maturities or coupons generally escape the matching provision, while identical bonds from that issuer do not. A contract or option to acquire the same underlying asset counts even when no shares change hands. Two mutual funds or exchange-traded funds from separate providers are not automatically identical; each fund is a separate legal entity with its own expense ratio, tracking method, and redemption terms, and overlapping holdings can invite scrutiny. The Internal Revenue Code Section 1091 matching provision applies across brokerage accounts, and a purchase by a spouse can count under related-party provisions. The revenue authority has not published a bright-line formula for every pair, so the analysis rests on legal rights and economic equivalence.

The matching window covers acquisitions from 30 days before through 30 days after a disposition. If a filer closes a position at a deficit and buys a substantially identical asset inside that window, the deficit is deferred by adding it to the replacement’s cost basis. A replacement inside a retirement arrangement can erase the deferral permanently. A licensed accountant or fiduciary adviser should be consulted because individual circumstances differ.

Starting the 30-Day Window Before and After the Sale

Mark the 61-day calendar interval around each closing trade: the 30 days before plus the 30 days after the execution date, with the execution date as day zero.

The backward leg matters as much as the forward leg. A replacement lot acquired on day -20 can be matched to a deficit realized on day zero, even though the acquisition happened first. The linking test runs across the entire 61-day span, not only after the closing trade.

Assume a trader closes a position at a deficit on June 15. The window opens on May 16 and closes on July 15. An acquisition of the same security on May 20, June 14, June 16, or July 10 falls inside the interval. An acquisition on May 15 or July 16 falls outside it. If two lots are involved, the matching order generally follows the chronological sequence of acquisitions and closures, with the earliest replacement paired to the earliest deficit, though specific lot identification may alter the result.

Record the exact execution date, not the settlement date, because the interval is measured from the trade date.

Use a calendar table to audit each position closure. The table below maps the three phases and the matching result when an identical security is acquired.

Interval Calendar days Action Result for realized deficit
Pre-closing 30 days before execution date Acquire identical security Deferred into replacement cost basis
Execution date Day zero Close original position at deficit Starts the matching test
Post-closing 30 days after execution date Acquire identical security Deferred into replacement cost basis
Outside interval Day -31 or earlier; day +31 or later Acquire identical security No offset-replacement linkage

When the offset-replacement provision applies, the deficit is not erased; it is deferred. The disallowed amount is added to the cost basis of the replacement lot. That adjustment reduces the gain or increases the deficit when the replacement lot is later closed. The holding period of the replacement lot may also inherit the original lot’s holding period, which can change long-term versus short-term treatment.

A licensed fiscal adviser should review individual circumstances, because lot selection, account type, and security identity can change the outcome.

How Replacement Shares Trigger a Disallowed Loss

Wait at least 31 days after liquidating a security at a decline before acquiring a substantially identical one; otherwise the revenue authority can defer the deduction by folding the disallowed amount into the new position’s cost basis.

Replacement securities include a direct repurchase of the same stock, a substantially identical security, an option or contract to acquire it, and, in defined situations, an acquisition by a spouse or related party. The 30-calendar-day window runs both backward and forward from the disposition date; a purchase on day 31 after the disposal falls outside the offset provision. If the replacement lot sits in an individual retirement account, the disallowed amount may not be recovered through a basis increase, so a fiscal professional should review the sequence.

Suppose an investor liquidates 100 shares at $50 after paying $70, recording a $2,000 decline. Eleven days later, the investor buys 100 shares at $55. The $2,000 disallowed amount does not vanish; it raises the replacement lot’s basis from $5,500 to $7,500. If those new shares are later sold at $80, the recognized gain is $500 instead of $2,500, so the deduction is delayed rather than erased. The offset applies when the replacement security is substantially identical, not merely similar in sector or issuer type. A call option, a convertible bond, or a contract to acquire the same equity can qualify. Partial replacement is proportional: repurchasing 40 shares after liquidating 100 disallows 40% of the decline, while the remaining 60% may be recognized if no other replacement purchase occurs in the window. Keep records of dates, quantities, and adjusted cost basis; a fiscal professional should be consulted for individual circumstances.

Calculating the Disallowed Amount When You Sell at a Loss

Calculating the Disallowed Amount When You Sell at a Loss requires matching the realized shortfall on the disposed shares with any substantially identical replacement bought 30 calendar days before or after the disposal, then capping the blocked figure at the shortfall attributable to those replacement shares.

Use this formula: blocked amount = min(total realized shortfall, shortfall per share × replacement-share count) when replacement shares are fewer than disposed shares; if replacement shares equal or exceed disposed shares, the blocked amount equals the entire realized shortfall. Add the blocked amount to the cost basis of the replacement shares; carry over the disposed shares’ holding period to those replacement shares.

Hypothetical: an investor disposes 100 shares at $50 with a $70 basis, realizing a $2,000 shortfall ($20 per share). A purchase of 60 substantially identical shares at $55 inside the 61-day window blocks $20 × 60 = $1,200; $800 remains usable against capital gains, and the replacement basis becomes ($55 × 60) + $1,200 = $4,500, or $75 per share. If the replacement purchase is 100 shares or more, the full $2,000 is blocked; allocate the added basis across the replacement lots in proportion to their cost. Multiple purchases require applying the 61-day window to each lot and computing the lesser of the total shortfall and the shortfall tied to replacement shares; because treatment depends on individual facts and local law, consult a qualified accountant.

Adjusting the Cost Basis of Replacement Shares After a Wash Sale

Add the disallowed amount to the cost basis of the replacement lot; do not record it as a current write-off. This adjustment raises the substitute shares’ basis, so a later disposal produces a smaller capital gain or a larger capital deficit. The deferred figure equals the decline on the original disposal multiplied by the number of substitute shares acquired inside the matching window.

The matching window runs from 30 days before through 30 days after the triggering transfer, a 61-day span. If an investor disposes of 100 shares at a $10 decline per share, the total negative result is $1,000. Acquiring 60 substitute shares within that window disallows $600, adding $10 to each new share’s basis; the remaining $400 stays usable in the current period. For 120 substitute shares, the entire $1,000 is deferred and divided across those 120 shares.

When several purchase tranches fall inside the window, allocate the deferred amount proportionally by share count, and the holding period of every substitute lot inherits the original lot’s holding period, which can convert a short-term position into a long-term one and change the applicable capital gains rate.

Acquiring replacement shares inside a fiscally advantaged retirement account permanently eliminates the deferred figure because no basis adjustment is possible there. The same destruction occurs if a related party buys the substitute shares and the investor later repurchases them from that party. Keeping the replacement shares outside such an account preserves the ability to add the amount to basis.

Custodians adjust the basis on the annual information return, yet errors appear when multiple purchases cross the matching window or when options and equities interact. Reconcile every trade confirmation against the reported adjusted basis. Calculate the per-share addition by dividing the deferred total by the number of substitute shares. If the broker reports an unadjusted figure, file a corrected statement with the return and keep a memo of the calculation. A fiscal specialist should review cross-account cases before filing.

Disposing of the replacement shares later uses the elevated basis, so the deferred amount reduces a subsequent capital gain or deepens a subsequent decline. Consult a fiscal adviser for individual circumstances, especially when multiple accounts or derivative contracts are involved.

How Wash Sales Work Across Taxable and IRA Accounts

Offset a realized decline only when no substantially identical security is acquired in any account, including an individual retirement arrangement (IRA), within the 30-day window before or after the disposal.

Brokerage Account Mechanics

In a regular brokerage account, the disallowed amount is not gone immediately. It is added to the cost basis of the replacement shares. That raises the basis and reduces a later gain or increases a later decline when those replacement shares are disposed of. The effect is deferral: the same economic shortfall is recognized later, not in the original reporting period.

The 61-day testing period runs from 30 days before through 30 days after the disposal. Counting is by calendar days, not trading sessions. A purchase on day 30 after the disposal can trigger the restriction; a purchase on day 31 does not. Multiple purchases and partial replacements are matched under ordering conventions, so a single disposal can be partly allowed and partly disallowed.

Substantially identical means more than same issuer. It includes identical shares, many contracts and options that create equivalent exposure, and certain convertible securities. Different share classes of the same company, or two funds tracking the same index, often raise the question; the answer depends on facts and the revenue authority’s interpretation. A qualified accountant or enrolled agent should be consulted for individual circumstances.

Retirement Account Consequences

When the replacement is acquired inside an IRA, the disallowed amount cannot be added to the IRA’s basis. Traditional, Roth, SEP, and SIMPLE IRAs do not receive the basis increase that a regular brokerage account would. The deduction is lost permanently, not deferred. This is the harshest cross-account outcome.

A decline realized inside an IRA generally cannot be deducted at all, because IRA earnings and withdrawals follow different treatment. If an IRA disposes of a security at a decline and a regular brokerage account acquires the same security within the window, the restriction usually does not create a disallowed deduction in the regular account, since no deductible decline was claimed in the IRA. The regular account’s own basis remains unchanged by the IRA trade.

Rollovers, transfers, and trustee-to-trustee movements do not count as acquisitions if only the account custodian changes and the beneficial ownership stays the same. A new purchase inside any IRA during the window, however, can count. Separate account labels do not create separate treatment when the same beneficial owner directs the acquisition.

Track every acquisition across all accounts for 30 days before and after a disposal. Use trade confirmations, not statements, to capture dates. If a replacement occurs in an IRA, expect a permanent disallowance; if it occurs in a regular brokerage account, expect a basis adjustment and later recognition. A qualified accountant or enrolled agent should review the facts before reporting.

Q&A:

I sold 100 shares of XYZ at a loss on March 1 and bought 100 shares again on March 20. Can I claim the loss on my 2024 return?

No. A loss sale is washed if you buy a substantially identical security within 30 days before or after the sale. March 20 falls inside that 30-day window after March 1. The loss is disallowed for now. Instead, the disallowed amount is added to the cost basis of the replacement shares. That higher basis lowers any future gain or raises any future loss when you sell those replacement shares, assuming no later wash sale interferes. If you bought fewer replacement shares than you sold, only the loss that matches those shares is disallowed.

What happens if I sell a stock at a loss in my taxable brokerage account and then buy the same stock in my IRA within 30 days?

The purchase in your IRA can trigger the wash sale rule. The loss in your taxable account is disallowed. Because the replacement shares sit in an IRA, the basis adjustment does not help your taxable account. In practice, the disallowed loss is generally lost forever; you do not get a higher basis in the IRA. To keep the deduction, wait more than 30 days before repurchasing the same security in any account, including an IRA.

If I sell a stock at a loss and buy a call option on the same stock, is that a wash sale?

It can be. The wash sale rules cover not only direct repurchases of substantially identical stock but also contracts or options to acquire it. Buying a call on the same stock within the wash sale window may be treated as a replacement acquisition. The exact result can depend on the terms and how the option is treated. A safer approach is to wait until the 30-day period passes before taking a position that gives you the right to buy the same stock. If you already did it, keep records and ask a tax professional to review your facts.

I sold shares at a loss and bought replacement shares in several lots. How is the disallowed loss divided among the new shares?

You match the sold shares with the replacement shares under the wash sale ordering rules. The disallowed loss is limited to the number of replacement shares that triggered the wash sale. If you sold more shares than you replaced, part of the loss may still be deductible. If you replaced all or more, the whole loss tied to the matched shares is disallowed. The disallowed amount is then added to the basis of each replacement share. With multiple lots, brokers often track this, but their reports may differ from your own records. Check the trade dates, share counts, and cost basis lot by lot before filing.

Can I avoid the wash sale rule by having my spouse buy back the stock in a separate account?

Usually no. A purchase by your spouse can be attributed to you for wash sale purposes. If you sell at a loss and your spouse buys substantially identical stock within 30 days before or after your sale, the loss may be disallowed. If the replacement shares are held in your spouse’s IRA, the disallowed loss can be lost rather than added to a taxable basis. A joint account does not fix this either. The dates and ownership details matter, so do not rely on moving the trade to a family account as a workaround.

I sold 100 shares at a loss and bought them back 20 days later in my regular brokerage account. Can I still deduct that loss on this year’s tax return?

No, not for that sale. The wash sale rule disallows the loss because you bought substantially identical shares within 30 days after the sale. The disallowed loss is not gone for good in a taxable account. It gets added to the cost basis of the replacement shares. That raises your basis, so when you sell those new shares, your gain will be smaller or your loss will be larger. Your holding period for the replacement shares also includes the holding period of the shares you sold. Keep track of the basis adjustment; your broker may report it on Form 1099-B, but you are responsible for reporting the correct amount.

What happens if I sell a stock at a loss in my taxable account and buy the same stock in my IRA within 30 days?

The loss is disallowed. Worse, you do not get a basis increase in the IRA for that disallowed loss. Since IRAs are tax-advantaged and do not track cost basis the same way taxable accounts do, the loss cannot be recovered later when you sell the investment inside the IRA. The tax benefit is lost. The 30-day window runs both before and after the taxable sale, so a purchase in the IRA 15 days before the sale or 25 days after the sale can also trigger this result. Watch out for automatic dividend reinvestments and recurring contributions that buy the same security without your direct instruction.

Does the wash sale period include the exact day I sell the shares, and what counts as a substantially identical security?

Yes. The wash sale period is 61 days: 30 days before the sale, the sale date itself, and 30 days after. A purchase on the same day as the loss sale can trigger the rule. The rule applies to substantially identical securities, not only to the same ticker symbol. That can include another class of stock from the same company, a convertible bond, certain options, or a contract to buy the stock. Different mutual funds or ETFs may or may not be treated as substantially identical. The IRS has not provided a bright-line test for every pair. If two funds track the same index, hold nearly the same securities, and have the same risk profile, the IRS could argue they are substantially identical. If they follow different indexes or have meaningfully different holdings, the case for treating them as different is stronger. Because the outcome depends on facts, many taxpayers wait more than 30 days before repurchasing anything similar, or they buy something clearly different.