Skip to content
Ritholtz Wealth Management logo 10,563 reviews

How Ritholtz Wealth Management explains tax-loss harvesting and the wash sale

By Marcus Thompson, CFA | Reviewed by Hiroshi Tanaka, CFP | October 31, 2026

Tax-loss harvesting works only if no account in your household buys the same fund in the 30 days before the trade or the 30 days after it, so Ritholtz Wealth Management lists every wash sale trigger before a loss sale.

Many careful investors assume the wash sale rule stops at the edge of the brokerage account. It does not: purchases in an IRA, a Roth IRA or a spouse's account count too, and a loss matched by an IRA purchase is lost for good.

The trade-off is tracking a 61-day period against a potentially useful tax loss. Readers usually underrate the automatic purchase: the quiet biweekly 401(k) deposit, a dividend reinvestment, or a spouse's retirement-account contribution after the taxable sale.

This matters differently once work ends. A paycheck can keep buying a fund while you sell it at a loss in taxable accounts; later, taxable investments may supply monthly spending, and a capital-loss carryforward can offset gains created by those sales.

When the paycheck still buys the fund you want to sell

A loss sale in the taxable account and a purchase in the 401(k) can feel like separate worlds. The wash sale rule disagrees. Buy a substantially identical security in the 30 days before the loss sale or the 30 days after it, and the matched part of the loss is disallowed.

Financial Planning OverviewKey financial planning considerationsFinancial Planning OverviewAssessmentReview your current financial situation1StrategyDevelop a personalized plan2ImplementationPut your plan into action3MonitoringReview and adjust regularly4Key Areas of Financial PlanningA structured approach helps you stay on trackRitholtz Wealth Management

The IRS addressed IRA and Roth IRA purchases in Revenue Ruling 2008-5. A purchase in either account can trigger the rule, even though the accounts do not appear beside the brokerage account on one screen. The IRS has not expressly spelled out treatment for 401(k) purchases, but Ritholtz Wealth Management takes the cautious view and treats them as potential triggers.

While Ramon still receives a paycheck, his 401(k) can buy shares every two weeks without much thought. Once that paycheck stops, those purchases stop too, while the brokerage account may begin sending $4,000 a month toward spending. That cash-flow change is why the same loss sale deserves a different review before and after retirement.

A payroll purchase can be the collision

Important: count 30 days before the trade date, the trade date itself, and 30 days after it. That is a 61-day wash sale window.

Popular beliefs that trip careful investors

“A different account is a different taxpayer” is a tempting belief. For a married household, purchases by either spouse can matter, including purchases in a spouse’s IRA or Roth IRA. Filing status does not turn a spouse’s purchase into a separate event for this purpose.

“The loss always comes back through basis” is only partly right. If replacement shares are bought in a taxable account, the disallowed loss is generally added to those shares’ basis. When the matching purchase sits in an IRA or Roth IRA, Revenue Ruling 2008-5 says there is no comparable basis adjustment, so that portion disappears.

“A tiny reinvested dividend cannot matter” also fails. The purchase can create a partial disallowance, share for share. A $300 reinvestment can disallow the loss tied to roughly $300 of replacement shares.

“A new ticker makes it safe” is not a reliable test. A different share class of the same fund is risky, and two funds tracking the same index can be hard to defend as different. The IRS has not drawn a bright line for every pair of funds, which is a poor place to get clever.

The account boundary is not the boundary

Tiny automatic buys still count

Thirty-one days before the sale: paperwork to pull

Thirty-one days before a planned loss sale, pull the records that show both the shares you will sell and every way the household could repurchase them. The brokerage’s unrealized gain/loss page provides lot-level basis; use specific lots rather than accepting an average result. A loss on one lot may be useful while another lot of the same fund has a gain.

The 401(k) plan website or latest quarterly statement shows contribution elections, fund choices and payroll timing. Mark each pay date that lands in the 61-day window. A payroll department may take one or two cycles to process an election change, so do not assume a click today changes Friday’s deposit.

