How the Wash Sale Rule Affects Tax-Loss Harvesting and Rebalancing

Selling AssetsHow the Wash Sale Rule Affects Tax-Loss Harvesting and Rebalancing

Think you can sell at a loss today and buy back tomorrow to keep your allocation?
The IRS wash sale rule says not so fast.
It creates a 61-day window around every loss sale.
Buy a substantially identical security within 30 days before or after, and the loss is disallowed for that year.
That delay changes the math on tax-loss harvesting and makes rebalancing trickier, and it can permanently wipe out the loss if the replacement lands inside an IRA.
This shows what triggers a wash sale, how basis shifts, and steps to harvest losses without tripping the rule.

Understanding the Wash Sale Rule’s Impact on Loss Harvesting and Rebalancing

0cH6shIAU0Ka5bIy1famuA

The IRS wash sale rule creates a 61 day window around every loss sale. Sell a security at a loss and buy a substantially identical one within 30 days before or 30 days after, and the loss gets disallowed for the current tax year. The rule exists to stop you from claiming a deduction while immediately getting back into the same position. Selling 100 shares of an S&P 500 ETF on June 15 at a loss and buying it back on June 20 triggers a wash sale. The repurchase lands inside that 30 day window after the sale.

The disallowed loss doesn’t vanish. The IRS adds it to the cost basis of your replacement shares. Your holding period from the original shares also carries over to the replacement. This just delays the tax benefit until you sell the replacement shares. If you sell the replacement at a loss later, you can claim both the original disallowed loss (now baked into the higher basis) and the new loss. Sell at a gain and the higher basis cuts your taxable profit. But the deferral becomes a permanent loss of benefit when you buy the replacement inside an IRA or Roth. You can’t adjust basis on retirement account holdings.

Tax loss harvesting tries to capture deductible losses when markets drop, so you can offset gains elsewhere or trim up to $3,000 from ordinary income per year. Rebalancing tries to keep your target allocations in line by cutting winners and adding to losers. The wash sale rule gets in the way of both. You can’t sell a position at a loss and immediately buy it back to stay invested at your target weight. And you can’t rebalance by dumping losers in a taxable account while buying the same thing in your IRA or your spouse’s account at the same time. Every purchase across every account you control counts toward that 61 day window.

Key mechanics of the wash sale rule:

  • 30 days before and 30 days after the sale create a 61 day window where any purchase of a substantially identical security disallows the loss.
  • Disallowed losses get added to the cost basis of the replacement shares, pushing the tax benefit down the road until you sell those shares.
  • Holding periods carry over from the original shares to the replacement, which can keep long term capital gains treatment intact.
  • The rule applies across all your accounts. Taxable brokerage, IRAs, Roth IRAs, and accounts your spouse holds.
  • Replacement purchases inside retirement accounts permanently kill the loss because you can’t adjust IRA basis to reflect the disallowed amount.

Practical Timing Strategies to Avoid Triggering Wash Sales

ZLR_YCvvWSaMKm_QRbxnaQ

Counting 30 calendar days correctly is everything. The 30 day period runs from the day before the sale to 30 days before, and from the day after the sale to 30 days after. A sale on June 15 means purchases from May 16 through July 15 can trigger a wash sale. People miscount all the time. They include the sale date itself or assume “30 days” means a full month. The rule is strict and doesn’t care about months. Selling on December 15 and repurchasing on January 4 creates a wash sale even though the trades span two tax years.

Market volatility complicates timing. Waiting 31 days to buy back the same security leaves you exposed to price swings during the gap. If the security jumps, you miss gains and end up buying back at a higher price. If it drops further, you capture more unrealized losses but might hesitate to jump back in. A lot of investors balance this risk by using replacement securities that are similar but not substantially identical instead of waiting. Others accept the timing risk and set calendar reminders to repurchase on day 31, especially when they’re confident in the position and the tax savings justify the temporary gap.

Steps for timing evaluation before you execute a harvest trade:

  1. Identify the sale date and mark the 61 day window on a calendar (30 days before through 30 days after).
  2. Review all accounts you control (taxable, IRA, Roth, spouse, other brokers) for any purchases of the same or substantially identical securities inside that window.
  3. Check automatic investment schedules like dividend reinvestment plans, recurring contributions, or rebalancing programs that might buy the security without you lifting a finger.
  4. Decide whether to wait 31 days to repurchase or use a replacement security right away to stay in the market and keep your allocation on track.

