Historically, the U.S. stock market is an excellent means of creating generational wealth, especially for long-term investors who hold on to their winning investments despite short-term noise. For example, $1,000 invested in the S&P 500 in 1950 would have grown to over $2.6 million by 2023, despite the multiple boom and bust cycles.

However, to benefit from the stock market's power of compounding, it is also essential for investors to choose high-quality stocks with strong fundamentals and robust growth prospects. Here's why Nvidia (NVDA 3.46%) and Meta Platforms (META 2.33%) fit the bill and can prove to be smart long-term buys now.

Nvidia

Previously famous for its graphics processing units (GPUs) and advanced gaming hardware, Nvidia is now better known for its indisputable leadership in the artificial intelligence (AI) market. Consumer internet companies, cloud service providers, and enterprises have been increasingly using Nvidia's GPUs, central processing units (CPUs), networking technologies, and AI-optimized software solutions to build the infrastructure needed for running power-hungry and complex generative AI applications.

Nvidia expects even more demand for its chips from sovereign AI cloud and regional AI cloud providers, as data and application security have become a priority for governments across the world. Enterprises such as Snowflake, ServiceNow, Adobe, and Databricks are increasingly integrating AI copilots and assistants in their platforms. Many companies across various industries are also building customized AI applications. The increasing adoption of AI by enterprises is driving up demand for Nvidia's accelerated computing solutions. Not surprisingly, Citi analyst Christopher Danely expects the company to account for at least a 90% share of the AI chip market in future years.

Besides AI hardware, Nvidia is also making major strides in its software business. The company expects to end fiscal 2024 (ending Jan. 31, 2024) with an annualized revenue run rate of $1 billion for recurring software, support, and services offerings. Nvidia has also pointed out DGX Cloud service and AI Enterprise software as two major growth opportunities.

Nvidia licenses its DGX Cloud service (which gives access to AI models, software, security services, researchers, and engineers) to enterprise customers to enable them to build customized generative AI applications. DGX Cloud service is also integrated with Nvidia's AI enterprise software (enterprise-grade software suite optimized for AI workloads and closely integrated with Nvidia hardware).

All these initiatives have translated into solid financial success for Nvidia. In the third quarter of fiscal 2024, the company reported a 206% year-over-year revenue increase, while adjusted earnings per share (EPS) were 6 times more on a year-over-year basis. Analysts are also expecting the company's revenue to grow 232% year over year to $20.1 billion and earnings per share to grow by 411% year over year in the fourth quarter.

According to Fortune Business Insights, the global AI market is estimated to grow from $515.3 billion in 2023 to just over $2 trillion in 2030. Considering Nvidia's dominance in the rapidly growing AI market and its annual run rate of just $44.9 billion, there is still much scope for growth in the coming years.

Meta Platforms

After a difficult 2022, social media giant Meta Platforms' share prices rose nearly 185% in 2023. However, the stock's upward trajectory may not be yet over and there are still many reasons to like this company.

First, Meta Platforms owns and operates multiple social media platforms such as Facebook, Instagram, WhatsApp, and Messenger, which together command nearly 3.96 billion monthly active users. With the company's user base accounting for more than 40% of the global population, Meta's platforms have become indispensable for the majority of advertisers.

Second, Meta is witnessing an acceleration in advertising revenue across multiple geographic segments. Increasing spending from Chinese advertisers targeting international markets and rising advertising demand in South Asian markets emerged as major growth drivers.

Third, Meta has introduced new generative AI-powered advertising features such as text variations, image expansion, and background generation. These tools have been included in the Advantage+ solutions catalogue to make it easier for advertisers to create impactful advertisements. The Advantage+ shopping campaigns have already reached a $10 billion run rate, while over half of the company's advertisers are also using these tools.

Fourth, Meta has also managed to increase user engagement with AI-driven feed recommendations on Facebook and Instagram. In the third quarter, AI-driven recommendations resulted in a 7% increase in time spent on Facebook, and a 6% increase in time spent on Instagram.

Business messaging is also growing on Meta's platforms. With 600 million conversations between people and businesses daily, click-to-message advertising can prove to be a big opportunity for the company.

Finally, Meta is also investing in new data center architecture to improve cost efficiencies and increase planning flexibility for new GPU and CPU capacity.

All these tailwinds have made Meta a compelling pick for 2024 and beyond.