The stock market is arguably the greatest wealth creator on the planet. Though there have been short periods when other assets have outpaced equities, the broader market has been the most consistent outperformer of inflation for over a century.

Building wealth in the stock market is really an exercise of the mind. It requires the analysis to pick great companies and the resolve to hang onto their stocks for long periods of time. This patience in allowing your investment thesis to play out is how Warren Buffett became one of the wealthiest people in the world.

Had you invested in foundational companies like Amazon or Starbucks at the turn of the century (Dec. 31, 1999), you'd be up on your initial investment by around 4,000%. These are fantastic returns, but still nowhere near the returns of the biggest gainers of the century.

If you'd invested $10,000 into the following four stocks at the beginning of the 21st century, or whenever they went public, you'd have $1.6 million or more today.

A messy stack of one hundred dollar bills.

Image source: Getty Images.

Apple: $1.62 million

This may not come as a shock, but the kingpin of tech innovation has been a huge winner over the past 21 years. Investors who had the wherewithal to invest $10,000 into Apple (NASDAQ:AAPL) and let it grow over time (I'm talking about you, Forrest Gump) would have seen their initial investment top $1.6 million this century.

There's no question that Apple's iPhone completely revolutionized the company. Despite an exceptionally crowded field, Apple's many iterations of the iPhone have maintained the top smartphone market share spot in the U.S.

Apple's CEOs (the late Steve Jobs and Tim Cook) have also successfully kept the company ahead of the innovation curve. Cook has been positioning Apple to take advantage of growth on the services side of the business for the past couple of years. Services are home to high-margin subscription revenue, which will help reduce the sales lumpiness occasionally associated with physical products, like the iPhone, iPad, and Mac.

Even now, as the largest publicly traded U.S. company, Apple shows no signs of slowing down.

The front of a Tractor Supply retail store.

Image source: Tractor Supply.

Tractor Supply: $1.67 million

If feel-good American growth stories are more your thing, you'll be interested in the nation's largest farm supplies and equipment chain. Had you bought $10,000 worth of Tractor Supply (NASDAQ:TSCO) stock on Dec. 31, 1999, you'd have almost $1.7 million now.

To partly steal a line from successful entrepreneur Marcus Lemonis, the CEO of Camping World and the star of The Profit, Tractor Supply is successful because of its "people and process." The company goes out of its way to hire employees with firsthand knowledge of what they're selling. In other words, it's often farmers and ranchers selling to other farmers and ranchers. That makes each visit meaningful for the company's customers, and it results in a lot of sales. Since 2000, Tractor Supply's full-year sales have grown from $759 million to an estimated $10.4 billion in 2020.

As for the process, the company aims to be a one-stop shop, similar to what you see at Walmart or Costco, but without the 100,000-square-foot locations. By having virtually every product that rural customers might need for their farms or livestock, Tractor Supply has ensured that its competition isn't grabbing any low-hanging fruit. 

With Tractor Supply also spending aggressively on digitization, it'll soon have yet another element to build trust with rural consumers and improve its operating efficiency. 

Two happy kids lying on a rug and watching TV, with their parents on the couch in the background.

Image source: Getty Images.

Netflix: $4.11 million

Even though it didn't make its debut as a public company until May 2002, FAANG stock member Netflix (NASDAQ:NFLX) is still the second best-performing stock of the century. A $10,000 investment into Netflix at the closing bell on its first day of trading would be worth just over $4.1 million today.

For much of its early existence, Netflix focused on the DVD-by-mail model. While mailing movies to members was profitable, Netflix saw the future of content demand shifting and took action. Beginning in 2007, it began to focus on streaming content. Little did investors know at the time that this early leap of faith would pay off enormously.

In 2012, Netflix not only embraced streaming, but also began investing in its own original content. House of Cards, the company's first original series, was a resounding success. As of the end of September 2020, Netflix had amassed 195.2 million global streaming subscribers, with the company more than quadrupling its annual generally accepted accounting principles (GAAP) operating margin since 2016. 

Though I've been critical of the company's ongoing cash burn, Wall Street appears perfectly content to allow Netflix to spend aggressively to acquire overseas subscribers.

The tops of multiple energy drink cans.

Image source: Getty Images.

Monster Beverage: $10.32 million

But if you wanted to really impress your friends and family, you'd have purchased shares of Monster Beverage (NASDAQ:MNST) at the turn of the century. Back then, the company was known as Hansen's Natural. An investment of $10,000 into this Monster some 21 years ago would be worth more than $10 million today (a greater than 103,000% gain).

If you're wondering how such impressive gains are possible from a beverage company, you can primarily look to energy drinks for your answer. Back in the early 2000s, Hansen's Natural had a very small percentage of the energy drink market. According to data from research firm T4, Monster accounted for 39% of all energy drink market share in 2020, with NOS (also owned by Monster) picking up another 3% share. This high-growth category, especially with teens and young adults, has been a multidecade winner. 

Monster's success in the energy drink market also caught the attention of beverage giant Coca-Cola (NYSE:KO). In August 2014, Coca-Cola invested $2.15 billion into Monster, equating to a 17% stake in the company. Additionally, the two companies essentially swapped assets, with Monster sending its non-energy drink line of products to Coke, and Coca-Cola allowing Monster to take control of its energy drink products. This is how Monster came to control the NOS and Full Throttle brands. 

Monster's large share of the energy-drink market continues to yield high single-digit to low double-digit annual sales growth.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.