What Counts as “Substantially Identical” When Harvesting Losses and Rebalancing

p7lHig04XYC-G6y7yi0pUw

The IRS doesn’t publish a list of which securities are substantially identical. The term is left to reasonable interpretation and depends on the specifics of each case. Two shares of the same stock are obviously substantially identical. Buying a call option on a stock you just sold at a loss also qualifies because the option gives you the right to buy back the same shares. Selling a bond and buying the same bond back (same issuer, maturity, coupon) triggers a wash sale. The gray area shows up with mutual funds and ETFs that track similar but not identical indexes or hold similar portfolios.

IRS Publication 550 says securities of one corporation usually aren’t substantially identical to securities of another. It also says bonds or preferred stock of a corporation aren’t ordinarily substantially identical to the common stock of the same corporation. For mutual funds, the publication notes that funds from different companies or with different investment objectives aren’t substantially identical. But these are guidelines, not hard rules. Two ETFs that track the same index with nearly identical holdings might be considered substantially identical in practice, even if different fund families issue them. You need to use judgment and play it safe when the replacement is very close to the original.

Practical Examples of Substantially Identical vs. Acceptable Substitutes

Selling an ETF that tracks the S&P 500 and immediately buying a different ETF that also tracks the S&P 500 carries wash sale risk. Both funds hold the same 500 stocks in the same proportions. Different ticker and issuer don’t eliminate the economic sameness. Many tax pros treat this swap as substantially identical and disallow the loss. Selling an S&P 500 ETF and buying a Russell 1000 ETF generally works because the Russell 1000 includes 1,000 stocks and has different weightings, even with significant overlap. Selling a large cap growth fund and buying a total market fund also works because the investment objective and holdings differ enough.

Selling a technology sector ETF and buying a broad market ETF is fine. Selling an actively managed U.S. equity fund and buying a similar actively managed fund at a different company works because the portfolio managers make independent calls and the holdings aren’t identical. Selling a bond fund with 7 to 10 year maturity and buying one with 3 to 7 year maturity works because the duration and interest rate sensitivity differ. Selling individual shares of a company and buying a broad ETF that includes that company as a small holding also works because the ETF’s diversified exposure isn’t substantially identical to a concentrated single stock position.

Numerical Examples Showing How a Wash Sale Changes Basis and Tax Outcomes

cTuU9e6XO-zPfb0WvJ98A

Getting the mechanics down requires working through the numbers. The disallowed loss doesn’t disappear. It moves from a current year deduction into the cost basis of the replacement shares, which changes the taxable gain or loss when you eventually sell the replacement.

Scenario Outcome
Single lot: Buy 100 shares at $100 = $10,000 cost. Sell at $80 = $8,000 proceeds → $2,000 realized loss. Repurchase 100 shares at $82 = $8,200 cost within 30 days. $2,000 loss disallowed. New cost basis = $8,200 + $2,000 = $10,200. If later sold at $110 = $11,000 proceeds, taxable gain = $11,000 − $10,200 = $800 (not $2,800).
Partial lot: Sell 100 shares for $2,000 loss. Repurchase 40 shares within 30 days at $3,280 cost. Disallowed loss = (40 ÷ 100) × $2,000 = $800 added to basis of 40 shares → new basis = $3,280 + $800 = $4,080. Remaining $1,200 loss is deductible in current year.

The higher basis in the replacement shares cuts future taxable gains or pumps up future deductible losses. If you hold the replacement shares long enough and the holding period from the original shares carries over, the eventual sale might qualify for long term capital gains rates even if the replacement shares themselves were held for less than a year. This keeps the character of the original investment. The deferral only becomes a real problem if you never sell the replacement shares or if you buy the replacement inside an IRA where basis adjustments don’t count. In the IRA case, the $2,000 loss is disallowed and the tax benefit is gone for good because IRA distributions get taxed as ordinary income no matter what the cost basis was.

Wash Sales Across Accounts: Taxable, IRA, Roth, Spouse, and Multi Broker Interactions

izl1JD4KVICCFUFQBaivww

The wash sale rule applies to all purchases you make, your spouse makes, or entities you control make. Selling shares in your taxable brokerage account at Broker A and repurchasing the same security in your IRA at Broker B within 30 days triggers a wash sale. The loss gets disallowed and because the replacement sits inside an IRA, you can’t add the disallowed amount to the IRA’s cost basis. The tax benefit is gone. This is the most expensive wash sale mistake investors make during tax loss harvesting.

