Your best friend in long-term investing is compound growth .

If you're looking for truly life-changing wealth, you need to hold top-performing stocks for a long period of time. The best way to do this is to simply find high-quality companies and let compounding interest work its magic. Early investors to stocks like Starbucks (SBUX -0.77%)Nike (NKE -1.10%), and Home Depot (HD -0.37%) know this well. Each one of these stocks has turned $10,000 invested in its IPO into more than $1 million today. 

Let's take a closer look to see how that happened to each one. 

A man flicking out $100 bills.

Image source: Getty Images.

1. Starbucks

Starbucks today is the world's biggest coffee chain and the second-largest restaurant business behind McDonald's. In 1992, when the company IPO'd, it was much smaller and only beginning to gain traction in the U.S. Starbucks had just 165 stores that year.  However, CEO Howard Schultz had found a transformative idea: Bring the Italian café experience to the U.S. That idea not only made Starbucks a huge success but also spawned a new industry of coffee shops serving espresso drinks like lattes and cappuccinos. 

Today, Starbucks has more than 30,000 stores around the world. It's growing quickly in China and has become a mainstay on supermarket shelves and convenience stores in addition to its ubiquitous café business. The company has faced challenges along the way, including after Schultz stepped down in the 2000s and its cafés became commoditized. But the stock has been a monster throughout most of its history.

According to the chart below, the stock has gained nearly 35,000% since its 1992 debut. 

SBUX Chart

SBUX data by YCharts

Along the way, the company has split its stock by 2-for-1 six times, meaning an IPO investor would hold 64 shares for every one they held in 1992. In other words, the $17 share back then is now 64 shares worth $117 each, or about $7,500. By that math, $10,000 invested in Starbucks' 1992 IPO would be worth more than $4 million currently, and that doesn't even factor in the dividends the company began paying in 2010.

2. Nike

Much like Starbucks, Nike was still in its relative infancy when the stock debuted in 1980. At the time, Nike was a scrappy running shoe company. Converse dominated, and no one had heard of Michael Jordan. As far as streetwear, Adidas was the leader.

That all changed with the help of Jordan's superstardom, the Air Jordan line, the elevation of basketball and the NBA on the global stage, and the evolution of sneakers as high fashion and a staple of streetwear. 

Today, Nike commands an enviable roster of athletes, including LeBron James, Serena Williams, and Cristiano Ronaldo, and it's developed a direct-to-consumer business that's accelerating innovation, expanding its profit margins, giving it more control of the customer experience, and adding value for it customers.  

There's no deep secret to Nike's success. A combination of savvy marketing, smart product innovation and design, and the rise of sports in the broader culture have all propelled Nike to where it is today. 

Since the 1980 IPO, the stock has appreciated more than 88,000%.  

NKE Chart

NKE data by YCharts

The sportswear giant has issued seven 2-for-1 splits since 1980, meaning 1 share back then would now be 128 shares at a current stock price of $159. In other words, the IPO share that was just $10.50 is now worth more than $20,000. Using that math, $10,000 invested in Nike's IPO would today be worth nearly $20 million. That also does not include dividends, which the company began paying in 2004.

3. Home Depot

Home improvement retailer Home Depot IPO'd in 1981 just three years after its founding. Back then, the company had just a few stores in the Atlanta area but embraced a philosophy similar to Walmart in general merchandise. Home Depot opened cavernous warehouses, dwarfing the typical hardware store, offered low prices, and staffed its stores with knowledgeable employees who could assist customers in all manner of do-it-yourself (DIY) home-improvement projects. That big-box store model, economies of scale, and emphasis on DIY and customer-service professionals have proven to be a winning combination for Home Depot especially as home prices have boomed over the last generation.

Today, Home Depot is the leader in what is effectively a duopoly in home-improvement retail along with Lowe's. The company has more than 2,000 stores and a high-margin business that allows it to reinvest in areas like supply chain, technology, and omnichannel fulfillment, and return cash to investors through dividends and share repurchases.

Since its IPO, Home Depot has been one of the best-performing stocks on the market, increasing more than 1,500,000%.

HD Chart

HD data by YCharts

Home Depot has had 13 stock splits over its history, ranging from 2-for-1 to 5-for-4. If you bought one share of the stock for its IPO price for $12 a share, it would now be equal to 342 shares worth about $111,000. Had you invested $10,000 at that IPO price, it would be valued at a whopping $92.5 million today. With that return, you could have invested just $100 and come away a millionaire, especially when factoring in dividends.

All three of these stocks show how compound growth can work wonders in investing. If you can find the next Home Depot or Nike when they're still small, you could become a millionaire with just a small investment.