Famous investor Warren Buffett gave a great lesson to investors during Berkshire Hathaway's 2021 annual meeting. He showed viewers two charts. One was the list of the top 20 businesses by market value at the end of March 2021, while the second was the same list in 1989. Not a single company occupied both lists, illustrating how companies rise and fall from grace over seemingly short time periods.

Company turnover due to capitalistic competition is important for investors to consider over long time periods. But I think the same companies will occupy the top of this list in 2030 as were near the top at the beginning of this decade. This is for one reason: cloud computing infrastructure. Here's why I think  Microsoft (MSFT -0.25%) and Amazon (AMZN -0.48%) will be the two largest businesses in the world in 2030. 

1. Is Amazon's potential in cloud computing still underrated?

Most people know Amazon for its e-commerce empire, and for good reason. Its various retail, subscription, and advertising business lines generate hundreds of billions of dollars a year in revenue.

But the true value in Amazon's business comes from Amazon Web Services (AWS). The cloud computing division is the leader in this fast-growing industry that allows companies to outsource servers and computing infrastructure, among many other services.

Last quarter, the division hit $76.5 billion in trailing-12-month revenue, up 34% year over year. It is also highly profitable, generating $22.9 billion in operating income, or a 30% operating margin.

Right now, AWS has an estimated 33% market share of the cloud computing industry, a number that has remained fairly stable since 2017. If the company can retain this market share, there is a massive opportunity for AWS to become a much larger business in 2030 due to the gale-force tailwind that is behind cloud computing.

By 2030, third-party analysts expect the cloud computing market to hit $1.5 trillion in annual spending. If AWS has a 30% market share that year and a 30% operating margin, that will equate to a whopping $135 billion in annual operating income.

Remember that this does not include Amazon's other business lines, such as e-commerce, Prime Video, and advertising. Add these together, and Amazon has a clear path to a market cap of $3 trillion to $4 trillion by 2030. This makes it a great candidate to become one of the world's largest businesses that year. 

2. Don't underestimate Microsoft's Azure

Like Amazon, Microsoft has built a huge business over the past decades through its Office software suite, personal computing, Xbox, and advertising divisions. These divisions are the key reason Microsoft's net income hit $72.7 billion in fiscal year 2022, making it one of the most profitable companies in the world.

This decade, Microsoft's legacy business lines should still do well, but the majority of its growth will come from Azure, its cloud computing division, which is similar to AWS. Last quarter, Azure's revenue grew a whopping 35% year over year (42% in constant currency) and the division maintains a 21% share of the cloud computing market. Its market share has actually grown since 2017, when it was estimated to be only 13.7%, meaning it has grown faster than AWS over that time frame.

Taking the $1.5 trillion total industry estimates for 2030 and assuming Azure retains its 21% market share, Microsoft will be doing $315 billion in revenue from that division at the end of this decade. With a 30% operating margin (which, remember, is what AWS has), that equates to $95 billion in annual operating income.

Again, as with Amazon, if you combine Azure with Microsoft's other business lines, it is likely this stock could be worth a few trillion dollars in 2030. The cloud computing market will be one of the largest worldwide in 2030. If the two dominant providers -- Amazon and Microsoft -- can retain their respective market shares, I think it is likely these will be the two largest companies in the world by the end of this decade.