Here's the bad news: Since 1957, the S&P 500 has fallen by 20% (or more) on 10 different occasions. In other words, bear markets take place about once every six years. And on average, these downturns have lasted 390 days, with the index falling 36% from its high.

Here's the good news: Over the same period, the typical bull market has run for 2,100 days, sending the index up 192%. Put another way, bull markets tend to erase all losses and then some. That's why market downturns are often a buying opportunity.

So how can you beat a market crash? First, don't panic sell. Remember that every past downturn has ended with the market hitting new highs. Second, have a game plan. Keep a watch list of stocks you plan to buy if prices plummet. For instance, Nvidia (NVDA -10.01%) and Salesforce.com (CRM -0.57%) are on my list. Here's why.

Investor watching market trend lower, symbolizing a market crash.

Image source: Getty Images

1. Nvidia

In 1999, Nvidia invented the graphics processing unit, a semiconductor designed to process data very quickly. Not surprisingly, these chips excel at compute-intensive tasks like analytics and artificial intelligence, and Nvidia's brand name has become synonymous with high-performance computing.

To reinforce that advantage, Nvidia acquired networking specialist Mellanox last year. Since then, the two have collaborated to deliver a brand new chip: the data processing unit. This chip offloads networking tasks, freeing central processing units to run applications, which boosts data center performance and security.

Of course, a new product is good for Nvidia's top line, but there's a bigger picture taking shape. As Nvidia's computing platform expands (i.e., one chip to two chips), the company can build more comprehensive solutions for its data center clients. For instance, the DGX SuperPOD combines Nvidia GPUs and DPUs into a single supercomputer, delivering a turnkey solution for enterprise AI.

Not surprisingly, Nvidia has reported impressive financial results in recent years.

Metric

Q1 2018 (TTM)

Q1 2022 (TTM)

CAGR

Revenue

$7.5 billion

$19.3 billion

27%

Free cash flow

$1.5 billion

$5.5 billion

38%

Data source: Ycharts. TTM = trailing 12 months. CAGR = compound annual growth rate. Note: Q1 2022 ended May 2.

Looking ahead, I think Nvidia can maintain this momentum. In April, the company unveiled the Grace CPU, once again extending its computing platform. This new data center chip will launch in 2023, featuring energy efficient ARM cores. More importantly, it will deliver 10 times the performance of today's fastest servers, helping clients tackle complex AI workloads.

Here's the bottom line: Artificial intelligence is one of the most transformative technologies ever invented by the human race, and it will reshape the world in the years ahead. More to the point, Nvidia values the data center market at $100 billion by 2024. And as the industry leader, it's well positioned to capitalize on that opportunity. That's why this growth stock looks like a smart investment, especially if a market crash slashes the share price.

2. Salesforce

Salesforce specializes in customer relationship management. Its Customer 360 platform comprises a range of software designed to unify data across sales, services, marketing, and commerce, driving productivity by giving brands a complete view of each customer.

The cloud platform also includes tools for AI-powered insights and visual analytics, as well as low-code software development and external data integration. In short, Salesforce is an end-to-end solution for CRM, helping clients handle every stage of the customer lifecycle.

Recently, research firm Gartner recognized Salesforce as the CRM industry leader, suggesting that the company has a greater ability to execute and a more complete vision than any of its rivals. Moreover, the International Data Corp. puts Salesforce's market share at 19.5% -- more than its next four competitors combined.

Not surprisingly, this dominance has helped the company grow quickly; and today, it serves over 150,000 clients.

Metric

Q1 2018 (TTM)

Q1 2022 (TTM)

CAGR

Revenue

$8.9 billion

$22.4 billion

26%

Free cash flow

$1.8 billion

$5.6 billion

33%

Data source: Ycharts. Note: Q1 2022 ended April 30.

Management values the CRM market at $175 billion by fiscal 2025, representing 11% annualized growth. Of course, Salesforce has been growing much faster in recent years, and if it can maintain that momentum, the company is well positioned to take more market share.

Here's the bottom line: If the market crashes, Salesforce stock will likely plunge right alongside the broader indexes. But that's OK! Short-term headwinds give long-term investors a chance to buy shares on sale. And given Salesforce's solid competitive position and strong prospects for future growth, that looks like a smart decision.