Open the settings pages for every IRA and Roth IRA, for both spouses. Look for dividend reinvestment, recurring purchases and automatic investing. The purchase that causes trouble is often a setting nobody changed because nobody remembered it existed.

Pull last year’s tax return as well. Schedule D shows any capital-loss carryforward, and the brokerage realized gain/loss report shows gains booked so far this year. Form 8949 is where sales and adjustments are reported to the IRS. The records are mundane. So is the error they prevent.

Records from the brokerage

Records from retirement accounts

First moves when a 401(k) and brokerage account share a fund

Before you sell, check every household account for a scheduled buy of the same fund in the 30 days ahead of the trade or the 30 days after it, and change that purchase first. If it cannot be changed, the loss on the matching shares may be disallowed. We keep this shortcut cautious on purpose. Moving one payroll election takes minutes, while an IRA-matched wash sale costs part of the loss for good.

Do the calendar work before placing a trade. Changing the 401(k) payroll election at least 30 days ahead avoids a purchase before the sale, while pausing it after the sale protects the other half of the window. A bond fund can be a temporary destination, but only if that short change does not distort the portfolio more than the tax benefit is worth.

Put the purchase change first

  • 401(k) election: Redirect future deposits to a fund tracking a different index or to a suitable bond fund before the sale.
  • Dividend settings: Turn off reinvestment for the fund in each household account, including a spouse’s IRA.
  • Replacement choice: Pick the taxable-account replacement before selling, then mark day 31 on the calendar.

How different does a replacement fund have to be?

A replacement fund should keep your intended stock-and-bond mix while reducing the chance that the IRS sees it as substantially identical. A total-market stock fund replacing an S&P 500 fund is generally viewed by many practitioners as a more defensible swap than another share class of the same S&P 500 fund, though no fund pair comes with an IRS blessing.

Keep the economic job similar. Replacing a US stock fund with a US stock fund leaves the portfolio exposed to the market during the waiting period. Selling a stock fund and sitting in cash because you expect a rebound, or because you fear one, turns a tax task into a market forecast.

Before Ritholtz Wealth Management suggests a replacement, it compares the index, holdings overlap and expense ratio, then estimates the gain that replacement could carry if you later switch back. The choice rests on broad diversification, not a prediction about which ticker will recover first. For a wider account map, see tax-efficient investing across taxable and retirement accounts.

Preserve the portfolio’s job

Avoid the same-index shuffle

Sale day, step by step

On sale day, work in an order that leaves a record. The sale can occur after the prior 30 days are clean, but the next 30 days still need watching. Specific identification matters because it lets you sell the lots with the largest loss while keeping other lots untouched.

A harvested loss does not make an investment safer. Every investment can decline below its purchase price, and the loss only affects the tax side of a decline.

  • 1. Prior purchases: Confirm no household account bought the fund in the prior 30 days.
  • 2. Lots: Sell the highest-loss lots using specific identification.
  • 3. Replacement: Buy the selected replacement in taxable accounts the same day.
  • 4. Evidence: Save trade confirmations and the chosen-lot record.
  • 5. Day 31: Review paused payroll purchases and dividend settings.

Ramon and Yolanda, two versions of the same December

For illustration, hypothetical Ramon and Yolanda are ages 61 and 59. Ramon is a civil engineer at a private firm and Yolanda is a retired chemistry teacher receiving a small state pension. Their $1.1M household balance includes a $200K brokerage account. They hold an S&P 500 index fund there that cost $80K and is now worth $60K, producing a $20K loss if sold.

Ramon’s 401(k) payroll election buys the same fund with $1,500 each paycheck, counting his deferral and match. Four paychecks land inside the wash sale window. The arithmetic is plain: 4 × $1,500 equals $6K of purchases. At roughly the same share price, $6K is 10% of the $60K of shares sold.

