Growth-oriented businesses can make for great investments because they are always reinvesting back into their operations. And if the businesses focus on areas of the economy that are continuing to grow, that can lead to some incredible returns.

Two stocks that have turned $40,000 investments into more than $1 million over the past decade are DexCom (DXCM 0.33%) and Tesla (TSLA -3.55%). Here's a look at why they have done so well and whether they can still be good buys moving forward.

1. DexCom

Diabetes is a growing concern for the healthcare industry as the disease is related to many other health problems. And while 28.7 million people have been diagnosed with diabetes in the U.S., according to data from the Centers for Disease Control and Prevention (CDC), there's another 8.5 million people that it estimates are undiagnosed. An estimated 38% of the adult U.S. population has pre-diabetes, which in many cases will end up resulting in diabetes.

DexCom, which makes continuous glucose monitoring (CGM) devices that help people stay on top of their blood glucose levels, has made for a phenomenal growth investment over the years. In the past decade the company's top line has soared, and the business is now consistently profitable as well.

DXCM Revenue (Annual) Chart

DXCM Revenue (Annual) data by YCharts

The company's future looks bright as DexCom is always coming out with newer, smaller devices to help make monitoring glucose levels easier than before. Late last year, the Food and Drug Administration approved the company's G7 device for use in all types of diabetes, for anyone two years of age and older. The new device is 60% smaller than the previous iteration, and DexCom calls it "the most accurate CGM cleared by the FDA."

Investing $40,000 into the stock a decade ago would have been enough to get your investment to over $1 million today. It was a much riskier stock back then; in 2012, DexCom was coming off a year when sales were $100 million, and its net loss of $54.5 million was more than half of its top line.

Today, DexCom is a much safer investment, and while it may not produce the same kinds of returns over the next decade, this is still a great stock to buy and hold, given the ongoing need to manage diabetes.

2. Tesla

Tesla's performance over the past decade has been even more impressive than DexCom's. Investing $40,000 into the electric vehicle maker's stock would have resulted in your portfolio being worth $2.7 million today.

In 2012, Tesla's revenue of $413 million had more than doubled the previous year's tally, but the problem was that the company was deeply unprofitable, with its net loss of $396 million that year being nearly as high as its revenue. 

Now, however, Tesla is a top company and is included within the S&P 500. Last year, it generated $81.5 billion in revenue and earned a profit of $12.6 billion, for a net margin of 15%. The company can afford to cut prices as it has done multiple times this year in order to help generate more demand.

Tesla has established itself as a leading company in the electric vehicle market, and globally that industry should grow at an annualized rate of about 24% through 2028, according to estimates from Fortune Business Insights. 

Concerns about climate change and the need for more environmentally friendly cars are reasons why Tesla can continue to be a great growth stock in the future. Like DexCom, it may no longer be able to replicate the gains of the past decade, but it can still be a good buy.

There is some risk, however, given the growing number of competitors entering the lucrative EV space, and there is also the possibility that developing fully autonomous vehicles may end up being a pipe dream. But if you're comfortable with those risks, this can still be a good buy right now, especially with the stock down 50% from its 52-week high.