Artificial intelligence (AI) stocks and "cheap" aren't often placed in the same sentence, but I think that's true of two stocks in particular. Both Alphabet (GOOG 0.66%) (GOOGL 0.78%) and Taiwan Semiconductor Manufacturing (TSM -2.12%) appear to be cheap, but for two separate reasons.

In a market that's growing increasingly expensive, I think taking a hard look at these two stocks is worthwhile, as the value they provide investors is near the best available.

Investor looking at a tablet with financial information.

Image source: Getty Images.

1. Alphabet

Alphabet is the parent company of Google, YouTube, Waymo, and the Android operating system. However, Alphabet derives the majority of its revenue from one source: advertisements.

This is also the major concern from the market, as Alphabet's primary revenue source, the Google Search engine, is under attack from generative AI. Google Search accounted for 56% of revenue in the first quarter. While we don't have an individualized breakdown of Google Search's operating margin, the Google Services division generated an operating margin of 42%, accounting for over 100% of Alphabet's total operating profits.

That's because this division funds various Alphabet investments that don't generate any profits, so this segment needs to continue performing well for Alphabet to remain attractive to investors.

However, there are some signs of Google's dominance slipping, as its market share has fallen below 90% for the first time since 2015. Furthermore, many Wall Street analysts and other tech-savvy people have replaced Google Search with generative AI. As a result, many are forecasting the downfall of Google, which is why the stock trades at a huge discount to the market.

GOOG PE Ratio (Forward) Chart

GOOG PE Ratio (Forward) data by YCharts. PE Ratio = price-to-earnings ratio.

At 19 times forward earnings, Alphabet's stock is far cheaper than the broader market, as measured by the S&P 500. The S&P 500 trades for 23.7 times forward earnings, so there is a tangible difference in valuation between these two securities.

However, I think this bearish sentiment is unwarranted. In Q1, Google Search's revenue increased 10% year over year -- not a sign of a company that's failing. Additionally, I think the majority of the population could do without the capabilities of a generative AI web browser or search capabilities and are perfectly fine with the AI Overview Google offers at the top of every search result.

We'll receive more information from Alphabet on July 23 when it reports its Q2 results, but I expect Google Search revenue to remain healthy, which could lead to the stock rising.

2. Taiwan Semiconductor

Taiwan Semiconductor (TSMC) is the world's leading chip foundry, producing chips for giants such as Apple and Nvidia. TSMC has beaten out other chip foundries for multiple reasons, but chief among them is that it doesn't market any chips directly to consumers. Taiwan Semiconductor is a chip fab facility only, so its clients don't have to worry about it stealing their technology to produce a product that rivals their own.

Additionally, Taiwan Semiconductor is always at the forefront of new chip technology. This remains true, as they are launching their 2-nanometer (nm) chip node later this year and a 1.6 nm offering in 2026.

This dominance has enabled it to establish itself firmly at the forefront of the chip fabrication industry, and its services are in high demand. As a result, clients often place chip orders years in advance, which gives TSMC unparalleled insight into the direction the market is heading. Over the next five years, management projects a 45% compound annual growth rate (CAGR) in AI-related revenue and a nearly 20% CAGR in total revenue.

That's market-crushing growth, and if it pans out, Taiwan Semiconductor stock will be a must-own. Despite management's strong track record and the obvious tailwinds in the chip industry, TSMC's stock trades at only 24.9 times forward earnings.

TSM PE Ratio (Forward) Chart

TSM PE Ratio (Forward) data by YCharts. PE Ratio = price-to-earnings ratio.

While this is technically more expensive than the broader market, the difference is only slight. Furthermore, with the market's long-term growth rate hovering at around 10%, TSMC's projected 20% growth rate significantly outpaces it.

As a result, TSMC appears undervalued for its growth and should be acquired before the stock rises further.