If you're like most investors, you're angling to find that stock that will turn $1,000 into a cool million. It's not an easy feat, but it has been done before, and it's likely to happen again. And some of the stocks that have accomplished this feat may surprise you.

1. Home Depot: $28.3 million

If you had invested $1,000 in Home Depot's (HD 0.80%) initial public offering in 1981, set your dividends to reinvest, and not touched that investment since then, you'd have a position worth more than $28 million today.

Home Depot is the largest home improvement retail chain in the world with $152 billion in trailing-12-month sales. It has achieved its success through store expansion, giving customers an enormous selection, and developing a world-class omnichannel strategy before that became a necessary part of every retail business.

Home Depot is struggling in the current economy, but it has enough of a track record for investors to feel confident about its prospects for a rebound. It pays a reliable and growing dividend, and it's an excellent value stock option.

2. Walmart: $4.8 million

Walmart (WMT -0.25%) is the largest company in the world by sales, and if you had made a $1,000 investment in its initial public offering way back in 1970, when it had only 38 stores, your stake today (with dividends reinvested) would be worth $4.8 million.

Walmart has since expanded to more than 10,000 stores worldwide through expansion and acquisitions. Tens of millions of shoppers rely on it for essentials at discounted prices, and it consistently finds new ways to generate higher sales and profits. It demonstrates resilience when there's inflation because its loyal shoppers know they'll get great prices at its ubiquitous stores. It has also become a significant player in e-commerce.

Walmart is a safe stock that offers security for a diversified portfolio.

3. Amazon: $1.9 million

Amazon (AMZN -2.33%), which went public in 1997, is the youngest company on this list. If you had invested $1,000 at that time, your stake would be worth $1.9 million today.

Amazon is the only high-growth stock on this list. That's not just because it's younger -- and thus earlier in its growth cycle -- but because it has so many growth drivers. It's a leader in generative artificial intelligence (AI) and it's the top global player in e-commerce and cloud computing. And that's just the beginning.

Amazon stock still offers investors tremendous growth opportunities, and it's an excellent choice to supercharge your investments.

4. Costco: $1.5 million

Costco Wholesale (COST -0.07%) went public in 1985, and $1,000 invested at that time would have grown into a stake worth nearly $1.5 million today. Like Home Depot and Walmart, Costco pays a dividend that, reinvested over decades, adds a lot to the principal and takes the compound growth effect to the next level.

Costco operates fewer than 900 locations worldwide, but each huge warehouse packs a punch. Its membership model leads to customer loyalty, sales growth, and high profitability, and its rock-bottom prices give it resilience.

Costco is still opening stores at a steady pace and should still beat the market for the foreseeable future.

What should investors do now?

Notice that three out of four of these are not tech companies. When Costco, Walmart, and Home Depot went public, the stock market was a very different beast. There was no internet back then, and there wasn't a ton of information available for the average individual investor. In those days, you had to use a broker to trade. Still, I don't think they would have garnered the same enthusiasm as tech innovators. All of them operate using (deceptively) simple retail models.

My point is that you don't necessarily have to find the next Amazon to make an investment that can grow into a fortune. You're better off looking for a great company that has a large opportunity and delivers a great product. Then invest and let compound growth work its magic for a few decades.

It's virtually impossible for any of these companies to grow a thousand-fold again from their current sizes. That doesn't mean they aren't great picks for your portfolio. I would invest in all of them, and also invest in other great (but smaller) companies that could eventually become the next stocks to turn $1,000 into $1 million.