Ten percent of the $20K loss is $2K, so $20K minus $2K leaves an $18K usable loss. The replacement shares in this version sit in Ramon's 401(k), and a 401(k) gives that $2K no home as basis. If the loss would have offset gains taxed at 15%, leaving the payroll election pointed at the same S&P 500 fund cost Ramon and Yolanda about $300.

An otherwise identical couple changes the 401(k) election to a bond fund for those four paychecks. No matching shares are bought, so the full $20K loss remains available. The point is not that bonds are better for four weeks. The point is that the contribution change occurs before the sale, and the household knows why it made it.

Carefulness produced the problem in the first version. Ramon continued saving steadily. The IRS limit for 2026 permits a $24,500 401(k) employee deferral, and the higher catch-up for ages 60 through 63 is $11,250. His routine was sensible; it just collided with a taxable-account trade.

The assumption behind the comparison is flat prices during the window. Look especially at the usable loss and the years needed if no capital gains appear. This site’s calculator can help check the loss and carryforward arithmetic, but it cannot see a spouse’s reinvestment setting unless you enter it.

Ritholtz Wealth Management treats the schedule as part of the investment decision. A loss sale without the payroll calendar is incomplete work. And once retirement begins, the issue may shift: taxable sales can generate gains for monthly withdrawals, so a carryforward has a clearer job to do.

Suppose the couple later needs $50K from taxable investments for spending and the sold shares carry $15K of gains. The $18K carryforward first offsets the full $15K gain, then can offset $3K of ordinary income. The $20K carryforward from the cleaner version does the same that year and leaves $2K for later. That difference is not dramatic enough to justify wrecking the portfolio, but it is real.

In a taxable account, the replacement fund is bought at the lower price, so it starts with a lower basis than the shares that were sold. A later sale of the replacement can realize more gain, which means harvesting mostly defers tax and does not erase it. Current law may step up basis on shares held until death. Congress can rewrite estate and tax law, so Ritholtz Wealth Management does not build a spending plan around that exception.

For people approaching retirement, the better question is often where next year’s cash flow will come from. A loss carryforward is most useful when it offsets gains created by planned taxable-account sales. Retirement income planning and Social Security claiming deserve their own review; neither should be bent around a $300 wash-sale mistake.

Four payroll deposits change the tax result

What the carryforward can do after work ends

Hypothetical Ramon and Yolanda: $60K of an S&P 500 fund sold at a $20K loss, before and after redirecting 401(k) purchases of $1,500 a paycheck; prices assumed flat in the window
ItemBefore the changeAfter the change
Loss realized in brokerage$20K$20K
401(k) buys of same fund in window$6K$0
Loss disallowed$2K$0
Loss usable on the return$18K$20K
Years at $3K against ordinary income only6 yearsabout 7 years

The disallowed loss inside a 401(k) or IRA does not come back

A wash sale matched by taxable replacement shares generally postpones the loss because it increases the basis of the new shares. A wash sale matched by an IRA or Roth IRA purchase is harsher: Revenue Ruling 2008-5 provides no basis adjustment in that retirement account, so the matched loss is permanently unavailable.

For illustration, Patrice sells $48K of a total-market fund that cost $60K, creating a $12K loss. Twenty days later, his wife Teresa contributes $24K to her SEP-IRA for a consulting year and buys the same fund. At roughly the same price, $24K buys half as many shares as Patrice sold. Half the loss, $6K, is disallowed and gone.

A SEP-IRA contribution can be made until the tax filing due date, including extensions. Waiting until day 31 would have preserved the $12K loss. The money was not invested badly; the purchase date was bad for the loss sale.

The IRS has ruled on IRA and Roth IRA purchases, but has not expressly resolved every 401(k) fact pattern. This is general education, and your tax preparer should determine final reporting treatment.

Why IRA matches are permanent

A late SEP-IRA purchase can still collide

