With a market cap of $1.8 trillion, Microsoft (MSFT -1.84%) is the third-largest public company in the world. Unfortunately, like most stocks this year, it's been a rough 2022 for the tech giant, down 28%. During the mid-2020 to late-2021 bull run, many would argue that Microsoft was overvalued, but at its current price range, it's looking much more appealing.

Even with so much economic uncertainty right now, here's why Microsoft is a no-brainer investment.

Its eggs are spread among many baskets

In its 2022 fiscal year, Microsoft brought in $198.3 billion in revenue (up 18% year over year), but what sticks out more than the number itself is how many different ways the company makes its money. Unlike many of its Big Tech competitors, Microsoft has done a great job getting its hand in a wide range of businesses. Here's how Microsoft's revenue breaks down by segment:

  • Server products and cloud services: 34%
  • Office products and services: 23%
  • Windows: 12%
  • Gaming: 8%
  • LinkedIn: 7%
  • Search advertising: 6%
  • Devices: 4%
  • Enterprise services: 4%
  • Other: 2%

Having many income sources is a good thing for businesses of any type, but what has driven Microsoft's success (and will likely continue to) is how many companies worldwide rely on its products and services to run their business. From the love-hate relationship many have with Excel to the recruiting on LinkedIn to the cloud services, countless businesses couldn't operate without a Microsoft product or service.

The amount of income Microsoft receives from other corporations will prove especially valuable in 2023, a year when many expect a looming recession to cause cuts in consumer spending. Microsoft is not recession-proof or immune to economic downturns, but its business is structured in a way that ensures it'll be one of the last to feel the ripple effect.

The cloud is picking up steam

Microsoft's cloud service, Azure, is the second-largest public cloud service behind Amazon's Amazon Web Services (AWS). Although it lags considerably behind AWS in market share, Azure's growth should be good news for investors. In FY22, Azure's revenue grew 45% year over year and was Microsoft's second-largest moneymaker by product, trailing only Office.

Azure is positioned to drive Microsoft's growth for the foreseeable future. Microsoft's fiscal year 2022 revenue increased by $30.2 billion, with Azure responsible for $13.5 billion of that. Azure's market share in the cloud services space has grown from around 13.7% to 21% in the past five years.

Margins matter

A company's gross profit margin is an underrated metric for determining its ability to generate future profits. To find a company's gross profit margin, you subtract its cost of goods sold (COGS) from its revenue and then divide that total by the revenue. For example, if a company's revenue is $100 million and its COGS is $25 million, its gross profit margin would be 75%: ($100 million-$25 million) ÷ $100 million.

One advantage Microsoft has over other Big Tech companies is its gross profit margin tends to be higher. At the end of the third quarter this year, here's how some stacked up:

  • Microsoft: 69.17%
  • Alphabet: 54.9%
  • Apple: 42.26%

Microsoft's gross profit margin matters because even if consumer and business spending slows down due to broader economic conditions, they'll still be able to squeeze out decent profits with fewer sales. This is much harder to do for other Big Tech companies that rely more heavily on manufacturing instead of software.

The returns won't come overnight

When bad economic storms come through, very few companies are safe. Unfortunately, tech companies aren't usually one of them. As we go into 2023, there's no guarantee Microsoft's stock will bounce back rapidly. In fact, it could continue on its 2022 path and not bounce back at all. However, you can be confident the long-term results will be there. Microsoft is too valuable to the business ecosystem for them not to be.

As it's trading around this price (and potentially lower), now would be a good time to start using dollar-cost averaging, which involves investing a set amount at set times regardless of stock prices. Dollar-cost averaging will take away some of the temptation of wanting to try to time the stock market. By having a preset amount and schedule, you can begin to build up a sizable stake in this blue-chip stock.