On Jan. 3, 2022, Apple's (AAPL 0.52%) stock reached an all-time high of $180.73 after a nearly two-year period where the tech industry flourished. Pandemic closures throughout 2020 and 2021 led people to invest in home offices and entertainment devices, which provided a welcome boost to the whole market. However, economic headwinds and a sell-off in 2022 have led Apple shares to fall 25% since its all-time high.

Despite declines in its stock price, the company remains one of the most reliable long-term investments. Here's why the sell-off makes now an excellent time to buy Apple stock.

Apple's cash cow: The iPhone 

Production concerns involving the iPhone dominated headlines toward the end of 2022. Increased COVID-19 restrictions in China put manufacturing strains on Foxconn, also known as Hon Hai Technology Group, which produces about 70% of all iPhones. Investors' concerns have since eased. Production capacity has returned to 90%, Apple made plans to leave China entirely in the coming years, and Foxconn announced it would expand to Southeast Asia this year.

Despite recent production challenges, the iPhone remains a compelling reason to invest in Apple's stock. In 2022, the entire tech market suffered from declines in consumer demand. However, in Apple's third quarter ending in June, the iPhone attained a 50% market share, surpassing Alphabet's Android. Reaching a leading market share makes it easier for Apple to attract consumers to its other devices and services, as the iPhone is a gateway into the company's walled garden of products. 

Over the last six years, iPhone revenue increased 47.5%, from $139.3 billion in 2017 to $205.5 billion in 2022. Merely looking at the iPhone's 7% year-over-year revenue growth in 2022 compared to the 39% growth from the year-before period may look concerning. However, as with stocks, it's best to focus on long-term growth to account for years when one device might be more popular than another. And the iPhone's consistent growth over several years is worth an investment.

Apple is diversifying its revenue

While the iPhone is a promising revenue source, Apple is also working toward diversifying its earnings with services and plans to enter a lucrative market this year. 

The iPhone accounted for 52% of Apple's revenue in 2022, with services its second-biggest earner, bringing in 20% of its revenue. The segment includes subscription earnings from services such as Apple TV+, Music, Fitness+, News+, Arcade, and iCloud. In 2022, services revenue grew 14% year over year to $78.1 billion, double the growth of the iPhone. Even better, services hit a 71.7% profit margin compared to products' 36.3% profit margin.

Services are booming for Apple and provide an excellent opportunity for the company to lean on other sources of revenue in the event of production issues.

Additionally, this year will further diversify its product line with a venture into virtual and augmented reality (VR/AR), two high-growth markets. Numerous reports in recent weeks have revealed that Apple will almost certainly release a mixed-reality headset in 2023 with VR and AR capabilities. The new product is promising, as the VR market was worth $21.8 billion in 2021 and will grow at a compound annual growth rate (CAGR) of 15% through 2030 (per Grand View Research).

Meanwhile, the AR market is worth $25.33 billion and is expected to see a CAGR of 40.9% until at least 2030. 

Apple has proven its immense skill at entering new markets and quickly rising to dominance. The company displayed this talent with its success in smartphones, tablets, smart watches, and Bluetooth headphones. The mainstream adoption of each of these technologies skyrocketed after Apple released its own take on the product. As a result, it's not far-fetched to say an investment in Apple could be an investment in the future leader of VR and AR.

Despite a 25% stock dip from its all-time high, Apple shares remain a screaming buy. The company has a reliable iPhone business alongside a booming services segment and a lucrative product launch later this year. Apple's stock is a no-brainer buy, with its decline in price offering a bargain.