How long until the 61-day window closes?

The 61-day window closes after 30 days before the sale, the trade date, and 30 days after it; day 31 after the sale is the first day a household can restart purchases of the original fund. Count trade dates, not the day cash settles. Put the restart date on the calendar when you place the sale.

Switching back on day 31 is allowed, but it may create a new taxable event. If the replacement rose while you held it, selling it realizes a gain. Many households simply retain the replacement, particularly when it still fills the same diversified stock role.

Dividend reinvestment deserves a last check. It is easy to restart payroll deposits and leave a mutual-fund distribution setting off, or the reverse. Neither outcome is fatal. Both are easier to manage when written down.

By December 31: trade date decides the tax year

For a loss sale, the trade date decides which return it belongs on; settlement of the cash is irrelevant. A trade placed on December 31 can therefore go on that year's return. Your tax preparer records the sale, its basis and any wash-sale adjustment on Form 8949, and the totals flow to Schedule D.

The calendar does not stop at New Year’s Eve. A December 31 sale leaves 30 days after the trade date in January. Pause January 401(k) purchases and reinvestments that would buy the same fund, or the tax-year loss can still be partly disallowed.

Do not wait for a brokerage’s year-end package to reconstruct what happened. Brokers commonly report wash sales for identical securities in the same account. A purchase made in a 401(k), an IRA, or a spouse’s account may not appear on that 1099-B. Your household calendar fills that gap.

January still belongs to the window

How much of the loss reaches your paycheck-free years?

Net capital losses are applied against capital gains first, one for one. After that they can reduce up to $3,000 of ordinary income a year, or $1,500 for married people filing separately. Whatever remains carries forward for life. The IRS applies that ordering on Schedule D. A carryforward cannot pass to heirs.

For Ramon and Yolanda, an $18K carryforward can offset $15K of gains generated by selling taxable shares for living costs, then reduce $3K of ordinary income in that same year. If there were no gains, it would take six years at $3K a year to use $18K. The $20K version would take about seven years.

That is why a harvest has a cash-flow angle. During full-time work, ordinary income may be high and the $3K offset may feel modest. In retirement, planned taxable sales may create gains each month or quarter, and the carryforward can offset them immediately. Roth conversions in the gap years are related, though conversion income is ordinary income and only the $3K annual amount can offset it after capital gains are covered.

A 401(k) rollover to an IRA changes where investments sit, not the logic of a loss already taken in taxable accounts. Keep the transaction trail. Years later, nobody remembers the December payroll election.

Capital gains get first use

A carryforward is a future withdrawal tool

Singles, couples, small balances and late retirees

A single investor watches only their own accounts, though an IRA reinvestment can still ruin part of a taxable loss. A married household watches both spouses’ accounts. If married people file separately, the ordinary-income offset is only $1,500 a year, which makes a large carryforward slower to use when there are no gains.

A small taxable balance changes the economics. A loss under about $1K saves roughly $150 when it offsets a long-term gain taxed at 15%. That may not justify 61 days of calendar tracking, fund research and altered payroll deposits. It can still be worth doing if you already have the records open and a clean replacement is obvious.

An early retiree without payroll purchases has fewer collision points. A worker with biweekly 401(k) buys should change the election first. Late retirees may face a different trigger. A distribution takes money out of an IRA and buys nothing, but dividend reinvestment inside an IRA, or a spouse's retirement-account contribution, can quietly buy back the original fund.

The IRS limit for 2026 is $7,500 for combined traditional and Roth IRA contributions, plus a $1,100 catch-up at age 50 or older. Contribution room is useful, but it is not a reason to buy the same fund inside the window.

The value of a small loss

Marriage adds another purchase log

When harvesting is not worth the trouble

Skip harvesting in three cases. The first is a loss of only a few hundred dollars on a modest brokerage balance. The second is when the only available replacement would knock the portfolio's target split between stocks and bonds off course for two months. The third is when logging every purchase would turn into a part-time hobby. The tax code has enough hobbies already.

