Dexcom (DXCM -0.47%) went public on April 14, 2005. The stock opened at $12.08 a share. At that price, an investment of $1,000 would have gotten you 82 shares.

That investment would have been a leap of faith, as the company had no revenues at that point. But in a year, Dexcom would release its first commercial product, the STS Continuous Glucose Monitoring System. It consisted of a tiny device inserted under the skin of a diabetes patient. Dexcom's system provided real-time glucose measurements, alerting the user if their blood sugar levels were too high or too low.

various medical devices produced and sold by Dexcom are shown on a white background.

Various Dexcom products. Image source: Dexcom.

The stock went up -- and then way, way down

At first, the stock market reacted favorably to the introduction of Dexcom's first commercial product. By 2006, an IPO investor would have doubled their money. In a little over a year, that $1,000 investment would be worth over $2,000, as the share price hit $25 a share in May. Unfortunately, the stock crashed at that point. It fell back under the IPO price later that year, hitting $9 a share in October.

In 2007, the stock stayed under the IPO price all year, so early investors were still underwater. In 2008, the entire stock market crashed, sending Dexcom shares down to penny stock territory. The share price dropped all the way to $1.42. 

What could you do? Of course, as a stock investor, there are only three things you can do: buy, sell, or hold.

If you admitted defeat, you would have sold your shares and taken your losses. Dexcom would have been a horrible investment for you. 

What if you bought more? You might've realized that the stock market crash of 2008 had little to do with diabetes. Maybe you were a user of Dexcom's device and loved the product. Perhaps you saw this market panic as an opportunity, and you invested another $1,000 in the company, picking up another 704 shares. So, if you were a crazy optimist, you held 786 shares of Dexcom, the penny stock.

What if you didn't want to admit defeat, but you weren't feeling optimistic, either? After three years of investing in Dexcom, you'd lost almost 90% of your money. Your IPO investment in Dexcom would now be worth $116.44. Maybe at this point, you just shrug and do nothing.

Action in 2008 Share count Total Investment Share price in 2020 Result
Sell shares 0 $1,000 $383.06 ($883.56)
Invest another $1,000 786 $2,000 $383.06 $301,085
Do nothing 82 $1,000 $383.06 $31,410

Share price from Yahoo! Finance

Why was Dexcom such a fantastic stock?

Diabetes is a killer. According to the Centers for Disease Control and Prevention (CDC), diabetes is the seventh-leading cause of death in the U.S. The CDC says that regular blood sugar monitoring is the most important thing you can do to manage your diabetes. Monitoring your glucose levels can "help delay or prevent diabetes complications such as heart attack, stroke, kidney disease, blindness, and amputation."

Continuous glucose monitoring is a big improvement over the prior standard of care. In the past, patients had to needle-stick themselves and measure their blood sugar periodically. With Dexcom's device, diabetes patients can track their blood sugar at any time, all the time. There are no gaps in monitoring, and the device warns the patient when glucose levels are too high or too low. 

In 2014, after nine years in the stock market, Dexcom saw demand for its continuous glucose monitoring systems rise. Sales rose by 62%. While the company was not yet profitable, it was cash-flow positive, and shares were trading for $35.90.

At that point, Dexcom wasn't a secret anymore. It was obvious that continuous glucose monitoring was an innovation that was winning in the marketplace. Dexcom rode that wave. IPO investors were sitting on a triple.

What about the brave investors who bought in the dark days of 2008? They saw a 25-bagger.

Still, it wasn't too late to buy Dexcom stock in 2014. Even the people who sold out of fear could still buy back in. Investors who bought Dexcom's stock in 2014 -- nine years after the IPO -- would be rewarded with a nice 10-bagger over the next six years.           

Buying great companies at the IPO is nice. Buying great companies that are getting killed in a stock market crash is even nicer. But the most important thing in stock investing is to buy strong companies. Regardless of when investors bought Dexcom in its early years, they are sitting on huge profits now.