For much of 2022, Apple (AAPL 1.27%) resisted the market sell-off, but eventually, it succumbed. The tech giant finished the year down 27%, ahead of the Nasdaq but behind the S&P 500.

Despite its retreat, the iPhone maker delivered a better performance than most of its big tech peers, reporting revenue growth of 8% for the quarter and the year, even as it faced stiff headwinds from a stronger dollar. Earnings per share growth was slower, up in the fiscal fourth quarter from $1.24 to $1.29, as the company faced inflationary pressure in areas like wages and logistics.

However, after the sell-off, Apple stock looks surprisingly well priced. It currently trades at a price-to-earnings ratio of 21, the cheapest it has been since the pandemic started, only slightly more expensive than that of the S&P 500 at 20.2.

Is Apple a screaming buy? Let's take a look at the debate. 

A woman looking at her smartphone.

Image source: Getty Images.

Why Apple stock has fallen

There isn't anything particularly alarming in Apple's recent results, but there are a number of reasons why the stock has tumbled over the last few months.

First, the market is increasingly betting on a recession this year as the Federal Reserve continues to raise interest rates. As a seller of higher-end discretionary tech hardware, Apple is at risk of a recession, which would lead consumers to spend less on discretionary products. Even if they needed a new smartphone or computer, they could trade down to a cheaper Apple model or buy one from another company altogether.

Second, Apple has faced a number of challenges in its manufacturing in China. The company said in November that its iPhone factory in Zhengzhou was operating at significantly limited capacity, meaning it expected shipments of its iPhone 14 Pro and Pro Max to be lower in the fiscal first quarter than originally anticipated. The company did say that demand for those phones remains strong. The COVID-19 lockdowns that caused those delays have since ended, so the problem should be temporary. However, Apple also announced plans to move more production out of China.

Finally, the company's revenue approached $400 billion in fiscal 2022, and its growth is expected to be moderate. On such a large base of revenue, it will be difficult to put up 20% revenue growth. However, the valuation seems to reflect the dialed-down growth expectations.

The good news

With an earnings valuation on par with the S&P 500, Apple doesn't need to put up high growth numbers in order to justify its valuation. In fact, the company could easily grow earnings per share by double digits with just modest revenue and share buybacks. Apple has been committed to share buybacks, having reduced shares outstanding by more than 20% over the last five years. With the stock price down, it could get more aggressive with repurchases.

The company's economic moat has also never looked as strong. Apple has gained market share on Android and now claims a majority of market share in the U.S. It remains popular with the youngest generation of consumers; a recent survey by Piper Sandler found that 87% of teens owned an iPhone.

Additionally, there's also the possibility that Apple could introduce a new product, which could be on the horizon. Bloomberg just reported that the company was planning to launch its mixed-reality headset later this year, introducing it at its Worldwide Developer Conference in June.

Details about the headset, including the price, are still unclear, but the new device has the potential to move the needle for Apple.

Is Apple stock a buy?

I've been skeptical of Apple stock in the past as its valuation has looked stretched over much of the pandemic, but with the valuation even with the S&P 500, the stock looks well positioned to outperform over the next few years.

While a recession could deal it a setback, the company seems unlikely to lose market share during a downturn. It continues to improve its core product lineup, raising prices along the way, and the mixed-reality headset could be a significant profit driver in the coming years.

Apple is the world's most valuable brand and has a wide economic moat that should protect its leadership positions in smartphones, tablets, and computers. It deserves a premium valuation.

It's a good buy at the current price.