The first half of 2023 is in the books, and one of the biggest winners thus far has been Microsoft (MSFT 2.22%). The tech megacap's stock has soared 41% year to date, making it the third-best performer in the 30-stock Dow Jones Industrial Average, trailing only Salesforce (up 59%) and Apple (up 49%).

So, is it time for investors to pile into Microsoft shares or tap the brakes? Let's have a closer look to find out.

A stock analysis sheet attached to a clipboard with a magnifying glass on it.

Image source: Getty Images.

The Bull Case: Growth as far as the eye can see

The bull case for Microsoft rests on the twin pillars of near-term execution and long-term growth.

Let's start with the near-term execution. Microsoft Chief Executive Officer (CEO) Satya Nadella is a great leader, as Microsoft's recent financial reports show. In its most recent quarter (the three months ending on March 31, 2023), Microsoft recorded $52.9 billion in revenue, up from $49.4 billion a year earlier. What's more, net income jumped 9% to 18.3 billion.

Microsoft's Intelligent Cloud segment, which caters to commercial enterprises and includes its Azure business, yielded $22.1 billion of revenue alone. This demonstrates that Microsoft is executing its near-term plan as it transitions from a maker of commercial software for the home and office to a cloud services juggernaut.

As for the long-term growth, a recently released memo shed some light on where CEO Nadella wants to take Microsoft over the next seven years.

The memo -- revealed in filings due to Microsoft's federal court hearing over its potential acquisition of Activision Blizzard -- noted that Microsoft leadership aims to grow revenue by at least 10% annually through 2030. At that rate, Microsoft would generate more than $500 billion in revenue by 2030, up from $207 billion over the last 12 months. If Nadella can hit this target -- or even come close to hitting it -- Microsoft shares should soar in value.

The Bear Case: Microsoft's valuation is already sky-high

If there's one concerning thing about Microsoft stock, it has to be its valuation. Shares are not cheap. In fact, they're downright expensive.

MSFT P/S Ratio Chart.

MSFT PS Ratio data by YCharts.

Whether it's price-to-earnings (P/E) or price-to-sales (P/S), Microsoft shares are well above their 10-year average. On a P/E basis, shares trade at 36.6. Not only is that about 20% above the company's 10-year average P/E, but it's also more than double the long-term average of the S&P 500 (approximately 16). Microsoft's P/S ratio is also elevated. Shares trade at 12.2, more than 60% above the company's 10-year average of 7.5.

Is Microsoft a buy now?

So, how should investors think about Microsoft? Undoubtedly, the near-term and long-term future looks bright. Management is confident that the company will continue to grow its cloud business and has set an aggressive internal goal of more than doubling its revenue by 2030. 

In addition, analysts expect the company to deliver in the near-term. Revenue is expected to grow to $211 billion this year (up 7% from a year ago) and to $235 billion (up 11% yoy) by 2024.

In summary, Microsoft's expected growth makes up for its rich valuation. Indeed, for me, the stock remains a buy now, given the company's strong position in the cloud services market, its excellent leadership team, and management's aggressive goals to increase revenue. All of these elements add up to make it a stock that's too good to ignore for many investors.