If long-term gains would be taxed at 0% this year, harvesting gains to raise basis can be the better trade. A loss is more valuable when it can offset gains taxed at a positive rate, or when future taxable withdrawals are likely to create gains. Your tax preparer can test that with the rest of the return.

Losses inside a 401(k) or IRA have no tax value to harvest. Selling a retirement-account fund at a loss may still be appropriate for allocation reasons, but calling it tax-loss harvesting gives the trade a job it cannot perform. A tax-aware schedule for selling RSUs follows the same principle: identify the tax purpose before changing the investment.

Ritholtz Wealth Management would rather leave a modest loss alone than force a bad replacement or disrupt an evidence-based allocation. Markets do not pay extra for administrative enthusiasm.

Your questions about tax-loss harvesting and the wash sale, answered

Should I redirect my 401(k) contributions or buy a different fund in my brokerage account to avoid a wash sale?

Redirecting the 401(k) payroll election is usually simpler because changing the brokerage replacement does not stop the 401(k) from buying the fund you sold. Make the payroll change before the sale when possible, then keep the taxable replacement in a similar asset category while the 61-day window runs.

Can I switch back to my original fund once the replacement has gained in value?

You can buy the original fund on day 31 after the loss sale. Selling the replacement to do that realizes any gain it has built up, so keeping the replacement is often cleaner when it still fits the portfolio. Save the dates and trade confirmations either way.

How many days must pass before my spouse's IRA can buy the fund I sold at a loss?

Your spouse’s IRA should wait until day 31 after your loss sale before buying the same fund. The 30 days before the sale count too, so a spouse’s purchase during that earlier period can already trigger a partial or full wash-sale adjustment.

Does my loss still count if my Roth IRA bought the same fund two weeks before I sold?

The loss does not count in full when a Roth IRA bought matching shares two weeks before the sale. The wash-sale window reaches 30 days before the trade date, and the portion matched by the Roth IRA purchase is disallowed without a basis adjustment.

Will my brokerage's 1099-B flag a wash sale caused by a purchase in my 401(k)?

Usually no. A brokerage generally reports wash sales it can see for identical securities in the same account, while a 401(k) purchase sits outside that brokerage record. Keep your own household trade calendar and give the complete facts to the person preparing Form 8949 and Schedule D.

Can harvested losses reduce the tax on a Roth conversion?

Only modestly after capital gains are offset. Roth conversion income is ordinary income, and net capital losses can offset up to $3,000 of ordinary income a year, or $1,500 for married people filing separately. Larger carryforwards remain available for future years.

Does the wash sale rule apply when I sell a fund at a gain?

No. The wash sale rule disallows losses, not gains, so selling a fund at a gain and buying it again right away does not create a wash sale. The sale may still produce a taxable gain, and that tax applies no matter when you repurchase.

How small a loss is too small to bother harvesting?

As a shortcut, a loss below about $1K is worth roughly $150 when it offsets a gain taxed at 15%. That often does not justify 61 days of tracking payroll deposits, dividend reinvestment and spouse accounts, particularly if the replacement fund is awkward.

The automatic purchases Ritholtz Wealth Management lists before any loss sale

Ritholtz Wealth Management starts by listing every automatic household purchase, including 401(k) payroll elections, IRA and Roth IRA dividend reinvestment, and a spouse’s SEP-IRA contribution, next to brokerage lots showing a loss.

It then checks last year’s Schedule D carryforward and realized gains so far this year before naming a replacement fund. The purpose is to identify trades that collide, not to promise a tax result.

The biweekly 401(k) deposit is often the wash sale investors never see.

Sources

This article provides general information only and is not individualized investment, tax or legal advice. Investing involves risk, including the possible loss of principal. Talk to a qualified professional about your specific situation before making any financial moves.

Request information