If you want to become a millionaire, the stock market is one of the best places where you can accumulate wealth. The S&P 500 averages long-term returns of 10%. If you saved up $100,000 and generated those types of returns, it would take approximately 24 years for you to get to the $1 million mark. That means that even if you didn't amass that type of savings until you were in your early 40s, you could still become a millionaire by retirement.

However, if you don't want to invest in a broad exchange-traded fund (ETF) that simply mirrors the S&P 500, you can also build up your own portfolio of individual stocks. Today, I'll look at whether CVS Health (CVS -1.07%) may potentially be an investment that gets your portfolio to $1 million, all on its own.

The company has been active in looking at growth opportunities

One thing that a good growth stock needs to remain a solid buy over the years is an appetite for growth. And CVS definitely has that. In the past, it has even been preparing for the metaverse, securing patents for an opportunity that could be many years away from becoming a reality.

A report from the Wall Street Journal has also suggested that the healthcare company is looking to expand its business through the acquisition of Signify Health. Signify conducts in-home health evaluations and has a market cap of less than $7 billion. CVS could potentially buy the company in cash, because as of the end of June, its cash, cash equivalents, and restricted cash balance totaled $12.5 billion. And that may not be the only big move the company makes. The company hinted that it could also be getting into the primary care business before the end of 2022.

There are plenty of opportunities CVS is pursuing right now that could add value to the business over the long term, and help investors earn some great returns over the years.

How the stock could get you to a million dollars

As mentioned earlier, a $100,000 investment could get to $1 million after 24 years by just mirroring the S&P 500. But if you're investing in individual stocks and picking the investments on your own, you're likely aiming to outperform the S&P, not just copy its returns.

What helps investors in this aim is that CVS pays a yield of 2.1% -- slightly better than the S&P 500 average of 1.6%. If you include the dividend and reinvest it into the stock, there's potential there to improve your odds of outperforming the market.

Over the past decade, CVS's returns (including dividends) total 190%, averaging a compounded annual growth rate (CAGR) of 11%. That's below the S&P 500's total returns of 260% during that time frame. But the positive is that the business could get a whole lot broader and more diverse (today its focus is on pharmacy retail and health insurance coverage through Aetna), which could lead to better results in the future.

If the stock's total returns were to climb to a CAGR of 13%, then it would take close to 19 years for a $100,000 investment to reach $1 million. However, if you're investing in just one stock, you're probably going to invest a more modest amount. At a $25,000 investment, you'd need roughly 30 years of compounding at 13% to reach $1 million.

CVS could play a big part in growing your portfolio to $1 million

There's a path for a $25,000 investment in CVS to make you a millionaire, but it will require a lot of investing years plus a sustained growth rate that's higher than what the stock has been averaging of late. There's no question that it's a bullish outlook. I wouldn't rely on CVS alone to get my portfolio to $1 million, but it's definitely a stock that can be part of a larger group of investments to help you reach that mark.