What happened

Shares of Alphabet (GOOG 0.72%) have rallied as much as 11.4% this week, according to data provided by S&P Global Market Intelligence. The technology giant and owner of Google, YouTube, Android, and many other consumer internet services posted strong second-quarter earnings, which had investors bidding up shares of the stock. As of 2:26 PM EST, shares of Alphabet are up around 10% this week and are now only 12% off all-time highs.

So what

Alphabet saw a recovery in revenue growth for the second quarter of 2023. Revenue grew 9% year over year in constant currency, with the operating margin expanding from 28% in 2022 to 29% in 2023. This led to an operating profit of $21.8 billion for the period.

Some key drivers of revenue growth were Google Cloud and the Google Other category. Google Cloud grew revenue 28% year over year to $8 billion and is finally seeing operating leverage, with operating profit swinging from a loss of $590 million in 2022 to a positive $395 million in 2023. Google Cloud has been unprofitable for many years now, so it is nice to see major investments into the segment finally bearing fruit. Investors should look for Google Cloud margins to continue expanding over the next few years.

Google Other comprises a bunch of products but mainly includes Google Hardware and YouTube's subscription offerings, such as YouTubeTV and YouTube Premium. This segment grew sales 24% year over year to $8.1 billion, showing the traction Alphabet is getting to sway users to switch to YouTube's advertising-free products.

YouTube's trailing-12-month sales hit $40 billion in March of this year, and with the app continuing to grow usage around the globe -- especially among connected TVs -- the Alphabet subsidiary still has a long runway of growth ahead of it.

Now what

After this week's pop, Alphabet shares are now trading at a market cap of $1.7 trillion. The stock is now up 48% year to date (YTD). This has brought the stock's price-to-earnings ratio (P/E) up to an expensive-looking 28, significantly higher than the earnings ratio of 18 it was trading at near the end of 2022.

GOOG PE Ratio Chart

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

While the business is doing solidly and should continue to grow from here, a P/E of 28 should make any investor cautious before buying Alphabet stock. As a technology giant, it is not going to grow revenue at an absurd rate for the next decade. Investors should have low forward return expectations for Alphabet after its recent stock pop.