The entire tech market experienced steep declines in 2022, with worldwide PC shipments reducing by 15% in the third quarter of 2022. As a result, industry leaders such as Microsoft (MSFT 1.82%) and Nvidia (NVDA 6.18%) have watched their stocks plunge over 30% year over year. However, the companies have retained their status as growth stocks, with shares in each company rising over 150% since 2018.

Despite market declines brought on by macroeconomic headwinds, Microsoft and Nvidia continue to have excellent long-term outlooks. And if you're wisely looking to take advantage of the recent sell-off, you might wonder which is the better growth stock. Let's take a look. 

1. Microsoft

Amid stock market declines, Microsoft has proven the strength of its diverse business. While companies such as AmazonAdvanced Micro Devices, and Netflix have watched their stocks plunge between 49% to 57% year over year, Microsoft shares have fallen 32%. The company's ability to outperform its peers was primarily thanks to the diversity of its revenue from high-performing industries.

In the first quarter of Microsoft's fiscal 2023 ending Sept. 30, the company reported revenue growth of 11% year over year to $50.1 billion, with operating income rising 6% to $21.5 billion. The growth is impressive, considering the company's PC-centered segment had operating losses of 15%.

High-growth segments such as productivity processes (revenue from subscription-based services like LinkedIn and Office) and Microsoft's cloud computing business more than pulled their weight over the quarter. Productivity processes had revenue grow 9% year over year to $16.4 billion, with operating income increasing 10%. Meanwhile, its intelligent cloud segment enjoyed revenue growth of 20% to $20.3 billion, with operating income rising 17% to $8.9 billion. 

Microsoft's brands, such as Windows, Office, Xbox, and Azure, have given it significant market share in industries such as operating systems, productivity software, gaming, and cloud computing. As a result, the company has safeguarded itself against macroeconomic declines as less affected segments can make up for those hit hard. 

Moreover, Microsoft's cloud computing business with Azure is especially promising with its 21% market share, second only to Amazon Web Services' 34%. This year, the company has plans to expand Azure by building new data centers in 11 new regions, with executives "very bullish" about Asia as a growth market. Considering the cloud computing market will grow at a compound annual growth rate of 15.7% until 2030 (per Grand View Research), Microsoft is in an excellent position to profit for the long term.

2. Nvidia

The graphics processing unit (GPU) market saw global shipments decrease by 25.1% in the third quarter of 2022, according to Jon Peddie Research. With a 72% market share in discrete GPUs, Nvidia suffered the brunt of declines in the industry, with its stock plunging 52% year over year. 

Declines in consumer demand for GPUs led the company's gaming segment to suffer a year-over-year revenue decrease of 51% to $1.57 billion in its latest quarter. However, the highest-earning segment over the quarter came from the company's data center business, which grew by 30.5% to $3.8 billion. 

As the burgeoning cloud computing industry continues to grow, data centers and devices like Nvidia's GPUs have become a hot commodity. Nvidia's stellar growth in data centers in its most recent quarter proves the company is already significantly profiting from the market's growth. 

Additionally, in November, the company announced it had partnered with Microsoft to build a massive cloud artificial intelligence computer. The collaboration will combine Nvidia's GPUs with Azure's cloud computing platform. Azure's position as the world's second-largest cloud computing platform makes the partnership incredibly lucrative for Nvidia, with plenty of room for long-term growth. 

Economic headwinds won't last forever, with the GPU market likely to see a return to form eventually. However, data centers allow Nvidia to utilize its GPUs in a swiftly growing industry while the company waits for the poor economic climate to subside. 

Nvidia and Microsoft are both excellent investments for the long term, especially with their crucial roles in cloud computing. However, Microsoft is ultimately the better buy. The Windows company's performance in a year plagued by decline and its thoroughly diverse business makes it an incredibly reliable growth stock and definitely worth considering in 2023.