Rebuy within 30 days and your loss can't be deducted
What most people assume
Selling a loser in December to book the loss, then buying the same stock right back, is a common year-end move. The assumption is that the loss still counts this year.
The rule: a 61-day window
A loss on stock or securities can't be deducted if you buy substantially identical ones within 30 days before or after the sale. A contract or option to buy them counts too.
Source: 26 U.S.C. §1091(a)
Count 30 days each way
In a fictional example, a sale on Dec 10, 2026 makes the window Nov 10, 2026 to Jan 9, 2027. Shares bought up to 30 days before the sale count too.
The math: Dec 10 ± 30 days = Nov 10 to Jan 9; 30 + 1 + 30 = 61 days.
Source: 26 CFR §1.1091-1
The loss moves into the new shares
Fictional: bought for $5,000, sold for $3,000, a $2,000 loss. Rebuying the same number of shares on Dec 20 for $3,100 adds the disallowed loss to the new basis.
The math: $3,100 paid + $2,000 disallowed loss = $5,100 basis
Source: 26 U.S.C. §1091(d)
Deferred, not erased (in a taxable account)
Fictional: the new shares later sell for $4,000, both trades in a taxable account, so the net is −$1,100 either way. The holding period carries over, and tax rates can still change the dollars.
The math: $4,000 − $5,100 = −$1,100; or −$2,000 + $900 = −$1,100
Source: 26 U.S.C. §1091(d), §1223(3)
Where it catches people
Your 1099-B (the form your broker sends) must flag it in box 1g only for the same covered security (same CUSIP) in the same account. A rebuy elsewhere may not show, but the rule still applies whether or not your broker reports it.
The math: A rebuy in your IRA or Roth IRA means the loss is lost, not deferred.
Source: IRS Form 1099-B instructions; Rev. Rul. 2008-5
Sources and assumptions
- 26 U.S. Code §1091 – Loss from wash sales of stock or securities (Cornell LII): §1091(a): no deduction for a loss on stock or securities if, within a period beginning 30 days before and ending 30 days after the sale, the taxpayer acquires substantially identical stock or securities by purchase or fully taxable exchange, or enters into a contract or option to acquire them (dealers in the ordinary course of business excepted). §1091(d): the new shares' basis is the old shares' basis adjusted by the difference between the repurchase price and the sale price. (checked 2026-10-14)
- 26 CFR §1.1091-1 – Losses from wash sales of stock or securities (Cornell LII): The regulation names the 30-days-before to 30-days-after span 'the 61-day period'. It does not define 'substantially identical'. (checked 2026-10-14)
- 26 U.S. Code §1223(3) – Holding period of property (Cornell LII): For stock whose acquisition made a loss nondeductible under §1091, the holding period includes the period the sold stock was held. (checked 2026-10-14)
- IRS, Instructions for Form 1099-B, Box 1g: Brokers must report a loss disallowed under section 1091 in box 1g if both the sale and the purchase occur in the same account for covered securities with the same CUSIP. Brokers may report other wash sales but are not required to. (checked 2026-10-14)
- IRS Rev. Rul. 2008-5, Internal Revenue Bulletin 2008-3: Issue: an individual sells stock at a loss and 'causes his or her individual retirement account or Roth IRA to purchase substantially identical stock' within 30 days. Holding: 'The loss on the Sale of stock is disallowed under § 1091. A's basis in the individual retirement account or Roth IRA is not increased by virtue of § 1091(d).' The ruling does not mention a spouse. (checked 2026-10-14)
- 26 U.S. Code §1211 – Limitation on capital losses (Cornell LII): §1211(b): for a taxpayer other than a corporation, capital losses are allowed 'only to the extent of the gains from such sales or exchanges, plus (if such losses exceed such gains) the lower of— (1) $3,000 ($1,500 in the case of a married individual filing a separate return), or (2) the excess of such losses over such gains.' (checked 2026-10-14)
- IRS Tax Topic No. 409, Capital gains and losses: 'If your capital losses exceed your capital gains, the amount of the excess loss that you can claim to lower your income is the lesser of $3,000 ($1,500 if married filing separately) or your total net loss shown on line 16 of Schedule D (Form 1040)…' and 'If your net capital loss is more than this limit, you can carry the loss forward to later years.' Page last reviewed or updated 24-Sep-2026. (checked 2026-10-14)
Assumptions:
- The investor and all dollar amounts are fictional: bought for $5,000, sold for $3,000 on Dec 10, 2026, rebought the same shares (same number of shares) on Dec 20, 2026 for $3,100, and later sold them for $4,000.
- The shares are in a taxable brokerage account and the investor is not a securities dealer.
- The repurchase is the same stock, which counts as substantially identical. Whether different funds or securities are 'substantially identical' depends on the facts, and the statute and regulation don't define the term.
- No other purchases happen within the 61-day window. The repurchase covers the full number of shares sold, so the whole loss is disallowed.
- Federal rules only. The post doesn't cover state tax treatment.
- Tax rates aren't applied. The example shows only the timing and size of the deductible loss, not dollars of tax saved.
The short version
- Buying within 30 days before or after the sale disallows the loss.
- The window is 61 days long.
- In a taxable account, the loss is added to the new shares' basis.
- Taxable account: same net loss, different timing.
- A rebuy in your own IRA or Roth IRA can lose the deduction.


