When to sell a stock

Last updated October 2026

Short answer

Investors typically sell when the reason they bought no longer holds, when a position has grown too large and concentrated, when they need to rebalance, or when they have a better use for the money. Selling on price swings or emotion is the common mistake. Rating services (Zacks, Seeking Alpha, Morningstar) rate tickers; to get a keep, trim or exit read on the stocks you actually own, a tool has to read your holdings. Walnut connects your broker read-only and gives each holding a keep, trim or exit read based on its return against the S&P 500, its momentum and its size in your portfolio. It is analysis, not advice, and it does not know your cost basis.

Knowing when to sell is the hardest part of investing. Buying is exciting and gets all the attention. Selling is quiet, undertaught, and where most of the regret lives. The goal is not to call the exact top, that is luck, not skill. It is to sell for a reason you can write down and defend later. Here is a framework, and how AI can pressure-test it.

What “the right time to sell” really means

Most selling advice is built around price: sell at a target, sell after a 20% gain, sell when it doubles. Price rules are easy to follow and usually wrong, because they ignore the only thing that matters, which is whether the reason you own the stock still holds.

A good sell decision answers one question: has anything changed that breaks why I bought this? If the answer is no, a higher or lower price is not, by itself, a reason to act. If the answer is yes, the price barely matters. Everything below is a way of making that question concrete.

Four reasons to sell a stock

1. The thesis broke

You bought for a reason: a growth story, a moat, a turnaround, a dividend. If that reason stops being true, the stock no longer belongs in your portfolio, regardless of the price. A software company whose growth stalled, a retailer losing its core customer, a chip name that fell out of the AI buildout: those are broken theses, not dips.

2. The position got too big

A winner that ran can quietly become 30% or 40% of your portfolio. That is no longer a bet, it is a concentration risk. Trimming it back to a deliberate weight keeps the company in your portfolio while refusing to let one stock decide your entire outcome.

3. It has lagged the market for a long stretch, with no catalyst

One bad quarter is noise. Trailing the S&P 500 for a year or more, with weakening momentum and nothing on the horizon to change it, is a signal. The opportunity cost is real: money stuck in a chronic laggard is money not working somewhere better.

4. You found a better use for the money, or you need it

Sometimes the cleanest reason to sell is that a different idea is simply more compelling, or that life needs the cash: a house, a tax bill, an emergency fund. Both are legitimate. Your portfolio exists to serve your goals, not the other way around.

When to sell a stock at a loss

Selling a loser is harder than selling a winner, and the reason is mostly psychological. Two biases do the damage. The first is the sunk cost trap: the money you already lost feels like a reason to stay, as if holding could earn it back. It cannot. The loss happened the day the price fell, whether or not you sell. The second is anchoring to the price you paid, which turns a decision about the future into a hope about the past.

The arithmetic makes anchoring expensive. A stock that falls 50% needs to rise 100% to get you back to even. A stock that falls 30% needs about 43%. Waiting for breakeven can mean years of capital tied up in one of the weaker names you own, when the same money could be compounding somewhere you actually believe in.

1. Run the thesis check, not the price check

The useful question is the same one as for any sale: would you buy this stock today, at today's price, for the reason you originally bought it? If the answer is yes, the drop may simply be the market repricing the whole sector, and holding is defensible. If the answer is no, because revenue growth stalled, a key product failed, debt is climbing, or management changed the story, then the loss is telling you something true and the price you paid is irrelevant to what happens next.

A worked example. You bought 100 shares at $80, or $8,000. They now trade at $50, so the position is worth $5,000 and you are down $3,000. If you would not buy $5,000 of this stock today, you are effectively choosing to buy it every day you keep holding it. That framing strips out the $3,000 you cannot get back and leaves only the decision you can still make.

2. Use the loss: tax-loss harvesting

In a taxable account, a realized loss has value. Under IRS rules (Tax Topic 409), capital losses first offset capital gains, and if your losses exceed your gains you can deduct up to $3,000 of the excess against ordinary income each year ($1,500 if married filing separately). Anything beyond that carries forward to later years. Selling at $50 in the example above realizes the $3,000 loss, which could offset $3,000 of gains you took elsewhere this year. Losses on shares held one year or less are short-term, and over one year are long-term, which matters for how they net against your gains. The full mechanics are in our guide totax-loss harvesting. None of this applies inside an IRA or 401(k), where gains and losses are not reported each year.

3. Respect the wash-sale rule

The catch is the wash sale. According to IRS Publication 550, if you sell at a loss and within 30 days before or after the sale you buy substantially identical stock, acquire a contract or option to buy it, or buy it in your IRA or Roth IRA, the loss is disallowed for now. A purchase by your spouse, or by a corporation you control, counts too. That window spans 61 days in total. The disallowed loss is added to the cost basis of the new shares and their holding period includes the old one, so the deduction is deferred rather than destroyed, but it will not help this year's return. Dividend reinvestment is the trap people miss: an automatic reinvestment within the window is a purchase. Ourwash sale guidecovers the edge cases. If you still want exposure to the theme, people commonly wait 31 days, or buy a different company or a broader fund in the meantime. Whether a given substitute is substantially identical depends on the facts, and a tax professional is the right person to ask.

