Tax-Loss Harvesting With AI

Last updated October 2026

Short answer

An AI assistant can help with parts of tax-loss harvesting, but only if it knows what you paid. Most brokerage connections share positions and values, not cost basis, so you supply your purchase prices, from your own records or your broker's tax-lot view. With those, an assistant can list positions below cost, check your recent buys against the wash-sale window, and explain the mechanics. It cannot give tax advice, judge whether a replacement is “substantially identical,” or file for you. Walnut does not harvest losses and does not see cost basis for holdings at your broker; it knows the purchase price only for positions bought through Walnut. This is general information, not tax advice.

Tax-loss harvesting is one of the more mechanical corners of investing, which makes people wonder whether AI can just handle it. The honest answer is that an AI assistant is useful for the arithmetic and the explaining, once you give it your purchase prices, and genuinely limited on the deciding-and-filing part. This guide covers what tax-loss harvesting is at a glance, where an AI assistant that reads your portfolio actually helps, the limits it should not cross, how that differs from automated robo harvesting, and exactly where Walnut sits. It is educational, not tax advice, and any harvest should be confirmed with a tax professional.

Tax-loss harvesting in one paragraph

Tax-loss harvesting means selling an investment that has fallen below its purchase price to realize a capital loss, which offsets your capital gains dollar for dollar and, up to a yearly limit (currently 3,000 dollars for most filers), offsets ordinary income, with any excess carried forward. You typically move the proceeds into a similar but not substantially identical fund so you stay invested. The main trap is the IRS wash-sale rule, which disallows the loss if you buy the same or a substantially identical security within 30 days before or after the sale. It only works in taxable accounts. The IRS sets out the rules in Topic 409, capital gains and losses and Publication 550, which covers wash sales. For the full mechanics, see the tax-loss harvesting and wash-sale rule guides.

Where an AI assistant actually helps

The hard part of harvesting by hand is not the concept, it is the bookkeeping: knowing which of your positions are below cost right now, and remembering what you bought recently. An assistant can do that arithmetic quickly, but it needs the inputs. Brokerage connections, including the ones AI investing apps use, generally pass positions and market values, not what you paid. So the starting point is your broker's unrealized gain and loss page or tax-lot view, which shows cost basis per lot. Give the assistant those figures and it can list the positions below cost and size each loss.

It can also flag wash-sale risk if you tell it what you bought in the last 30 days, in every account, including dividend reinvestments, and it can explain, in plain words, how the loss would offset your gains and what the wash-sale rule requires. That combination, finding candidates, warning about collisions, and explaining the rules, is exactly what a good research assistant should do: put the relevant facts in front of you so a decision is easier. It is surfacing information, not issuing instructions.

The honest limits

Just as important is what an AI assistant cannot responsibly do. It is not a tax adviser, so it should not be treated as giving tax advice or a compliance guarantee. The wash-sale rule turns on whether a replacement fund is “substantially identical,” a phrase the IRS has never fully defined, which makes it a judgment call for a professional, not a rule an algorithm can settle cleanly.

An assistant also does not see your cost basis unless you give it, does not see your entire tax picture the way a professional preparing your return can, and does not file anything. So the responsible flow is: let the AI surface candidates and risks, confirm the plan with a licensed tax professional, and then execute the trade yourself at your broker. AI shortens the finding step; it does not replace the deciding or the filing step. Treat everything it surfaces as context to verify, not tax advice.

AI assistant vs automated robo harvesting

It is worth separating two very different things that both get called “AI tax-loss harvesting.” An automated robo-advisor manages your money and executes harvesting on your behalf, selling and rebuying under its own rules, often daily, inside the accounts it controls. That is hands-off, but you hand over discretion and pay for the management, and the trades happen whether or not you were watching.

An AI assistant on top of your own broker is the opposite posture. It usually has no cost basis, so it works from purchase prices you give it, and it does not manage your money, auto-sell, or give tax advice. You stay in control, you confirm with a professional, and any trade is one you place yourself at your broker. Neither approach is universally better; they trade control against convenience, and which fits depends on how hands-on you want to be.

What AI can and cannot do, at a glance

