Making long-term predictions is difficult. Who would have guessed 10 years ago that Nvidia would be one of the largest companies by market cap in the world? Very few.

Despite this uncertain future, I still believe it is useful for investors to look out five to 10 years and think about what companies could be much larger than they are today. Otherwise, you are just making shots in the dark and should probably buy index funds instead.

While not a certainty, I think "Magnificent Seven" giants Amazon (AMZN 0.84%) and Alphabet (GOOG -0.75%) (GOOGL -0.72%) will be the two largest companies in the world by 2030. Here's why.

1. Amazon: Put everything in the cloud

Amazon's culture of innovation has allowed it to win in multiple large product categories. Most of us know it as the dominant e-commerce platform in North America, which brings in hundreds of billions in annual sales. But it is not the most profitable segment for Amazon today: That distinction goes to Amazon Web Services (AWS).

AWS is the largest cloud infrastructure provider worldwide, bringing in $91 billion in revenue and just under $25 billion in operating income last year. Its major competitors are Microsoft Azure, Google Cloud, and other smaller providers, but AWS has remained the largest cloud service since its inception around two decades ago, with around 31% market share.

Even though AWS is already large, there is still plenty of room for the cloud to gain market share versus legacy computing solutions. Analysts expect the industry to grow at a 19% rate through 2030. If AWS can maintain its market share and profit margin profile, that will lead to the division to grow its earnings at 19% a year and hit over $90 billion in 2030. Add in the monster e-commerce division, international expansion in places such as India, and moonshots like the Project Kuiper internet service, and I think Amazon has a good chance of being one of the two largest companies in the world by 2030.

2. Alphabet: Multiple levers for growth

And who will the other be? Well, all we need to do is look at one of Amazon's cloud computing competitors.

GOOG Operating Income (TTM) Chart

GOOG Operating Income (TTM) data by YCharts

Alphabet is the parent company of Google Search, YouTube, Google Cloud, and other projects like self-driving company Waymo. Google Cloud should see the same growth benefits as AWS, growing from a $36 billion annualized revenue rate at the end of 2023 to close to $100 billion in revenue by 2030. That should generate a lot of value for Alphabet, but it's not the only ace up its sleeve.

First, we need to highlight Google Search and how much revenue it generates. The dominant search engine worldwide generated $48 billion in revenue just in the fourth quarter of 2023 and should do $200 billion in annual sales within a few years. As the key advertising engine for many industries like travel, insurance, and financial services, Google Search revenue should grow along with global GDP as more of the world starts using smartphones and the internet.

Let's not forget YouTube. Alphabet owns the largest video platform worldwide, which generated $9.2 billion in advertising revenue last quarter. YouTube has billions of users around the world and is the most popular streaming video service on TVs in the United States. Yes, that is TVs in the United States, not all devices.

YouTube is a growing entertainment mainstay for people around the world. I think it will be even more dominant in 2030.

Last year, Alphabet generated $85.7 billion in operating earnings. With so many growth levers to pull, it seems likely that the company will continue growing its earnings over the next few years. By 2030, I think this will lead the Magnificent Seven giant to pass the likes of Apple and Microsoft and become one of the two largest companies in the world alongside Amazon.