Quick Answer
Automated tax-loss harvesting tools are generally reliable at dodging wash sales inside the one account they control, since they can track every trade they place and swap into a correlated-but-not-identical replacement security. Where they fall short is visibility beyond their own walls. A sale in your taxable brokerage account can still be disallowed if you, your spouse, or a linked IRA buys the same or a substantially identical security somewhere the platform can’t see. Before trusting any harvesting engine, the real question isn’t whether it harvests losses well — it’s whether it can see your entire household’s accounts, not just the one it manages.
Tax-loss harvesting sounds mechanical: sell a loser, capture the loss, buy something similar, move on. The rule that governs it is anything but mechanical. Section 1091 of the tax code, better known as the wash sale rule, was written decades before anyone imagined software rebalancing thousands of tax lots overnight. The rule’s language is short. Its practical footprint is not, and that gap between a short statute and a sprawling set of real-world trading patterns is exactly where automated platforms sometimes stumble.
This guide walks through how the wash sale rule actually works, how robo-advisors and direct indexing platforms try to stay inside its lines, and the specific blind spot — cross-account and household-level purchases — that trips up even sophisticated automation. It ends with an evaluation framework you can use to judge whether your own platform, or one you’re considering, actually protects you.
What the Wash Sale Rule Actually Blocks
The rule itself is narrow in scope but wide in effect. If you sell a security at a loss and buy the same security, or one the IRS considers “substantially identical,” within 30 days before or 30 days after the sale, the loss is disallowed for that tax year. Count both windows together and you get a 61-day danger zone: 30 days before the sale, the day of the sale itself, and 30 days after.
Disallowance doesn’t usually mean the loss vanishes. In a normal taxable-to-taxable wash sale, the disallowed amount gets added to the cost basis of the replacement shares you bought. You’ve deferred the tax benefit, not destroyed it — the loss will eventually show up when you sell those replacement shares, assuming they’re still worth less than their new, higher basis. That deferral mechanic is one reason many investors shrug off the rule as a paperwork inconvenience rather than a real cost.
That shrug is a mistake in at least one common scenario, which we’ll get to shortly, where the loss isn’t deferred at all. It’s simply gone.
The “Substantially Identical” Test Nobody Can Fully Define
The IRS has never published a precise, mechanical test for “substantially identical.” Case law and agency guidance give a few clear anchor points and leave a lot of gray area in between:
- Same company, same class of stock: Selling 100 shares of a company and buying 100 shares of the same company is obviously identical, even if the shares came from a different lot or a different broker.
- Options and convertible securities: A call option, warrant, or convertible bond on the same underlying stock can be treated as substantially identical to the stock itself, depending on the facts.
- Different companies in the same industry: Selling one bank stock and buying a different bank stock is not a wash sale. Different issuers are different securities, even if they move together.
- Two funds tracking the same index: This is the gray zone. Two S&P 500 index funds from different providers hold nearly identical portfolios and produce nearly identical returns. The IRS hasn’t issued a clean ruling declaring them substantially identical, and most practitioners treat them as distinct securities, but the conservative view is that the more two funds resemble each other in composition, the closer you get to the line.
Automated platforms lean hard on that last distinction. Because two broad-market ETFs from different sponsors are treated as legally distinct, an algorithm can sell one and buy the other without technically violating the rule, even though the economic exposure barely changes. That’s the loophole direct indexing and robo-advisor engines are built around, and it’s a legitimate one — the tax code doesn’t punish you for maintaining similar market exposure, only for holding the identical security.
A Decision Framework: Is Your Automated Platform Actually Protecting You?
Before comparing specific platforms, it helps to have a short sequence of questions you can run against any tool, whether it’s a robo-advisor, a direct indexing SMA, or a DIY harvesting script you built yourself. Answer these in order, because each one gates the next.
- Does it monitor accounts beyond the one it trades in? If the platform only manages a single taxable account and has no visibility into your IRA, your 401(k), your spouse’s brokerage account, or a second advisor’s account, it can only ever be half-informed. Everything downstream depends on this answer.
- What logic picks the replacement security, and how close is “close”? A platform that swaps into a genuinely different holding (a different sector weighting, a different index provider, a different asset class tilt) is doing something meaningfully different from one that swaps into a fund that tracks the identical benchmark with a near-identical constituent list.
- Can you actually see why a trade happened, after the fact? If a harvested loss gets disallowed, does the platform tell you, show you which purchase caused it, and adjust your reporting accordingly — or does the number just quietly change on your 1099-B with no explanation?
A platform that scores well on the first question but poorly on the third is still a risk, because you won’t know when something went wrong until your tax preparer flags it. A platform that scores well on all three, but only inside its own four walls, is still exposed to the household-level blind spot this guide keeps circling back to.
Evaluation Criteria for Choosing or Auditing a Harvesting Engine
These three criteria map directly onto the decision framework above, but they’re worth unpacking individually because vendors describe them very differently in marketing materials than in their actual terms of service.
Cross-Account Visibility
Ask specifically whether the platform aggregates held-away accounts, meaning accounts at other custodians that you’ve linked for viewing purposes, and whether that aggregation actually feeds the wash-sale engine or just powers a net-worth dashboard. Many aggregation features exist purely for display. A dashboard that shows your outside IRA balance next to your managed account is not the same thing as a trading engine that checks that IRA’s transaction history before harvesting a loss. Read the fine print, or better, ask support directly: “If I buy this same fund in my external IRA next week, will your system know?”
Replacement-Security Selection Logic
Direct indexing platforms typically swap individual stocks for other individual stocks in the same sector (selling Pepsi to buy Coca-Cola, to use the industry’s favorite example), which creates a genuine economic difference between the sold and bought position. Robo-advisors managing pooled ETF portfolios more often swap between two funds tracking the same or a closely related index. Both approaches are legally sound, but they carry different levels of “tracking error risk” — the chance your portfolio’s actual performance drifts from what you expected. A platform that discloses its specific substitute pairs, rather than describing the logic in vague terms, is easier to evaluate and trust.
Reporting Transparency
The best test here is practical: request a sample tax report or ask to see last year’s wash sale disallowance summary before you commit assets. A platform with strong reporting will show you, lot by lot, which sales were flagged, why, and how the basis adjustment was calculated. A platform with weak reporting hands you a single net number at year-end and expects you to trust the math.
How Platforms Compare: Wash-Sale Avoidance Approaches
The table below groups common platform structures by how they typically handle the three criteria above. Treat this as a starting framework for your own due diligence rather than a verdict on any specific brand, since individual platforms vary and update their systems over time.
| Platform Structure | Cross-Account Visibility | Replacement-Security Logic | Reporting Depth |
|---|---|---|---|
| Single-provider robo-advisor (taxable + IRA at one firm) | Sees its own linked accounts at that firm; usually blind to outside custodians and a spouse’s accounts | Swaps between two or three pre-approved ETF pairs tracking similar indexes | Annual summary; some offer lot-level detail on request |
| Direct indexing SMA | Sees the managed account only, occasionally other accounts at the same custodian if explicitly linked | Stock-for-stock substitution within sector, generally strong economic differentiation | Detailed lot-level statements, often the most transparent tier |
| Multi-custodian aggregator-linked platform | Can ingest held-away account data if the investor connects it, but coverage depends on what gets linked and kept current | Varies by underlying strategy; some route to direct indexing, some to ETF swaps | Mixed; strongest when the same firm also prepares your tax return |
| Self-directed / DIY harvesting | Only as good as the investor’s own memory and spreadsheet discipline across every account, including a spouse’s | Entirely manual; risk of choosing a replacement that’s too close to the original | Whatever the investor tracks; brokerage 1099-B flags some but not all cross-account washes |
Illustrative Visibility Gap: What a Harvesting Engine Can Actually See
Share of a household’s relevant purchase activity that falls inside a single platform’s wash-sale scan, by account-linkage scope. Figures are illustrative estimates used to show the general shape of the problem, not measured statistics for any named platform.
For a deeper look at how one specific automation approach — direct indexing — builds its replacement portfolios and compares against plain ETF ownership, see our comparison of direct indexing and ETFs for tax-loss harvesting, which covers the mechanics of stock-level substitution in more depth.
Worked Example: A Household Wash Sale Nobody Caught
Consider a couple, Maria and Tom, filing jointly. Maria’s taxable brokerage account is managed by a robo-advisor doing automated tax-loss harvesting. Tom has a traditional IRA at a different firm, set to automatically reinvest dividends.
In March, the robo-advisor sells a broad U.S. total-market fund inside Maria’s account at a loss of $8,400, immediately replacing it with a similar but distinct fund from another sponsor. Clean trade, no violation — two different funds, no wash sale.
Three weeks later, Tom’s IRA pays a quarterly dividend on a position that happens to be the exact same total-market fund Maria’s account just sold. The dividend reinvestment program automatically buys more shares of that identical fund inside Tom’s IRA. Neither platform has any idea the other transaction happened. Tom’s broker doesn’t manage Maria’s account. Maria’s robo-advisor has never heard of Tom’s IRA.
Here’s where the couple’s paperwork gets complicated. Section 1091 by its literal text applies to purchases by “the taxpayer,” and Maria and Tom are, on paper, two separate taxpayers who happen to file a joint return. But tax practitioners generally treat purchases made by a spouse, especially when the couple files jointly and the accounts function as shared household wealth, as falling inside the same wash-sale net out of caution. Courts and the IRS have leaned on related-party and substance-over-form principles in adjacent contexts to disregard transactions structured through a spouse when the economic position barely changed. Reasonable preparers differ on how aggressively to apply that caution to every case, but the safer assumption — and the one most CPAs recommend — is to treat a spouse’s purchase as capable of triggering a wash sale on your own sale.
It gets worse if the reinvestment had happened inside Maria’s own IRA rather than Tom’s. Revenue Ruling 2008-5 addresses exactly that scenario: when a taxpayer sells a security at a loss in a taxable account and repurchases a substantially identical security in their own IRA within the 61-day window, the loss is disallowed, and unlike a normal wash sale, it is not added to the basis of the IRA shares in any way that will ever produce a tax benefit. Traditional IRA withdrawals are taxed as ordinary income regardless of the account’s internal cost basis, so the higher basis inside the IRA does nothing for you. The $8,400 loss doesn’t get deferred. It’s simply gone.
Deferred Loss vs. Permanently Lost Loss
Same $8,400 disallowed loss, two very different outcomes depending on where the replacement purchase happened
Taxable-to-taxable wash sale: loss added to basis of replacement shares, recoverable later
Repurchase inside an IRA: loss permanently disallowed, no future basis benefit
Dashed line marks the full $8,400 loss the investor originally expected to claim.
Maria’s robo-advisor did exactly what it promised inside its own account. The disallowance came from a purchase it never had any way of seeing. That’s the mechanism behind most cross-account wash sales: not carelessness inside any one platform, but a structural blind spot between platforms.
Common Mistakes Investors Make With Automated Harvesting
- Assuming “automated” means “comprehensive.” A platform automating trades inside its own account isn’t automating a check against your entire financial life.
- Forgetting about dividend and capital gains reinvestment programs. A DRIP setting quietly buying shares every quarter is a common, invisible trigger, because nobody thinks of a reinvestment as a “purchase” in the same way they think of a deliberate trade.
- Running two robo-advisors that don’t talk to each other. Splitting assets across two automated managers to diversify platform risk can accidentally double the wash-sale exposure if both hold overlapping funds.
- Ignoring 401(k) self-directed brokerage windows. A workplace retirement plan’s brokerage window can hold the same funds as a taxable account, and it rarely appears in any wash-sale monitoring at all.
- Treating a spouse’s account as off-limits information. Couples sometimes keep investment accounts fairly separate for privacy or historical reasons, which makes it easy to forget that a joint tax return ties the outcomes together even when the accounts stay apart.
- Buying back “too similar” a replacement manually. Investors who try to harvest losses by hand sometimes swap between two S&P 500 funds from different sponsors and assume that’s automatically safe. It’s the industry’s common practice, not a guarantee written into the tax code.
A Practical Checklist Before You Trust the Automation
- List every account that holds investments: taxable brokerage, Roth and traditional IRAs, 401(k) brokerage windows, HSAs with investment options, and a spouse’s accounts of every type.
- Check which of those accounts have dividend or capital gains reinvestment turned on, and whether any of them hold funds that overlap with your harvesting platform’s core holdings.
- Ask your platform directly, in writing, whether its wash-sale logic includes linked outside accounts or only the account it trades.
- Request a sample lot-level report showing how a prior disallowance was calculated and disclosed.
- If you and your spouse both hold managed or automated accounts, share a simple shared log of any manual trades near month-end, since that’s when most reinvestment programs execute.
- Review your 1099-B each year specifically for wash sale adjustment codes, and cross-reference any flagged lots against purchases in accounts the platform doesn’t manage.
- When in doubt about a specific trade, wait the full 31 days rather than relying on a platform’s real-time confirmation that a purchase is “safe.”
Key Takeaways
- The wash sale rule blocks a claimed loss when you buy the same or a substantially identical security within 30 days before or after the sale, an effective 61-day window.
- Automated harvesting engines are generally competent inside the account they trade, choosing correlated but legally distinct replacement securities to stay compliant.
- The biggest gap is visibility: most platforms cannot see purchases in outside accounts, a spouse’s accounts, or dividend reinvestment programs running quietly in the background.
- A wash sale caused by a purchase inside your own IRA is not merely deferred under Revenue Ruling 2008-5 — it can be permanently lost, with no future basis benefit.
- Evaluating a platform means checking three things directly: cross-account visibility, the logic behind replacement-security selection, and how transparent the reporting is when something gets disallowed.
- The safest practice for households is to treat every linked account, including a spouse’s, as part of one shared 61-day window, rather than trusting any single platform’s internal view.
Frequently Asked Questions
Does selling a stock at a loss and buying it back in my IRA trigger a wash sale?
Yes. Under Revenue Ruling 2008-5, if you sell a security at a loss in a taxable account and buy a substantially identical security in your IRA within the 30-day window before or after the sale, the loss is disallowed. Unlike a standard wash sale, the disallowed amount does not get added to a basis that will ever produce a future tax benefit, so the loss is effectively gone for good.
Can my spouse’s trades cause a wash sale in my account?
The statute technically refers to “the taxpayer,” but most tax professionals recommend treating a spouse’s purchases as capable of triggering a wash sale, particularly for joint filers, since the IRS and courts have applied related-party reasoning in similar situations. Treating spousal accounts as part of the same wash-sale window is the more conservative and generally safer approach.
Do robo-advisors and direct indexing platforms check my other accounts before harvesting a loss?
Usually not, unless you’ve specifically linked an outside account and the platform confirms that linkage feeds its wash-sale logic rather than just a balance dashboard. Most platforms only monitor the account or accounts they directly manage.
What counts as a “substantially identical” replacement security?
There’s no precise bright-line test. The same company’s stock, or an option or convertible tied to it, is treated as identical. Different companies, even in the same industry, are not. Two funds from different providers tracking the same index sit in a gray area; most practitioners treat them as distinct securities, but the more similar the holdings, the closer the substitution gets to the line.
What happens to a disallowed loss? Is it gone forever?
It depends on where the replacement purchase happened. In a normal taxable-to-taxable wash sale, the disallowed loss is added to the cost basis of the replacement shares, so it’s deferred rather than lost. When the replacement purchase happens inside a traditional or Roth IRA, the loss is typically lost permanently, because IRA basis doesn’t translate into a future taxable benefit the way it does in a regular brokerage account.
How many days do I need to wait before buying back the same security?
Wait at least 31 calendar days after the sale, and make sure you haven’t also purchased the same or a substantially identical security in the 30 days before the sale. Counting both sides gives you a 61-day window to stay clear of.
References
- Internal Revenue Service, “Publication 550: Investment Income and Expenses,” section on wash sales.
- Internal Revenue Service, Revenue Ruling 2008-5, regarding wash sales involving IRA purchases.
- 26 U.S.C. Section 1091, Internal Revenue Code, loss from wash sales of stock or securities.
- Financial Industry Regulatory Authority, investor guidance on tax-loss harvesting and cost basis reporting.
- U.S. Securities and Exchange Commission, investor bulletins on robo-advisory services and automated investment management.