Brokers report wash sales on Form 1099-B only for transactions they can track within the same account and CUSIP. If you sell 100 shares of stock X in your taxable account at Broker A and repurchase 100 shares of stock X in your taxable account at Broker B, Broker A won’t flag the wash sale because it can’t see Broker B’s trades. You’re responsible for identifying the wash sale, disallowing the loss, adjusting the basis at Broker B, and reporting everything correctly on Form 8949. Most brokers also can’t track purchases in your spouse’s accounts or your retirement accounts. The IRS expects you to reconcile trades across all accounts yourself.

Automatic activity creates hidden wash sale triggers. Dividend reinvestment plans that buy fractional shares every quarter can create wash sales if you sell part of a position at a loss and the DRIP buys shares back within 30 days. Systematic investment plans that dollar cost average into an IRA monthly can disallow a taxable account loss if the auto purchase lands in the 61 day window. Employer retirement plan contributions that buy company stock or target date funds can also interfere.

High risk situations that commonly trigger unintended wash sales:

  • Selling a stock in a taxable account at a loss and contributing cash to an IRA that automatically buys the same stock within 30 days.
  • Selling an ETF in your account and having your spouse buy back the same ETF in their account during the same week.
  • Realizing a loss on shares and having dividend reinvestment buy more shares of the same security 10 days later.
  • Harvesting losses in December and making a January IRA contribution that buys the same mutual fund before 30 days have gone by.

Rebalancing Complications Caused by Wash Sale Restrictions

N2rKg21VWaCg1mD9n1KK8A

Rebalancing means selling some holdings and buying others to get a portfolio back to target allocations. When a position has dropped in value, selling it generates a tax loss. If your rebalancing plan calls for keeping exposure to that same asset class or security, buying it back right away triggers a wash sale and kills the loss. You’re forced to choose between capturing the tax benefit and keeping your allocation where you want it.

A simple example shows the conflict. Your target allocation is 60% U.S. stocks and 40% bonds. U.S. stocks have dropped and now represent 55% of the portfolio. To rebalance, you need to buy more U.S. stock exposure. If you sell a different U.S. stock position at a loss and use the cash to buy back into the same or a substantially identical holding, the loss gets disallowed. If you wait 31 days to repurchase, your allocation drifts further from target during a volatile stretch. If you use a replacement security that isn’t substantially identical, you maintain allocation but introduce tracking differences and might not get the exact exposure you want.

Maintaining Allocation While Avoiding the 61 Day Window

Investors who want to harvest losses and rebalance at the same time use replacement securities. Selling an S&P 500 index fund at a loss and buying a Russell 1000 index fund keeps you invested in large cap U.S. stocks without triggering a wash sale. The funds are similar but track different indexes and hold different numbers of stocks. After 31 days, you can reverse the swap if you prefer the original fund. This two step approach saves the tax loss and keeps allocation close to target.

Another method is to rebalance into different asset classes or sectors. If large cap stocks are below target and you need to harvest a loss in a large cap holding, think about buying mid cap or small cap stocks to boost equity exposure without repurchasing the substantially identical security. You can also rebalance by trimming winners in other parts of the portfolio and using cash to eventually buy back the original position after the 30 day window closes. Timing based rebalancing accepts short term drift and uses calendar discipline to restore allocations once wash sale windows expire.

Practical Workarounds for Investors Harvesting Losses While Staying Invested

Lz879mOsVz21FXysGd4EWA

Investors who harvest losses during market drops don’t want to miss a rebound. Sitting in cash for 31 days can mean missing big gains if the market bounces back fast. The following methods let you realize tax losses while keeping money invested and allocation intact.

Wait 31 calendar days before buying back the identical security. Mark your calendar for day 31 and set a reminder. This works when you’re confident in the specific holding and willing to accept price risk during the gap. If the security rises, you buy back at a higher price but still benefit from the tax loss. If it drops further, you capture more losses and can harvest again.

Six practical workarounds to keep exposure and capture tax losses:

  • Replace the sold security with a fund that tracks a different but related index (S&P 500 to Russell 1000, total stock market to large cap blend, MSCI EAFE to FTSE Developed ex U.S.).
  • Sell an index fund and buy an actively managed fund in the same asset class, or the other way around, because the portfolios and management approaches aren’t identical.
  • Use sector or factor ETFs as temporary replacements (sell broad market, buy a mix of sector ETFs that together get you close to broad exposure).
  • Use tax lot selection to sell only high basis shares that produce small or zero losses, keeping low basis lots for future harvesting without triggering wash sales on the current trade.
  • Pause all automatic investment and dividend reinvestment programs for the security 30 days before and 30 days after the planned loss sale.
  • Rebalance by selling different positions (like winners or bonds) and use the proceeds plus the loss sale cash to buy a replacement security, avoiding repurchase of the identical holding across any account.

