Microsoft Corporation (MSFT  ) is closing in on Apple Inc. (AAPL  ) in terms of market cap as the most valuable company as investors gravitate towards the software titan, lured by its promising growth and diminished China-related uncertainties, according to a report by Bloomberg.

Microsoft's strongholds in areas like cloud computing and artificial intelligence are turning heads, drawing more investors to its fold, while Apple is still grappling with issues in China.

Over the last six months, Microsoft stock jumped 20.88%, compared with Apple's 13.07% gain, as the iPhone maker lacks a solid AI strategy.

Apple's Market Cap stands at $2.782 trillion, while Microsoft stands at $2.445 trillion, according to data from Benzinga Pro.

"Microsoft has more of what the market wants right now, and given where we stand on the pair's growth prospects, we wouldn't be surprised to see it overtake Apple," David Klink, senior equity analyst at Huntington Private Bank told Bloomberg.

The uncertainty regarding Apple's status in China, a crucial production base and market for the company, has left investors on edge.

With China representing 19% of Apple's revenue, any unfavorable change in public sentiment could significantly affect the company's overall financial performance.

"We have more faith in Microsoft's margins, while the cloud and AI are growth areas that can stand the test of time over a decade. We don't know if the iPhone can do the same", Klink added, as noted by Bloomberg.

Microsoft's growth, especially in cloud computing, looks promising, making its high stock price seem reasonable.

The software giant is expected to see double-digit growth in revenue and net earnings per share in fiscal 2024 and the subsequent three years, it adds. Investors are also excited about Microsoft's support for OpenAI, the company behind ChatGPT, as per Bloomberg.

Meanwhile, Apple has seen declining revenue for three quarters, and a fourth could be its worst streak in 20 years.

However, Apple's earnings might improve from 2024, but not as fast as Microsoft's, according to Bloomberg data.

Yet, everyone is watching Apple's 2024 move into AI with "Apple GPT," their chatbot solution, closely. Apple is also working on a large language model of its own called Ajax, which will help it compete.

Price Action: AAPL shares are trading lower by 0.10% to $177.79 on the last check Tuesday. MSFT shares are trading lower by 0.90% to $326.10.