Skip to main content
Updated date:

How to Use Cost Basis to Know When to Sell

Value investor with a deep passion for understanding and a desire to improve results over time.


A Different Problem

If you're anything like me, you probably started feeling comfortable with identifying stocks to buy much sooner than you felt great about selling. In particular, the 2020 stock market crash was a value-investing blessing, but it was also a curse: I ended up with a dozen or so securities that were rapidly rising above my cost basis, or the amount I spent on the stock in the first place. I know, I know: this feels an awful lot like one of those "good problems to have", but nevertheless, I suddenly had a new dilemma: when should I sell these stocks, and which ones should I try to sell first? Selling can seem vastly more tricky than buying, even with best practice style guidelines on your side. What follows is a process by which you can almost automate your selling, and then a way you can use cost basis to help with keeping your portfolio in great shape.

Why'd You Buy?

First and foremost, you absolutely have to understand why you bought the stock in the first place. Seriously, if you don't know why you own something, selling is probably the right decision in almost every circumstance or situation. Examples of why people buy, and how this might inform when to sell include:

  • Income for retirement. In this case, you've bought a stock because of the honey pot concept, whereby you can scrape the sides of the honey pot in order to get income (dividends), but you don't have to worry about the underlying stock price so much since you're not trying to sell it
  • Diversification or portfolio balance. Here, you might want to have a basket of stocks that compliment one another, so that if one sector is doing poorly, another is doing well, so you might want to keep a few underperformers in there. If a stock helps with diversification or acts as a hedge against inflation or another potential downside storm ahead, you might want to follow a process more like this active Roth IRA strategy.
  • Capital appreciation without much consideration for diversification or balance. Here, a bottom-up style of investing means you don't really care much about having a security in each sector, but instead want to buy the best value out there (or the best businesses, depending on which buying style you're using)

Clearly, each of these scenarios will lead you to draw very different conclusions about when and why to sell, so it's always important to circle back to the original question: why did you buy this stock in the first place? Simply asking this question can often lead to a more informed answer, or at least send you down a path where you're in a much better position to answer intelligently.


Opportunity Cost And Cost Basis

If you're largely in the capital appreciation camp, then these cost basis ninja tricks may be the game-changers you're looking for. First, you can use your cost basis at-a-glance in order to see whether your stock is up or down, and by how much, in order to use the investor's favorite tool: opportunity cost. Opportunity cost allows you to compare one purchase against another, and it is the very essence of economics: the study of how people decide what to use their money (or resources) on. One example of this is asking whether it would be better to spend money on something you already own, or another stock out there you don't already own. You should always ask this question first, before buying any new positions; after all, if you have a better deal right here, why on earth would you spend money on something new (leaving aside diversification and other considerations for now)? The inverse is also true: you're using cost basis in order to see whether you need to sell something you own, so you can take advantage of a new opportunity. If you have "new money" coming in, like a steady paycheck you can reinvest a set percentage of each week, then you don't always have to make the opportunity cost calculation, but it's generally a good idea to consider whether it would be better to spend the new money or sell an existing stock in order to raise funds.

Percent Change In Cost Basis Matters

One interesting phenomenon that can be tricky to understand is the relationship between your percentage gain on your original stock purchase price, and a daily percent gain in the stock on the open market. This is best illustrated by a specific example: suppose you buy shares in a company for $1000 today. Tomorrow, your stock goes up 10%, so you're up 10% on your purchase price ($100 gain on $1000 cost). So far, so good. But what happens if the stock goes up 10% tomorrow too? Well, this is where math gets a little bit nonintuitive. Your $1100 position goes up another 10% to $1210. You aren't up 20% now, though. Today's 10% move brought you to 21% up (thanks, compounding!), and if the stock goes up 10% tomorrow, your cost basis will be brought to $1331, or 33.1% above your cost basis. While nearly every investor gets excited about compounding early on, this phenomenon can continue to confound even more experienced traders, since the implications are counter to everything evolution has taught us about watching out for what's right in front of our noses. The two main takeaways here are:

  1. The closer to your original cost basis, the less a daily percentage change will matter to how much you're up or down on a stock.
  2. This means you should more closely watch the stocks you own that are already up above your cost basis, since a smaller percentage move is much more likely to send you into "sell" territory.

Saving Time

If you're using a strategy wherein you sell a stock as it approaches fair value, then utilizing cost basis percentages can help a great deal. Make a note when you buy the stock just how undervalued you think it is, and then you'll easily be able to identify when the stock is approaching fair value (EG, time to sell). Similarly, if your strategy is to let the winners run, you just need to identify how far a stock has to run above what you calculate to be fair value, and then check in closer on the stock when it's starting to get close to how far you think it should go up. It's just not possible to do a deep dive on every stock you own every single day, so having a few practical triggers like this to check in and do an updated valuation, or just to let you know to take a closer look at something you own. Quick tricks like this cost basis hack can prove invaluable when you have a deluge of information at your fingertips.

This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.

© 2021 Andrew Smith

Related Articles