Investors have raced for the exits in recent months, and even big tech companies -- which seemed invincible in the past -- have fallen off course. Whether it's 40-year-high inflation and the Fed's choice to raise interest rates in response, or economic impacts from Russia's war against Ukraine, the stock market has been agitated of late.
The Nasdaq Composite has tumbled 29% year to date, and the CBOE Volatility Index, known as Wall Street's fear gauge, is up 80% over the same time frame, highlighting investors' current unease.
Some of the world's most dominant companies have joined the sell-off as well. Shares of software giant Microsoft (MSFT 2.29%), have contracted 23% since the start of the year, and the stock could be heading for lower levels in the coming future. Interestingly enough, it doesn't appear that its stock slump has been fundamentally driven -- the technology leader's business continues to forge ahead in great style.
With that in mind, should investors go against the grain and buy Microsoft stock right now?

Image source: Getty Images.
Microsoft's business is doing just fine
In a market fraught with uncertainty, Microsoft continues to demonstrate why it's one of the world's most resilient businesses. In the past 12 quarters, the enterprise, run by Satya Nadella, has beaten both revenue and earnings forecasts each quarter, headlining management's visibility and adeptness to consistently outperform. In its most recent quarter, the company's sales climbed 18% year over year to $49.4 billion, and its adjusted earnings per share jumped 14% to $2.22.
The software juggernaut's business was solid on all fronts, but its Intelligent Cloud segment shined the brightest, expanding 26% from a year ago to $19.1 billion. For the full fiscal year, Wall Street analysts are modeling a top- and bottom-line of $199.2 billion and $9.32 per share, indicating 19% and 16% growth year over year, respectively.
The company's balance sheet and cash generation are equally superb for its consistent growth. Today, the software leader boasts a cash position of $12.5 billion and a debt-to-equity ratio of only 48%, and the company continues to generate cash at a rapid clip. In the past 12 months, Microsoft has produced $63.6 billion in free cash flow, representing an exceptional amount of capital that it can use to increase its dividend, repurchase shares, and invest back into its business moving forward.
A favorable valuation
The latest tech sell-off has left Microsoft stock attractively valued. The software giant carries a price-to-earnings multiple of 27 today, representing a roughly 25% discount to its five-year average of 35.

MSFT P/E Ratio data by YCharts.
The stock is now trading at pre-pandemic levels, offering investors a solid entry point and strong margin of safety. Provided that Microsoft's fundamental story remains unchanged, the company's share price appears quite cheap at this time. That said, investors with long time horizons should view Microsoft's weakening valuation as a unique opportunity to buy the premier software stock.
A great time to buy
Nothing has changed about Microsoft's business, fundamentally speaking. The software leader continues to surmount expectations and grow at a very impressive rate. So at the moment, there appears to be a major disconnect between the company's business and its share price. In other words, the company is performing exceptionally well financially, but its stock price is contracting.
This serves as a clear buying signal to investors, providing them a golden opportunity to acquire a world-class stock at a bargain price.