TaskWho does itHow it works
Find candidatesAI can help, with your cost basisCompares current prices to purchase prices you supply (or your broker's tax-lot view) and lists positions below cost
Flag wash-sale riskAI can help, with your trade historyChecks the buys you tell it about, 30 days either side of a sale, and warns you
Explain the mechanicsAI can do thisDescribes losses, offsets, and the wash-sale rule in plain language
Judge 'substantially identical'Human judgmentWhether a replacement fund is too similar is a judgment call for a tax professional
Decide and fileYou and a proA licensed tax professional confirms; you or they handle the return
Execute the tradeYou, at your brokerWalnut does not harvest losses or auto-sell; any trade is one you place or approve

The line is consistent: AI is strong at the information tasks (listing positions below the cost you supply, checking the buys you list against the wash-sale window, explaining the mechanics) and out of its depth on the judgment and execution tasks (substantially identical calls, accounting for your full situation, filing, and placing the trade). Keeping that boundary is what makes an AI assistant genuinely useful without pretending to be a tax adviser. Verify anything it surfaces with a professional.

Where Walnut fits

To be clear about our own product: Walnut does not do tax-loss harvesting. The brokerage connection it uses passes your positions and their market values, not what you paid, so Walnut cannot see which of your broker holdings are below cost. The exception is positions you bought through a Walnut basket: there it records the price you paid, and its dashboard can show when those are worth less than cost, with a note on the wash-sale rule. For everything else you can give the assistant (through Claude, ChatGPT, or its built-in chat) your purchase prices and it will do the arithmetic and explain the rules, the same way any assistant would. What Walnut does with broker holdings is track each one against the S&P 500, which is a price return over a window, not your gain or loss. It never auto-sells, and any trade is one you approve and your broker executes. Walnut is not a registered investment adviser or a tax adviser, and it does not tell you what to buy, sell, or harvest. For more on how these tools compare, see best AI portfolio analyzer and AI portfolio analysis tools.

Get a recommendation for your situation

Walnut is the AI that knows your portfolio: ask anything in plain English, research any fund, and get an honest second opinion. On the broker you already use, read-only, and you approve every trade. Walnut is not a registered investment adviser.

FAQ

Can AI do tax-loss harvesting for me?

An AI assistant can help with parts of it, but it does not do it for you. To find losses it needs what you paid for each position, and most brokerage connections do not pass that, so you supply your purchase prices or read them from your broker's tax-lot or unrealized gain and loss view. With those, it can list positions below cost, check your recent buys against the wash-sale window, and explain the mechanics. It cannot give tax advice, judge whether a replacement is substantially identical, or file anything. This is general information, not tax advice.

How does an AI assistant find tax-loss harvesting candidates?

It compares each holding's current price with what you paid for it and lists the ones worth less than cost. The catch is the cost: most brokerage connections share positions and values but not purchase prices, so an assistant reading a connected account usually cannot see which holdings are underwater. Give it your cost basis per lot, from your broker's tax-lot view or your own records, and it can do the arithmetic. Confirm any loss with a tax professional.

Can AI catch wash-sale problems?

It can help flag the risk, not guarantee compliance. The wash-sale rule disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale, across all your accounts. An assistant can only check the purchases it knows about, so give it your recent trades, including dividend reinvestments. Whether two different funds are substantially identical is a judgment call the IRS has never fully defined, so a tax professional should confirm the plan. Not tax advice.

Is AI tax-loss harvesting the same as a robo-advisor doing it automatically?

No. Robo-advisors such as Wealthfront and Betterment harvest inside accounts they manage, because they hold the cost basis for every lot and trade on your behalf. An AI assistant on top of your own broker usually has no cost basis and does not trade on its own, so it can only help you think through a harvest you run yourself. Walnut is in the second group and does not harvest losses.

Does Walnut do tax-loss harvesting?

No. Walnut does not harvest losses, and it does not see cost basis for holdings at your broker, because brokerage connections do not pass it. The one exception is positions you bought through Walnut, where it knows the price you paid and can show when they are below cost. For anything else, you would bring your purchase prices from your broker's tax-lot view. Walnut is not a tax adviser or a registered investment adviser.

Does Walnut sell my losing positions automatically?

No. Walnut never sells to harvest a loss. It reads your accounts read-only by default. If you decide to place a trade through Walnut, it only sends the order to your broker after you approve it, at a broker that supports trading through Walnut. No position is harvested without you deciding to do it, which is how Walnut differs from a robo-advisor's automatic harvesting.

What can an AI assistant not do for tax-loss harvesting?

It cannot see cost basis your broker connection does not share, cannot give tax advice, cannot make the legal judgment on whether a replacement fund is substantially identical, cannot account for your full tax situation the way a professional can, and cannot file your return. It should not be treated as a compliance guarantee on the wash-sale rule either. The decision, the professional review, and the execution stay with you.

How do I use AI to help with tax-loss harvesting?

Open your broker's unrealized gain and loss or tax-lot page, which shows cost basis per lot. Give an AI assistant the positions that interest you with their purchase prices and dates, plus any buys of the same securities in the last 30 days. Ask it to list losses, explain how they would offset your gains, and point out wash-sale conflicts. Then confirm the plan with a tax professional and place any trade at your broker. Not tax advice.

From here, see the mechanics in tax-loss harvesting, the constraint that trips people up in the wash-sale rule, and how basis sets the loss in what is cost basis.

Walnut is informational and is not a registered investment adviser or tax adviser. This page explains how AI assistants can and cannot help with tax-loss harvesting; it is not a recommendation to buy, sell, or hold any security, and nothing here is tax advice. Walnut reads connected accounts, does not see cost basis for broker holdings, and does not harvest losses or execute trades automatically. Investing involves risk, including the possible loss of principal, and past performance does not indicate future results. Tax rules, rates, and thresholds change and depend on your individual circumstances; verify current details with the IRS or a licensed professional before making any decision. Do your own research or consult a licensed financial or tax professional.

Related articles