Shares of both Advanced Micro Devices (AMD -2.38%) and Nvidia (NVDA 3.51%) have taken a beating on the stock market in 2022 thanks to a slowdown in chip demand in the personal computer (PC) market and sanctions on sales of data center chips to China, but they look set to end the year on a high.

AMD and Nvidia have shot up 16% and 37%, respectively, since the beginning of October thanks to the broader recovery in the stock market, triggered by signs of cooling inflation and expectation that the Federal Reserve could now reduce the pace of interest rate hikes. However, Nvidia's near-term outlook suggests that it isn't out of the woods yet. AMD, meanwhile, forecasts double-digit revenue growth in the current quarter.

So does this make AMD the better semiconductor stock for 2023? Let's find out.

Nvidia is expected to grow at a faster pace than AMD in 2023

Advanced Micro Devices is bearing the brunt of the slowdown in PC sales this year. The company expects year-over-year revenue growth of 14% in the fourth quarter of 2022, which is a far cry from the much faster growth that it was clocking earlier in the year. The good part is that despite multiple headwinds, AMD expects its top line to increase 43% over 2021.

Analysts, however, are forecasting a major slowdown in 2023, with AMD's revenue expected to increase by just 6%. Its bottom line is expected to increase in the low single digits. Nvidia's top line, on the other hand, is expected to grow at a faster pace of 9.3% in the next fiscal year (which begins in February 2023). The chipmaker's earnings are expected to accelerate strongly as well, posting 33% growth in the next fiscal year.

The consensus estimates may seem a tad surprising given that AMD is in better shape now. Nvidia's revenue dropped 17% year over year last quarter to $5.9 billion, while AMD had recorded a 29% year-over-year jump to $5.6 billion. What's more, Nvidia's revenue guidance of $6 billion for the current quarter points toward a 21% year-over-year drop in the top line.

So why are analysts expecting Nvidia to see much stronger growth next year? Let's find out.

The data center business will be the key difference

The data center business is going to be the key catalyst for both companies in 2023, as they get a nice chunk of their revenue from this segment. Data centers produced 64% of Nvidia's revenue last quarter. AMD, meanwhile, got 28% of its revenue from the data center business in Q3.

AMD's data center revenue jumped 45% year over year in the third quarter of 2022 to $1.6 billion. Nvidia's data center revenue, on the other hand, increased at a relatively slower pace of 31% to $3.8 billion.

The pace of growth in Nvidia's data center business was solid, though it may not have grown as fast as AMD's. But that could change in 2023. Nvidia currently gets its data center revenue by selling graphics cards that are used for accelerating workloads in data centers, but the company is set to enter the server CPU (central processing unit) market next year.

It is worth noting that the server processor market is the reason why AMD has been recording terrific growth in the data center business by taking market share away from bigger rival Intel. Nvidia is entering the mix with its Grace server CPUs, which are reportedly built using a 5-nanometer (nm) manufacturing process, which means that it will go toe-to-toe against AMD's fourth-generation Epyc server processors built on a similar process node.

More importantly, Nvidia may be able to eat into Intel's market share since the latter is making server processors based on a 10-nm process. So Nvidia's data center business could get an additional boost. On the flip side, AMD won't be the only one gunning after Intel's server CPU dominance in 2023.

AMD controlled 17.5% server market share at the end of the third quarter, a jump of 7.3 percentage points over last year. Intel controls the rest of the market, and it has been losing ground to AMD consistently in this space. And now that Nvidia is all set to jump into the fray with a wide range of customers that have already announced the adoption of its server processors, AMD will now face a stiffer challenge to sustain the pace of growth in data center revenue.

What's more, Nvidia is the dominant player in the data center GPU (graphics processing unit) market, while AMD is struggling in this space, as its data center graphics card shipments were down year over year in the previous quarter.

It wouldn't be surprising to see Nvidia's data center business grow at a stronger pace at AMD's expense in 2023.

But investors need to know this before buying Nvidia

Nvidia's recent rally made the stock expensive. It is trading at 72 times trailing earnings, which is quite expensive when compared to AMD's price-to-earnings ratio of 46. This makes Nvidia a risky bet right now given the headwinds in the gaming business and the poor near-term guidance.

However, existing Nvidia investors can continue holding this tech stock in their portfolios, since a stronger performance from the data center business could help it sustain its momentum on the market and even outpace AMD in 2023.