When it comes to investing in artificial intelligence (AI), it may seem like Nvidia is the main focus of investors. The company has muscled its way into the "Magnificent Seven" as it claims between 80% and 95% of the AI chip market.

However, Nvidia has also grown to a price-to-sales (P/S) ratio of 36, leading some to question whether that stock has become overvalued. Investors may want to look to other AI stocks, and two hold the potential to deliver outsize investor returns.

1. Taiwan Semiconductor

Investors may have to look no further than Nvidia's manufacturer, Taiwan Semiconductor Manufacturing (TSMC) (TSM 1.26%). As the leading producer of the world's most advanced chips, TSMC makes Nvidia's success possible. Additionally, it is the leading manufacturer of chips for companies like Apple and AMD and has even attracted business from an emerging competitor in its industry, Intel.

As a result of this book of business, TSMC claimed 61% of the third-party foundry market in the fourth quarter of 2023, according to TrendForce.

Admittedly, amid geopolitical tensions on its home island of Taiwan, many investors, including Warren Buffett, have shown reluctance to invest in TSMC stock. Still, the company has mitigated this by building more fabs outside of Taiwan. Moreover, a source of geopolitical tension, China, depends on TSMC's chips, reducing the likelihood that it would put its supply chain at risk.

The company also seems to be recovering from the recent downturn in the chip market. Revenue of $69 billion fell 5% from year-ago levels. That led to a comprehensive net income of $27 billion, 22% less than year-ago levels.

Still, analysts forecast a 22% increase in revenue this year and a further 20% rise the following year. Such optimism took the stock price 55% higher over the last year.

Consequently, it now sells at a P/E ratio of about 26. While that is not low for this company, it compares favorably to earnings multiples for other chip stocks. And as demand from companies like Nvidia leads to rising production, TSMC stock will likely continue on its higher trajectory.

2. Micron

AI has also changed the game for another chip manufacturer, Micron Technologies (MU 2.92%). Micron produces the memory chips that help drive the AI revolution. Indeed, the memory chip industry has historically experienced more volatility than its counterparts that produce CPUs and GPUs. This led to no net gains in the stock between the mid 1990s and mid 2010s.

MU Chart

MU data by YCharts

Nonetheless, the secular bull market in AI chips has changed the game for this stock, leading to a continuous rise in demand for memory chips. Consequently, the stock gained 140% over the last five years, beating the S&P 500's total return and leading to Micron becoming a dividend stock.

In the first quarter of fiscal 2024 (ended Nov. 30, 2023), revenue of $4.7 billion rose 16% yearly. This signals a recovery in the memory market, as Micron's revenue declined 49% in fiscal 2023. Amid the struggles, the fiscal Q1 net loss was $1.2 billion, which improved from the $1.4 billion loss in the year-ago quarter.

Still, analyst forecasts call for a 34% increase in revenue in fiscal 2024 and a 42% rise in the following fiscal year. This could stoke a dramatic recovery that returns Micron to profitability as soon as this fiscal year.

Investors are optimistic, so much so that they have bid the P/S ratio to around 7, the highest sales multiple since the early 2000s, as the stock sells near all-time highs. As the AI revolution continues, the rising need for memory chips and increasing revenue likely means Micron stock will stay on an upward trajectory.