More
    InvestingWash Sale Rules and Automated Harvesting: A Decision Guide for Investors

    Wash Sale Rules and Automated Harvesting: A Decision Guide for Investors

    Categories

    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.

    1. 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.
    2. 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.
    3. 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 StructureCross-Account VisibilityReplacement-Security LogicReporting 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 accountsSwaps between two or three pre-approved ETF pairs tracking similar indexesAnnual summary; some offer lot-level detail on request
    Direct indexing SMASees the managed account only, occasionally other accounts at the same custodian if explicitly linkedStock-for-stock substitution within sector, generally strong economic differentiationDetailed lot-level statements, often the most transparent tier
    Multi-custodian aggregator-linked platformCan ingest held-away account data if the investor connects it, but coverage depends on what gets linked and kept currentVaries by underlying strategy; some route to direct indexing, some to ETF swapsMixed; strongest when the same firm also prepares your tax return
    Self-directed / DIY harvestingOnly as good as the investor’s own memory and spreadsheet discipline across every account, including a spouse’sEntirely manual; risk of choosing a replacement that’s too close to the originalWhatever 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.

    The account the platform directly trades100%
    Same-provider linked accounts (taxable + IRA at one broker)~60%
    Cross-custodian accounts (outside brokerage, 401(k), HSA)~15%
    A spouse’s or partner’s accounts, any custodian~5%

    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

    $8,400

    Taxable-to-taxable wash sale: loss added to basis of replacement shares, recoverable later

    $0

    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

    1. Internal Revenue Service, “Publication 550: Investment Income and Expenses,” section on wash sales.
    2. Internal Revenue Service, Revenue Ruling 2008-5, regarding wash sales involving IRA purchases.
    3. 26 U.S.C. Section 1091, Internal Revenue Code, loss from wash sales of stock or securities.
    4. Financial Industry Regulatory Authority, investor guidance on tax-loss harvesting and cost basis reporting.
    5. U.S. Securities and Exchange Commission, investor bulletins on robo-advisory services and automated investment management.

    Alexander Reed
    Alexander Reed
    Alexander Reed is a financial educator and former credit counselor who writes with the calm, practical voice you wish your bank used. Raised in Cleveland, Ohio, and later based in Edinburgh, Scotland, Alex brings a grounded, transatlantic perspective to the topics most people quietly stress about: rebuilding credit, getting out of debt, and making money choices that actually fit real life.After graduating with a Bachelor’s in Economics from Ohio State, Alex began his career at a nonprofit credit counseling agency where he sat across the table from thousands of people—nurses, rideshare drivers, small business owners—mapping out budgets and calling creditors together. Those early years taught him that most “bad” financial decisions are just normal human decisions made under stress and uncertainty, and that systems matter as much as willpower. He later completed a postgraduate certificate in Behavioral Finance and is a CFP® candidate, blending human psychology with the math of money.Alex has since consulted for fintech startups on responsible credit products and has contributed curriculum to adult-education programs on topics like credit utilization, debt payoff frameworks, negotiating with lenders, and rebuilding after setbacks. His writing style is warm and direct: he translates jargon, shows his work, and isn’t afraid to share the scripts he actually uses on the phone with banks.These days, Alex focuses on helping readers create credit-positive routines they can keep on a busy week—automations that nudge balances down, calendar check-ins that take 10 minutes, and clear thresholds for when to refinance or leave a product behind. When he’s off the clock, you’ll find him walking the Water of Leith with a thermos of coffee, restoring a secondhand road bike, or perfecting a cast-iron skillet pizza that is absolutely better than takeout.

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    Recent Posts

    More
      ETF Share Class Conversions and What They Mean for You

      ETF Share Class Conversions and What They Mean for You

      0
      Quick answer: ETF share class relief is a set of individual exemptive orders the SEC has granted to specific fund companies, letting them bolt...
      Active ETF Growth The Structural Reasons ETFs Are Overtaking Mutual Funds

      Active ETF Growth: The Structural Reasons ETFs Are Overtaking Mutual Funds

      0
      The mutual fund industry spent seventy years training investors to accept an annual tax bill they never asked for. Every December, actively managed funds...
      Tax-Loss Harvesting Automation: What It Actually Saves

      Tax-Loss Harvesting Automation: What It Actually Saves

      0
      Quick answer: Automated tax-loss harvesting rarely eliminates taxes — it postpones them. The system sells a losing position, books the loss against gains or...
      Direct Indexing in 2027 What It Really Costs After the Fee War

      Direct Indexing in 2027: What It Really Costs After the Fee War

      0
      Quick Answer Direct indexing now costs roughly 15 to 40 basis points a year at most digital platforms, down from the 75 to 125 basis...
      Evergreen Private Equity Funds for Individual Investors A Practical Guide

      Evergreen Private Equity Funds for Individual Investors: A Practical Guide

      0
      Quick Answer An evergreen private equity fund is a perpetual-life vehicle with no fixed end date, continuous monthly or quarterly subscriptions, and limited quarterly redemption...

      More From Author

      More

        State Residency Audits and Domicile Tests: How High-Tax States Prove You Never Left

        Quick Answer A state residency audit tests whether you actually moved, not whether you filled out a change-of-address form. Auditors in New York, California, New...

        Employer of Record Tax Risk: What the Contract Doesn’t Cover

        By Finance Fundamentals Staff. Reviewed for accuracy by a member of our editorial team with a background in international employment tax and cross-border payroll...

        ETF Share Class Conversions and What They Mean for You

        Quick answer: ETF share class relief is a set of individual exemptive orders the SEC has granted to specific fund companies, letting them bolt...

        Active ETF Growth: The Structural Reasons ETFs Are Overtaking Mutual Funds

        The mutual fund industry spent seventy years training investors to accept an annual tax bill they never asked for. Every December, actively managed funds...