It's been a great year so far for big tech companies, as mania over artificial intelligence (AI) and optimism about the U.S. economy have sent investors flocking back to the industry. After dropping by more than 33% in 2022, the tech-heavy Nasdaq Composite is up over 38% this year as of the end of July.

Microsoft (MSFT -0.85%) has also been a major beneficiary of the 2023 rally, up over 40% year to date.

Although things are pointing in the right direction, there's still a bit of unsteadiness surrounding the stock market, especially when you look at certain indicators, like the current inverted yield curve, which has a high success rate of predicting recessions and rocky economic times.

Many economists think the worst is over, while others think it's too soon to celebrate. Regardless of how it pans out in the near term, Microsoft is likely the least worried of all big tech companies, and this chart shows exactly why.

A chart visualizing Microsoft's Q4 FY23 income state.

Image source: The Motley Fool.

A lot of eggs in a lot of baskets

At first sight, what sticks out the most is Microsoft's growing top and bottom lines. An 8.3% year-over-year increase in revenue and a 20% year-over-year increase in net income is impressive, no doubt. However, it's not the growing revenue that makes Microsoft best positioned to take on any economic conditions. It's the variety of sources this income comes from.

Diverse revenue streams aren't unique to Microsoft, but its respective segments pull their own weight and contribute meaningfully. 

Out of the $56.2 billion in revenue, no segment accounted for more than 42%. Intelligent cloud, which includes revenue from Microsoft's Azure and other cloud services, was a decent portion of Microsoft's revenue, but it doesn't compare to how concentrated the revenue of companies like Apple and Alphabet are.

In its second quarter (ended April 1), the iPhone alone accounted for over 54% of Apple's revenue. In Alphabet's Q2, Google advertising accounted for almost 78% of its revenue. As those individual products and services go, so does the company. This isn't necessarily the case for Microsoft, which is a good thing.

Built to weather any economic storm heading its way

The beauty of diverse revenue streams is that when one segment gets the short end of the stick, the other segments can keep the show going.

In Microsoft's case, a slowdown in consumer spending -- which could be caused by inflation or a recession -- might affect its gaming revenue, but it wouldn't take as big of a toll on its productivity and business processes revenue (which includes its Office products and LinkedIn).

To that point, Microsoft's large corporate customer base adds another layer of protection during poor market conditions like recessions. Think about all the companies globally that rely on Microsoft for its cloud services, Excel, and other Office products, LinkedIn, PCs, and other products and services.

Microsoft's corporate customers act as a moat for the company. When the economy is bad, consumers first slow down spending, affecting businesses that sell directly to them. Although these same businesses will adjust their budget accordingly, it's not likely that a large portion will significantly change how much they spend with Microsoft.

It's much easier for a consumer to skip the newest iPhone model and a small business to cut back on digital advertising than for a company to do away with Office, its cloud services, or its LinkedIn subscription.

This isn't to say Microsoft will never be affected by downturns because that's simply not true. However, its diverse moneymakers and corporate ties give it a leg up on other big tech companies in that respect.