Calendar Timing, Year End Planning, and Cross Year Wash Sale Risks

L0fYH9wgVMKvbpu5cSG4Gw

A lot of investors speed up loss harvesting in December to cut the current year’s tax bill. Selling on December 15 and planning to buy back in early January feels safe because it crosses two tax years. But the wash sale rule doesn’t care about tax year boundaries. A sale on December 15 creates a wash sale window from November 16 through January 14. Buying back on January 4 is only 20 calendar days after the sale and triggers a wash sale. The loss gets disallowed for the prior tax year and added to the basis of shares bought in the new year.

Year end harvesting requires counting forward into January. If you sell on December 20, you can’t buy back the same security until January 20 or later. A lot of investors miss this and accidentally disallow December losses by making early January purchases. Brokers might report the disallowed loss on the Form 1099-B for the following year, which can create confusion when you’re preparing the prior year’s tax return.

Three planning steps to avoid cross year wash sale mistakes:

  1. Count 30 calendar days forward from any December sale date and mark the earliest safe repurchase date in January on your calendar.
  2. Delay any January IRA contributions or automatic investments until after the 30 day window closes if those contributions would buy securities you sold at a loss in December.
  3. Use replacement securities in late December if you want to rebalance right away, then swap back to the original holding in early February once all 30 day windows have cleared.

Reporting Wash Sales on Form 8949 and Tracking Adjusted Basis

KDaxsuqfUCC2Mx3pqrREMg

Brokers report wash sales they detect on Form 1099-B in Box 1g and adjust the reported gain or loss in Box 1d. If your broker spots a wash sale, the disallowed loss amount shows up in Box 1g and the adjusted gain or loss (usually zero or a smaller loss) appears in Box 1d. You report these figures on Form 8949 and carry the totals to Schedule D. If the broker didn’t catch a wash sale because it happened across accounts or brokers, you need to make the adjustment yourself on Form 8949 by entering the disallowed loss amount in column (g) and the corrected gain or loss in column (h).

Tracking adjusted basis is on you. When a loss gets disallowed, you need to add that amount to the cost basis of the replacement shares and update your records. Most brokers won’t automatically adjust the basis of shares bought at a different broker or in a different account. You need a spreadsheet or detailed records showing the original basis, the disallowed loss, and the new adjusted basis. When you eventually sell the replacement shares, you report the adjusted basis to calculate the correct gain or loss. Skipping the basis adjustment means you overpay tax on future gains.

Recordkeeping for wash sales requires tracking trade dates, purchase and sale prices, share quantities, and the specific accounts involved. If you sold 100 shares at a loss and bought back 40 shares within 30 days, you need to prorate the disallowed loss and adjust the basis of only the 40 replacement shares. Keep copies of trade confirmations, monthly statements, and year end tax documents from all brokers. If the IRS questions a reported loss, you need documentation showing either that no wash sale happened or that you correctly adjusted basis for any wash sale that did.

Final Words

You’ve seen the 61‑day window, how disallowed losses get added to replacement basis, and why buys in IRAs or spouse accounts can complicate harvesting and rebalancing.

Use timing, substitute funds, partial‑lot moves, and tidy records to stay invested without losing tax benefits. The calendar tips, examples, and reporting notes are meant to make this a repeatable routine.

Knowing how the wash sale rule affects tax-loss harvesting and rebalancing helps you protect gains and act with confidence. You’ve got a clear path forward.

FAQ

Q: How does the wash sale rule affect tax-loss harvesting, how does a wash sale affect your taxes, and what happens if you sell a wash sale at a loss?

A: The wash sale rule affects tax-loss harvesting, taxes, and selling at a loss by disallowing losses if you buy a substantially identical security within 30 days, adding the disallowed loss to the replacement’s cost basis and deferring the tax benefit.

Q: Does rebalancing portfolio trigger capital gains?

A: Rebalancing a portfolio can trigger capital gains when you sell appreciated holdings in taxable accounts; while wash-sale rules don’t change gains, they can disallow losses and complicate repurchases within 30 days.

Check out our other content

Check out other tags:

Most Popular Articles