The rally in artificial intelligence (AI) stocks greatly benefited Nvidia (NVDA 1.24%). The stock is up more than 200% since the beginning of the year and sells close to all-time highs.

Unfortunately, investors have likely missed the rally in this semiconductor stock. At a P/E ratio of 110, Nvidia shares have become expensive, making it more challenging to profit from this stock. But Advanced Micro Devices (AMD -0.56%) has begun to target its AI clients, and with AMD's ability to compete against Nvidia, it is arguably a low-cost alternative for investing in this industry.

Why AMD?

AMD's decision in the middle of the last decade to focus on CPUs and GPUs has led to its most successful performance in the stock's more than 50-year history. The company has taken market share from Nvidia within specific niches in the GPU market. Moreover, becoming the chip provider of choice for the Microsoft Xbox and Sony PlayStation gaming consoles has made it a force in gaming.

Admittedly, Nvidia took the early lead in the AI chip market and holds the dominant market share. Consequently, AMD begins this battle at a competitive disadvantage, and it is too early to tell how effectively AMD can challenge Nvidia's dominance in the AI market.

Still, AMD recently released its MI300X chip to compete for some of these customers. With its history of catching up to competitors, investors should not count AMD out.

Additionally, the company should profit from tech niches that support AI in other ways. In recent years, AMD has taken market share from Intel in the data center space, and it has become more important on the client (PC and laptop) side of the business.

Distribution of Intel and AMD CPUs, By Quarter, 2012-2023.

Furthermore, the acquisition of Xilinx has made AMD a major competitor in the embedded chip market. Despite the slump in the chip sector, AMD derived revenue growth from this segment in the most recent quarter.

Financial and valuation comparisons

Unfortunately for investors, AMD has not come close to matching the 101% revenue growth reported in its last fiscal quarter. In the second quarter of 2023, AMD's revenue of $5.4 billion fell 18% year over year and was flat compared with the first quarter.

Also, AMD's net income for Q2 was positive at $27 million, bolstered by interest income and gains from investments.

Fortunately for AMD, the pain could end soon as analysts forecast double-digit revenue growth will return by the fourth quarter. Such optimism may help explain why AMD stock is up by around 65% in 2023.

Interestingly, AMD is not that much less expensive than Nvidia on a forward P/E basis. Nvidia's forward earnings multiple of 42 is slightly higher than AMD's, which comes in at 38 times forward earnings.

However, profitability is volatile amid an industry downturn, and fortunately, AMD is a more compelling opportunity in terms of its price-to-sales (P/S) ratio.

Nvidia sells at a staggering 35 times sales, an elevated level considering that some stocks have not recovered from last year's brutal bear market. At a P/S ratio of just 8, AMD closely approximates its average sales multiple over the previous five years, making its valuation more appealing to new investors.

Consider AMD

Nvidia's stock appears excessively pricey, but it is not too late to profit from AMD. Indeed, AMD just recently released its AI chip, and its revenue growth seems lackluster compared with Nvidia's recent performance.

Still, AMD has made significant strides against its competitors, a factor that has helped it win business from Nvidia. As the semiconductor industry recovers and its AI chip gains more visibility, the gains should accrue to AMD stock.