Google parent Alphabet (GOOGL -2.24%) is one of the most dominant companies in the world.

It has a near-monopoly on search, the most basic utility of the internet, as well as a leading position in areas like online video with YouTube, and web browsers and email with Chrome and Gmail. Its Google Cloud business is also growing quickly, making the company a player in cloud infrastructure, though it's still losing around $4 billion a year in that segment.

Alphabet also continues to post brisk growth with revenue up 23% year over year in the first quarter. For a company of its size, that's equal to nearly $13 billion in revenue growth in just one quarter, and it's highly profitable with an operating margin of 30%.

Person looking at a cellphone screen wth a search bar superimposed on the image.

Image source: Getty Images.

So you might be surprised to learn that Alphabet now trades at a price-to-earnings (P/E) ratio of just 20, making it even cheaper than the S&P 500 at 21.4. As plenty of market-watchers have pointed out, Alphabet is now even cheaper than slow-growth stalwarts like Coca-Cola (KO 0.05%), whose P/E has ballooned to 29, or Procter & Gamble (PG -0.28%), which trades at a 28 P/E.

While this gap seems like a glaring mistake, there's one good explanation for it: The market is expecting a recession that is going to slow Alphabet's growth. In a recessionary environment, investors tend to favor safe, defensive stocks like Coca-Cola and Procter & Gamble, which are both over 100 years old, are the leaders of their respective industries, and have thrived through the Great Depression, two world wars, and plenty of other global crises. They are also Dividend Aristocrats. Alphabet doesn't get the same benefit of the doubt from the market.

As the chart below shows, stocks for Coke and P&G have outperformed Alphabet by a significant margin over the last six months, diverging especially over the last month.

Should Alphabet investors be worried about a recession?

PG Chart

PG data by YCharts.

A short history lesson

Alphabet, which went public in 2004, has only weathered one recession as a stock, during the 2008-2009 financial crisis. Founded in 1998, the company was small enough during the dot-com bust to skate past it mostly unperturbed.

However, the company's performance during the financial crisis is telling. Alphabet (or Google, as the company was known back then) saw its revenue growth rate slip from 56% in 2007 to 31% in 2008 and then just 8.5% in 2009.

In its early 2010 discussion of trends in the business, management at the time acknowledged the challenges of the recession, reporting in its S-1 filing:

"Weak economic conditions have generally adversely impacted our revenue growth rate and may result in fewer commercial queries by our users and may cause advertisers to reduce the amount they spend on online advertising, including the amount they are willing to pay for each click or impression, which could negatively affect the growth rate of our revenues. Further, a slow or uneven pace of economic recovery could also negatively affect the growth rate of our revenues."

Advertising is a cyclical business, and companies naturally scale back on it when consumers have less money to spend. Notably, Google was one of those businesses holding back on advertising as its sales and marketing expenses grew just 2% that year (2009) after growing 33% the prior year, and its general conservativism on spending in 2009 helped drive significant profit growth that year.

Investors now seem to be steeling themselves for a similar slowdown in revenue growth. But as you already know, Google went on to thrive after the financial crisis, and the revenue growth rate quickly reaccelerated to 24% in 2010. 

The chart below shows how the revenue growth rate slowed headed into 2009 before making a recovery.

GOOGL Revenue (Annual YoY Growth) Chart

GOOGL revenue growth (annual YoY). Data by YCharts. YoY = year over year.

Is Alphabet stock a buy?

The market could be correct that we are heading into a recession. Management also said on the April 26 earnings call that the war in Ukraine is impacting advertising on YouTube in Europe, so there are issues affecting the stock beyond the possible recession.

But even a bad recession won't permanently damage Alphabet, which is basically a bulletproof company at this point. Advertising is a necessary expense for most businesses, and it will rebound after a recession as confidence in the economy improves. At the current valuation, Alphabet looks like a great bet to beat the market over the next five years.