The stock market has not been kind to investors so far in 2022. Year to date, the S&P 500 ended Monday's trading session down by more than 8%. And in recent days, it has been off by more than 10% from its peak -- by definition, a market correction.  

However, this slide has opened an opportunity for investors to buy some great companies at relatively good valuations. Apple (AAPL 5.98%) and Nvidia (NVDA 3.46%) are two such companies that savvy investors should consider buying and holding on to, as they seem built for long-term growth thanks to the markets they operate in and the emerging tech trends they can take advantage of.

Man and woman looking at a laptop screen.

Image source: Getty Images.

1. The case for Apple

Apple's stock price is down roughly 8.4% in 2022, and its price-to-earnings (P/E) ratio has come down to around 27 from last year's average of 32. Shares of Apple are now trading close to the five-year average earnings multiple of 23. If the market's decline continues and Apple stock becomes cheaper, buying it would be a no-brainer as the company's growth is expected to accelerate going forward thanks to several factors.

One of the biggest reasons to buy Apple is the company's dominant position in the 5G smartphone space. Strategy Analytics estimates that Apple controlled 31% of the 5G smartphone market in 2021, with the No. 2 seller, China's Xiaomi, far behind. It is also worth noting that 84% of the iPhones sold in 2021 were 5G devices.

This is good news for Apple investors as the 5G smartphone market still has a lot of room for growth. According to a third-party estimate, global 5G smartphone shipments are expected to clock a compound annual growth rate of 122% through 2027. Apple's strength in this area puts it in a great position to benefit from this secular tailwind.

More importantly, the company is going all out to maintain its dominance in 5G smartphones. Apple has reportedly started production of a new iPhone SE that is 5G capable. This device will lower the entry point for consumers looking to buy a 5G-enabled iPhone, as the average starting price of the device could range between $269 and $399 after accounting for trade-ins and discounts, according to analysts at J.P. Morgan. Given that the average selling price of a 5G smartphone reportedly stood at $643 last year as per IDC, such a device could help Apple substantially boost sales and corner a bigger share of the market.

The iPhone produced nearly 59% of Apple's revenue in the first quarter of fiscal 2022 (which ended Dec. 25), generating $65.6 billion in sales. Sales growth in this segment should set Apple up for long-term gains as the 5G smartphone market is expected to get bigger.

Additionally, Apple is rumored to be developing a self-driving electric car, with reports suggesting that its prototype covered 13,000 miles on the road last year. Another report by 9to5Mac indicates that Apple has reportedly placed orders for chip modules that will be incorporated into the chips that will control the vehicle's autopilot. So, Apple is not just on track to grow its biggest business segment -- the iPhone -- in the long run, but also tap into other lucrative tech opportunities.

All this makes Apple a top stock to buy right now as it is relatively cheaper than it was before, and has strong catalysts that could supercharge its long-term growth.

2. The case for Nvidia

Nvidia's stock price is down 20.9% in 2022, and that has brought the company's P/E ratio down to about 60.5. That multiple is close to its five-year average earnings multiple of 58, which means that the stock is in a buy zone considering the terrific pace of its growth.

Nvidia recently released results for its fiscal 2022 (which ended Jan. 30), reporting 61% growth in revenue to $26.9 billion and a 78% spike in adjusted earnings to $4.44 per share. Analysts expect the chipmaker's earnings to increase at a compound annual rate of 30% for the next five years, but the pace of Nvidia's growth indicates that the forecast could be a conservative one.

The company anticipates $8.1 billion in revenue in the first quarter of fiscal 2023, which would translate into a 43% year-over-year increase. This impressive growth seems sustainable as Nvidia enjoys multiple tailwinds from growth markets ranging from video gaming to data centers to the automotive sector to the metaverse.

For instance, Nvidia controls 81% of the market for gaming graphics cards, as per Jon Peddie Research. And the discrete GPU market is expected to generate $54 billion in annual revenue by 2025 as compared to $24 billion in 2020. Demand for graphics cards is booming on the data center front as well.

According to a third-party estimate, the demand for data center accelerators could increase five-fold by 2026 to $65 billion as compared to last year. This should pave the way for further growth in Nvidia's data center business, which is already flying. The company's data center revenue increased 58% in fiscal 2022 to $10.6 billion, and this outstanding growth is here to stay for a couple of reasons.

First, Nvidia is all set to strengthen its data center offerings with the addition of a server CPU (central processing unit) next year. With this move, Nvidia will be able to tap a market that's expected to be worth $19 billion in 2023.

Second, the metaverse has already started giving Nvidia's data center business a boost. Meta Platforms is using 6,000 of Nvidia's A100 data center GPUs to power a supercomputer that is intended to help build the metaverse. Nvidia will eventually provide 16,000 GPUs for this supercomputer. Clearly, the development of the metaverse is going to boost GPU demand.

All of this indicates that Nvidia is sitting on solid catalysts that should help it grow at an impressive pace for years to come, which is why investors should consider buying this tech stock during the market downturn.