4. When not to sell a losing stock

  • When the whole market fell with it. A stock down 20% in a year the S&P 500 fell 20% has not lagged anything. Selling it to sit in cash locks in the decline without fixing a problem.
  • When the only reason is the red number. If the thesis check passes, the loss alone is not a reason. Harvesting it for tax purposes can still make sense, as long as you are fine being out of the position for 31 days.
  • When you are selling to feel better. Dumping every red position at once after a bad week is panic with a spreadsheet attached. Take the names one at a time.
  • When the loss is tiny and the trade costs more. A $40 loss is not worth a wash-sale headache or a spread on a thinly traded stock.

Walnut can help with the first half of this. Its dashboard shows how each holding you own has done against the S&P 500 over the past year, so you can tell a stock that fell with the market from one that fell on its own, and the assistant can pull current news to test whether the thesis still holds. Walnut does not see your cost basis or tax lots, so it cannot tell you how large your loss is or plan a harvest; your broker's realized and unrealized gain screens do that. Walnut is not an investment adviser, and the decision stays yours.

How to pressure-test a sell decision with AI

1. Write the original thesis in one sentence

Before you touch the sell button, state why you own it: “I own this because it is the leading picks-and-shovels play on AI compute.” If you cannot finish that sentence, that itself is informative.

2. Ask the AI what changed

Connect Walnut to Claude or ChatGPT and ask: “What has materially changed about this company in the last quarter, and does it break the thesis that it leads AI compute?” The AI pulls current news and fundamentals so your read reflects today, not the day you bought.

3. Check it against the market, not against your purchase price

Walnut's dashboard shows how each holding is tracking the S&P 500 over the past year, where the price sits in its range, and whether momentum is fading. A stock up 15% can still be a laggard if the market is up 25%. Judging against the market, not your cost basis, removes the anchoring that keeps people in dead money.

4. Get a keep, trim, or exit read, then decide

The dashboard turns all of that into a single call per holding: keep, trim, or exit, with the reasoning shown. Roughly, trim means the position is oversized or its momentum is weakening, exit means it has trailed the market materially with weak momentum, and keep means it is in line or better with no red flag. Treat it as a second opinion to argue with, not an order to follow. Any trade is yours: at brokers Walnut can trade through (Public, plus eight others including E*Trade, tastytrade and Webull) you approve it in Walnut, and elsewhere you place it at your broker.

Common selling mistakes to avoid

  • Anchoring to your purchase price. The market does not know or care what you paid. “I'll sell when it gets back to even” is a wish, not a strategy.
  • Selling winners too early. Cutting your best performers to lock in a small gain, while holding losers hoping they recover, is the most common way portfolios underperform.
  • Panic-selling on headlines. A scary headline is not the same as a broken thesis. Ask what actually changed about the business before you react to the noise.
  • Ignoring taxes. In a taxable account, selling a winner triggers a tax bill. It can still be the right move, but factor it in, and consider tax-advantaged accounts for the trades that churn most.

Try it in Walnut

Walnut reads your real holdings and shows how each one is tracking the market, then flags keep, trim, or exit so you can decide with the full picture. Informational, not personalized advice.

FAQ

How do you know when to sell a stock?

+

Sell for a reason you can write down, not a feeling. The four common ones: the reason you bought no longer holds, the position has grown too large a share of your portfolio, it has lagged the market for a long stretch with no catalyst, or you need the cash. If none of those apply, holding is usually the right default.

Should I sell a stock when it drops?

+

A price drop alone is not a sell signal. The question is why it dropped. If the business is intact and only the price fell, that is closer to a discount than a warning. If the drop reflects a broken thesis, slowing growth, or a structural change, that is a real reason to reconsider. Separate the price from the story.

Should I sell a losing stock or wait for it to come back?

+

Ask whether you would buy it today at the current price. If the reason you bought still holds, waiting can be reasonable. If the thesis broke, holding until you get back to even is anchoring, and a stock down 50% needs a 100% gain just to return to your purchase price.

Can I sell a stock at a loss and buy it back?

+

Yes, but if you buy the same or a substantially identical security within 30 days before or after the sale, the IRS wash sale rule disallows the loss for now. The disallowed loss is added to the cost basis of the new shares, so it is deferred rather than gone.

When should I sell a stock for profit?

+

Taking profit makes sense when a winner has grown into an oversized share of your portfolio, when you have a clearly better use for the money, or when you need cash for a real goal. Selling purely because a stock is up, while the reason you bought still holds, often means leaving your best performers behind too early.

Can AI tell me when to sell a stock?

+

AI can synthesize the signals fast: how a holding is tracking the market, whether momentum is fading, and how concentrated it has become. Walnut's dashboard reads your real holdings and flags each one as keep, trim, or exit for you to review. It is informational analysis to think with, not personalized advice, and the decision stays yours.

Which service tells me what to keep, trim or sell in my own portfolio?

+

Rating services such as Zacks, Seeking Alpha and Morningstar rate tickers, and small AI tools such as Portvara and BuyTune read a portfolio you type in. Walnut connects your broker read-only and gives each holding you actually own a keep, trim or exit read, based on its one-year return against the S&P 500, its momentum and its size in your portfolio. It does not know your cost basis or taxes, and it is analysis, not advice.

Related guides