The saying that nothing is certain except death and taxes may need to be amended to include a market crash. While no one knows when it will occur, eventually it will. When it does, investors tend to sell stocks off indiscriminately, and even strong companies see their prices go down.

When that happens, if you have funds available, here are three high-quality companies in which you can pick up shares.

Three men carrying building blocks between a downward-pointing arrow and an upward-pointing one.

Image source: Getty Images.

1. Amazon 

Amazon (AMZN 0.69%) has become a powerhouse by intensely focusing on the customer. It sells just about anything you can think of online at competitive prices, which has been a winning strategy. The popular Amazon Prime subscription service provides fast delivery and even a streaming service. Even when the pandemic subsides, people are undoubtedly going to continue ordering goods online after seeing the benefits, which will only help the company.

It is not merely an online site, though. Amazon sells hardware like the Kindle and Alexa-enabled devices. That's not even mentioning its fast-growing (with a 30% revenue increase in 2020 to $45.4 billion) and high-margin (with a 30% operating margin) Amazon Web Services division. This is a leading cloud computing business that allows companies to use a ton of data to (hopefully) make better and faster decisions.

Earlier this month, it reported fourth-quarter results, posting another period of stellar sales growth. For 2020, Amazon's sales increased by 38% to $45.4 billion, and its operating income was $22.9 billion, a 57% increase.

2. Johnson & Johnson

Johnson & Johnson (JNJ -0.58%) is around 135 years old, and perhaps best known for its consumer products, such as Band-Aid, Tylenol, Motrin, Carefree, and a host of other well-established brands. But it also has a pharmaceutical business that produces drugs to treat diseases like cancer, arthritis, diabetes, and hypertension, and a medical devices unit whose products are used in surgery, orthopedics, and other fields.

The pandemic hurt certain businesses, particularly as physicians and patients put off elective surgeries, in 2020. But Johnson & Johnson showed its resilience as demand for its other products remained strong, and results improved throughout the year. In the fourth quarter, its adjusted sales rose by more than 7%.

Management expects adjusted sales to grow by nearly 9% this year, driving earnings per share more than 16% higher. Meanwhile, the company released data on its single-dose COVID-19 vaccine last month, and it applied to the U.S. government for emergency use. Its guidance doesn't include any impact from the potential treatment.

Johnson & Johnson has reliably raised dividends each year, which helps bolster the stock during turbulent times. Last April, the board of directors announced a 6% increase to the quarterly payment to $1.01, marking 58 straight years with a raise.

With more than a 50-year streak, this puts the company in the exclusive Dividend King group.

3. Walmart

Walmart (WMT 0.84%) opened its first discount store nearly six decades ago. It has grown into the world's largest retailer by trying to offer its customers the lowest price available. Saving money will always appeal to consumers but that is particularly true during difficult economic days.

Last year's results are prime evidence. In its fiscal third quarter, which ended on Oct. 31, 2020, adjusted sales grew by over 6% to $135.8 billion, while operating income was more than 16% higher at $5.8 billion.

While online competition, including Amazon, has hurt other retailers, management, determined to stay relevant, is investing in technology and pushing an omnichannel approach that allows customers to buy goods however they want with multiple delivery options (e.g., online ordering and pick-up in the store).

Walmart also has a nice history of raising dividends annually, having done so since its first payout in 1974. It is on pace to join the Dividend Kings in a few years.

Undoubtedly, it is a stressful time when markets experience a severe and quick drop. After all, there is a good reason why it happened. However, you can reduce your sense of unease and fatten your wallet by looking to buy strong companies that will continue performing well. These three have different business approaches but have proven themselves successful for a long time.