Wash sale and dividend reinvestment: what the IRS and CRA say
A reinvested dividend is a purchase of shares. The IRS wash sale rule looks at purchases within 30 days before or after a loss sale. This page quotes both rules and works one example with a tiny DRIP buy.
A dividend reinvestment buys shares. If you sell the same stock at a loss, and a reinvestment lands in the 30 days before or after that sale, the buy can matter. If that buy counts as buying the stock back, the IRS rule is the wash sale rule. In Canada the matching rule is the superficial loss rule.
This page puts the agencies' own words first, then walks through one example and shows the arithmetic.
What the IRS says a wash sale is
The words below are from IRS Publication 550 (2025), section "Wash Sales".
"You cannot deduct losses from sales or trades of stock or securities in a wash sale unless the loss was incurred in the ordinary course of your business as a dealer in stock or securities."
"A wash sale occurs when you sell or trade stock or securities at a loss and within 30 days before or after the sale you: Buy substantially identical stock or securities, Acquire substantially identical stock or securities in a fully taxable trade, Acquire a contract or option to buy substantially identical stock or securities, or Acquire substantially identical stock for your individual retirement arrangement (IRA) or Roth IRA."
The window is 61 days long. It is the sale day, plus 30 days before it, plus 30 days after it. The rule also reaches a spouse: "If you sell stock and your spouse or a corporation you control buys substantially identical stock, you also have a wash sale."
Where a reinvestment fits
Pub 550 explains dividend reinvestment in another section. It says a plan "lets you choose to use your dividends to buy (through an agent) more shares of stock in the corporation instead of receiving the dividends in cash."
So a reinvestment is a buy of shares of the same company. The wash sale section itself never names dividend reinvestment plans. I searched it for the words "reinvest" and "DRIP" and found neither. What it does say is "Buy substantially identical stock". Shares of the stock you just sold at a loss are as identical as stock gets.
One more line matters. Pub 550 says that "you cannot deduct a loss from a wash sale even if it is not reported on Form 1099-B." Your broker's form is a help, not the rule.
Where the disallowed loss goes
A wash sale doesn't erase a loss. Pub 550 moves it:
"If your loss was disallowed because of the wash sale rules, add the disallowed loss to the cost of the new stock or securities (except in (4) above). The result is your basis in the new stock or securities. This adjustment postpones the loss deduction until the disposition of the new stock or securities. Your holding period for the new stock or securities includes the holding period of the stock or securities sold."
The "(4)" is the IRA case. There the loss is not added to the IRA's shares.
How many shares count
A reinvestment is almost always a small buy. Pub 550 has a rule for when "the number of shares of substantially identical stock or securities you buy within 30 days before or after the sale is either more or less than the number of shares you sold":
"You do this by matching the shares bought with an equal number of the shares sold. Match the shares bought in the same order that you bought them, beginning with the first shares bought. The shares or securities so matched are subject to the wash sale rules."
Its own example: a $1,000 loss on 100 shares, 75 shares bought within 30 days before the sale. The IRS says "you cannot deduct the loss ($750) on 75 shares. You can deduct the loss ($250) on the other 25 shares." The loss is split by share count.
A worked example (hypothetical)
This is an illustration with made-up numbers. "Company X" doesn't exist.
You bought 100 shares of Company X at $60 each, $6,000 in all. Company X pays $0.51 a share. On Jan 20 the dividend is $51.00. Your DRIP buys at $50, so it adds 1.02 shares ($51.00 ÷ $50). On Feb 1, 12 days later, you sell your original 100 shares at $50. That's $5,000, a loss of −$1,000.
The reinvestment fell inside the 30 days before the sale. This applies Pub 550's matching rule to a DRIP buy:
| Step | Number |
|---|---|
| Loss on the 100 shares sold | −$1,000.00 |
| Shares bought by the DRIP in the window | 1.02 |
| Share of the loss matched to them | 1.02 ÷ 100 = 1.02% |
| Loss disallowed | $1,000.00 × 1.02% = $10.20 |
| Loss that can still be deducted | $1,000.00 − $10.20 = $989.80 |
Now the basis of the 1.02 DRIP shares, using the Pub 550 step "add the disallowed loss to the cost":
| Amount | |
|---|---|
| Cost of the DRIP shares | $51.00 |
| Disallowed loss added | $10.20 |
| New basis of the 1.02 shares | $61.20 |
Check it a second way. $61.20 ÷ 1.02 shares is $60.00 a share. That's what you paid for the original shares. The loss didn't vanish. It rode along into the new shares, and the holding period came with it.
Pub 550's example uses whole shares. This one splits the loss by share count, the same way its 50-and-25-share example does.
The after-the-sale case
The window runs both ways. Say you sell 50 of your 100 shares at a loss, and keep 50. If the dividend on those 50 is reinvested within 30 days after the sale, that buy is inside the window too. The matching rule works the same: the loss on the shares sold is matched, share for share, with the shares bought.
The Canadian rule: superficial loss
The CRA calls it a superficial loss. These are quotes from its guide T4037, Capital Gains, chapter 5, "Superficial loss".
"A superficial loss can occur when you dispose of capital property for a loss and both of the following conditions are met:"
The first condition is that you, or someone affiliated with you, "buys, or has a right to buy, the same or identical property (called "substituted property")" and "during the period starting 30 calendar days before the sale and ending 30 calendar days after the sale". The second is that you, or that person, "still owns, or has a right to buy, the substituted property 30 calendar days after the sale".
The CRA lists affiliated people. They include "you and your spouse or common-law partner" and "you and a corporation that is controlled by you or your spouse or common-law partner".
If the loss is superficial, "you cannot deduct it when you calculate your income for the year". Instead, "you can usually add the amount of the superficial loss to the adjusted cost base of the substituted property". The CRA says: "This will decrease your capital gain or increase your capital loss when you sell the substituted property."
The two rules have the same shape: a 30-day window each side, a loss that is put off, and the loss usually added to the cost of the new shares. The Canadian rule has a second test, that you still own the shares 30 days after the sale. Reinvestment plans aren't named in that section. Canadian readers can compare how a synthetic DRIP changes your ACB. For the options version of both rules, see wash sale rule examples with options and the superficial loss rule with options.
Check your own dates
The agencies' text is above. Your sale date, your DRIP pay dates and your lots decide the answer. Our last day to sell for a tax loss page has the dates for the year.
For the basics of reinvesting, read DRIP vs taking dividends in cash and reinvested dividends: taxes and cost basis. To see the share counts on real dividends, try how to calculate dividend reinvestment, then the dividend reinvestment calculator.
To see which reinvestment dates fall inside the window, put your sale date into the wash sale window calculator.
Questions
Can a dividend reinvestment cause a wash sale?
A reinvestment buys shares of the same company. Pub 550 says a wash sale happens when you sell at a loss and, within 30 days before or after, "Buy substantially identical stock or securities". The Pub doesn't name reinvestment plans in that section.
How many days is the wash sale window?
Thirty days before the sale and thirty days after it, plus the sale day. That makes 61 days in all.
What happens to a loss that a wash sale disallows?
Pub 550 says to add it to the cost of the new shares. That postpones the deduction until you dispose of the new shares.
Does a small DRIP buy disallow my whole loss?
Pub 550 matches shares bought with an equal number of shares sold. A small buy matches only that many of the shares you sold, so only that part of the loss is affected.
What is the Canadian version?
A superficial loss. The CRA says it applies when you or an affiliated person buys the same or identical property within 30 calendar days before or after the sale and still owns it 30 calendar days after. The loss can usually be added to the adjusted cost base.
Follow along