In 2022, the entire tech market was dragged down by declines in consumer spending. The rise in inflation and interest rates led consumers and businesses to slash budgets. For instance, PC shipments fell 28.5% in the fourth quarter of 2022 (per Gartner), the largest decline since at least the mid-1990s. Meanwhile, U.S. digital ad-spending growth has slowed for three consecutive quarters.

As a result, many tech companies have suffered from a sell-off. Alphabet (GOOG -0.36%) (GOOGL -0.42%) shares have plunged 34% year over year alongside these economic challenges. However, the company remains a reliable growth stock and a compelling buy for the long term. Here's why investors should consider it now. 

Alphabet's stellar long-term growth

Despite the economic challenges of the past year, it is crucial to invest in stocks that provide consistent gains over the long term. For instance, despite Alphabet's stock decline in the last 12 months, the company's shares have increased 62% over the last five years.

The company's steady growth illustrates how buying stocks from strong businesses can safeguard your investment from temporary market declines. Alphabet has seen its revenue rise 132%, from $110.9 billion in 2017 to $257.6 billion in 2021. Operating income has increased 200% from $26.2 billion in 2017 to $78.7 billion. 

Alphabet may have suffered from a challenging economic climate in 2022, but that hasn't dampened its impressive long-term growth. The company is home to potent brands such as YouTube, Android, Pixel, a myriad of businesses under Google, and many more, which grant it considerable market share in multiple lucrative industries. As a result, the company is likely to continue growing over the long term.

Economic headwinds won't last forever

With Alphabet owing nearly 80% of its revenue to digital ads, the industry's decline in 2022 can make investing in the company feel like a risk. However, that is not so. In addition to Alphabet's consistent long-term revenue growth making its stock a reliable buy, economic headwinds are temporary, and inflation has already shown signs of easing.

According to the Labor Department, December consumer prices were 6.5% higher year over year, a decline from 7.1% in November and the four-decade high of 9.1% in June. Additionally, the Federal Reserve revealed on Jan. 12 that the Consumer Price Index (CPI) had fallen 0.1% from the month before, primarily driven by cheaper fuel costs.

Easing inflation is positive for Alphabet as it could drive growth in the advertising market as businesses increase their ad budgets. When the economic storm clouds clear, Alphabet's 27.5% market share in digital advertising could offer a long-term revenue boost as the industry grows. Research from Omdia estimates the digital advertising market was worth $190 billion in 2022 and will almost double to $362 billion by 2027.

Moreover, Alphabet enjoyed the most year-over-year revenue growth in the cloud-computing industry in its most recent quarter. The company saw its Google Cloud segment grow 37.6%. Meanwhile, industry leaders Amazon and Microsoft saw cloud-computing revenue growth of 27% and 20% in the same quarter.

The cloud-computing industry was worth about $369 billion in 2021 and is expected to grow at a compound annual rate of 15.7% through 2030. Alphabet's third-largest market share at 11% has further diversified the company's revenue and given it a piece of a high-growth industry.

Alphabet shares are trading at 18 times its earnings, not far off their lowest point in the past decade. The company's price-to-free cash flow is similarly at one of its lowest points, suggesting Alphabet's stock is trading at a bargain. And with an average 12-month price target 37% higher than its current level, Alphabet stock looks like a must-buy this January.