Technology stocks roared back in 2023 thanks to multiple tailwinds such as cooling inflation and the booming popularity of artificial intelligence (AI), which explains why the tech-laden Nasdaq 100 Technology Sector index jumped an impressive 66% near year-end.

Seven megacap tech companies, collectively known as the "Magnificent Seven," have been a driving force behind the surge in tech stocks this year. These Magnificent Seven stocks include Apple (AAPL 0.02%), Amazon, Alphabet, Meta Platforms, Microsoft, Nvidia, and Tesla. However, there is one stock in this group that hasn't taken off like the others: Apple.

While shares of Apple are up 49% in 2023, they have underperformed the Nasdaq 100. That may be the case because the company's growth hasn't been solid of late. Apple's revenue in fiscal 2023, which ended on Sept. 30, was down almost 3% year over year to $383 billion. Bottom-line growth nearly stagnated as adjusted earnings increased just two cents year over year to $6.13 per share.

Analysts, however, are anticipating a turnaround in Apple's fortunes this year. The company is predicted to return to top-line growth in fiscal 2024, and its earnings growth is expected to accelerate. AI could play a key role in driving this turnaround. Let's see why that may be the case.

AI could reignite demand for Apple's products

Apple struggled to grow its revenue and earnings in the previous fiscal year thanks to a sharp decline in sales of personal computers (PCs) and weak demand for smartphones. IDC estimates that PC sales are on track to drop 13.8% in 2023. Meanwhile, Counterpoint Research is anticipating a 5% decline in smartphone sales this year.

Given that MacBooks and iPhones together produced 60% of Apple's fiscal 2023 revenue, it's not surprising to see why the company's performance was poor. The good news is that the smartphone and PC markets are expected to recover. Market research firm Canalys is predicting an 8% jump in PC sales in 2024. Meanwhile, the firm is expecting smartphone sales to grow 4%.

A recovery in these markets should rub off positively on Apple's performance. Consensus estimates are forecasting a 3.5% jump in Apple's revenue in the current fiscal year to $397 billion. Its earnings are expected to increase 7% to $6.57 per share. While those numbers aren't as spectacular as some of the other Magnificent Seven stocks are delivering, investors would do well to focus on the bigger picture as AI adoption in smartphones and PCs could drive stronger growth for Apple.

For instance, sales of AI-enabled PCs could grow at a compound annual rate of 50% through 2030, according to Counterpoint. That kind of growth could drive an increase in demand for Apple's MacBook with the M3 Max processor, which is capable of running AI workloads such as Adobe Lightroom's AI Denoise feature thanks to its powerful specs.

What's more, a survey carried out by app subscription service Setapp found that 42% of Mac users are using AI apps on their MacBooks daily. As the number of AI apps that can run locally on PCs instead of on the cloud increases in the future, the number of Mac users using AI should ideally increase. Also, the advent of PCs capable of running AI apps is likely to encourage existing users to upgrade.

Meanwhile, a recent research paper from Apple suggests that the company is looking for ways to make large language models work on smartphones. Doing so is likely to unlock another big opportunity for Apple to grow its sales in the long run as AI-capable smartphones are anticipated to gain critical mass from next year. Counterpoint forecasts that 100 million AI smartphones could be sold in 2024.

While that would be a small percentage of the 1.17 billion smartphones that are expected to be shipped next year, Counterpoint expects AI-powered smartphones to account for 40% of new devices sold in 2027. It looks as if Apple doesn't want to miss this bus, given that it's working on ways to integrate AI capabilities into its smartphones and tablets, and supply chain gossip suggests that the tech giant could launch its next iPhone with built-in AI features.

Such a device could help Apple capitalize on its position as the second-largest smartphone company, with a share of almost 18%, and drive stronger sales of iPhones. Apple could see a much-needed boost as the iPhone is its largest product line and produced 52% of its revenue in the previous fiscal year.

Is the stock still a buy?

We have seen that Apple stock has clocked decent gains in 2023 despite a tepid financial performance. As a result, investors may be wondering if the stock is worth buying anymore, especially considering that the 39 analysts covering Apple have a median price target of $200. That represents a limited upside of just 3% from current levels.

Apple is currently trading at 8 times sales and 31 times trailing earnings. Those multiples are rich in light of the company's financial performance. After all, Apple's earnings multiple is almost in line with the Nasdaq 100's trailing price-to-earnings ratio of 30, which suggests that the stock isn't a value play.

Apple can justify its valuation by clocking stronger growth in 2024, and AI could help it deliver on this front. So investors with a risk appetite can consider betting on a turnaround at Apple and start accumulating the stock before a potential AI-fueled rally sends it soaring in the New Year.