If the coronavirus disease 2019 (COVID-19) pandemic has taught investors anything, it's that staying the course on great companies, no matter how dire things may seem, is almost always a prudent move.

Despite the S&P 500 undergoing 38 official stock market corrections of at least 10% since the beginning of 1950, bull market rallies have eventually put all of these downward moves, save for the current correction, into the rearview mirror. That's a resounding endorsement to buy great companies and hold them for long periods of time.

Then again, staying the course has proved more lucrative for some investors than others. Over the past six decades, five well-known businesses have made investors millionaires -- and all they needed to start with was a $1,000 investment.

A businessman looking at a messy pile of cash on a table in front of him.

Image source: Getty Images.

Berkshire Hathaway: $27.44 million

At the tippy-top of the list, miles apart from its competition, is Warren Buffett's company Berkshire Hathaway (NYSE:BRK.A)(NYSE:BRK.B). According to Berkshire's 2019 annual shareholder letter, the per-share market gain in Berkshire's stock was 2,744,062% since 1964, which equates to a $1,000 investment in 1964 being worth more than $27.4 million, as of the end of 2019. By comparison, the S&P 500 gained 19,784%, inclusive of dividends, over this same period.

One reason for this outperformance is, obviously, Warren Buffett. Buffett has always had a knack for identifying bargains in plain sight and has been known for hanging onto his top-performers for decades. A number of Buffett's largest holdings, such as Coca-Cola (NYSE:KO) and Wells Fargo, have been continuous holdings for more than 30 years.

Buffett's investment portfolio and the roughly five dozen acquisitions Berkshire has made also tend to be highly cyclical. By tying Berkshire's portfolio to the health of the U.S. and global economy, Buffett is betting on continued economic expansion. Although recessions are inevitable, historical data clearly shows that the length of economic expansions dwarfs periods of contraction.

An up-close view of multiple energy drink cans.

Image source: Getty Images.

Monster Beverage: $3.35 million

Next up is Monster Beverage (NASDAQ:MNST), which has turned an investment of $1,000 into about $3.35 million, with much of these gains coming in the last 15 years, according to data from YCharts.

How has a beverage company outperformed a stalwart like Coca-Cola so dramatically over the past couple of decades? Aside from increasing its sales from a much smaller revenue base, much of Monster's gains are tied to its growth in the energy drink market. At the end of the financial crisis, energy drinks made up a relatively small percentage of total sales. Today, however, energy drinks are Monster's single biggest sales category, with total market share (including all core energy drink brands) topping 40%. 

Monster has also been able to use its success to nab brand-name ambassadors, as well as snag a lucrative partnership with none other than Coca-Cola. In August 2014, Coca-Cola announced plans to invest $2 billion into Monster for a 17% equity stake, thusly taking control of Coke's line of energy drinks. In return, Monster sent its non-energy juice and fruit-flavored soda lineup to Coca-Cola.

A blue cloud key, with a white cloud, on a keyboard.

Image source: Getty Images.

Microsoft: $2.02 million

Another well-known company that's made investors a boatload of money since the mid-1980s is Microsoft (NASDAQ:MSFT). A $1,000 investment in Microsoft at the beginning would be worth a little more than $2 million today.

For Microsoft, its keys to success have been a combination of market share dominance, high margins, and innovation. In terms of market share dominance and juicy margins, look no further than its legacy operating system Windows. Windows and Office may not be the growth stories they once were, but Microsoft maintains a stranglehold on PC operating system market share, and continues to generate exceptionally high margins from software in its legacy operations.

Microsoft's bounty of operating cash flow has also allowed it to invest aggressively in new innovations. In particular, Microsoft is becoming a major player in the software-as-a-service cloud space. Azure has been growing at a lightning-quick pace (61% on a constant currency basis from the prior-year period in the most recent quarter), with Office 365 offering enterprises a number of higher-margin cloud services. Microsoft has its eyes on eventually hitting a $2 trillion market cap.

A couple with bagged groceries in the checkout line.

Image source: Walmart.

Walmart: $1.67 million

Even though retail stock Walmart (NYSE:WMT) has been something of a ho-hum investment over the past 20 years, it was a virtually unstoppable investment in the 1980s and 1990s. As a whole, a $1,000 investment in Walmart has turned into $1.67 million since the 1970s, according to data from YCharts.

Walmart's success in the retail space can be primarily traced to its size. Before the internet reduced overhead costs, Walmart was the kingpin at undercutting smaller businesses on price and gobbling up market share. Even with e-commerce sales growing into a larger percentage of total revenue, Walmart continues to shift its weight around in the retail space and use its deep pockets and bulk-buying tactics to undercut its competitors on price in order to drive new and recurring traffic.

That brings me to the other reason Walmart has found new life of late: its omnichannel strategy. Though Walmart was already promoting the ease-of-use with its online platform prior to COVID-19, the pandemic has heightened the benefits of two-day shipping on orders over $35, curbside pickup of orders, and Walmart's low-price guarantee.

An Amazon delivery driver speaking with a fellow employee.

Image source: Amazon.

Amazon: $1.36 million

Whereas Berkshire Hathaway, Microsoft, and Walmart have needed in the neighborhood of 55, 35, and 45 years to deliver these incredible returns for investors, e-commerce giant Amazon (NASDAQ:AMZN) hasn't even needed a quarter of a century to turn a $1,000 initial investment into $1.36 million.

Most folks know Amazon best for its e-commerce operations. Though estimates vary, Amazon controls around 40% of the U.S. e-commerce market and signed up more than 150 million people globally for Prime. These Prime memberships are particularly useful for Amazon as they provide fees that help it bolster thin retail margins, while also allowing it to be aggressive with the pricing of its products. Further, Prime members tends to spend more than non-Prime consumers and stick within Amazon's ecosystems of products and services.

Looking forward, growth is likely to be driven by Amazon Web Services (AWS). AWS is Amazon's infrastructure-as-a-service segment that allows businesses to build the foundation for their cloud. Since the end of 2018, AWS has grown from 11% of total sales to 13.5%, as of Q1 2020. This is important given that cloud services offer much better margins than retail or ad-based sales. Expect Amazon's cash flow to explode higher this decade.