Microsoft's opens new tab stock market valuation achieved the $3 trillion mark for the first time, keeping it as the second most valuable business in the world, right behind Apple opens new tab.

Since the beginning of the year, Apple and Microsoft shares have been fighting it out to be the most capitalized stock on Wall Street; earlier in January, the software giant momentarily defeated the iPhone maker for the top spot.

Microsoft's market value surpassed $3 trillion as its shares reached a record high of $405.63, up 1.7%. According to LSEG statistics, Apple's shares erased earlier gains and were trading at $194.82, down 0.35%, giving it a market value of $3.01 trillion.

Microsoft is widely regarded as a frontrunner in the race for market dominance in the rollout of generative artificial intelligence (AI), ahead of other tech heavyweights like Google owner Alphabet opens new tab, Amazon.com opens new tab, Oracle opens new tab, and Facebook owner Meta Platforms opens new tab. This perception is supported by its investment in ChatGPT maker OpenAI.

Microsoft has released updated versions of its popular productivity software products and its Bing search engine, which is anticipated to more effectively rival Google's market-dominating search service, using OpenAI's technology.

On the other side, Apple is seeing a slowdown in the demand for its iPhones, especially in China, where the company is boosting sales by providing customers with infrequent discounts in the face of fierce competition from domestic rivals like Huawei Technologies.

According to LSEG data, the 54 analysts that cover Microsoft's stock have a median price target of $425, up from $415 a month ago, and an average rating of "buy."

Microsoft's stock increased by about 57% in 2023 and by 7.3% this year, propelled by excitement in AI. Since the beginning of the year, Apple's stock has increased by 48%.