What's the stock market going to do next? It's anyone's guess. Some think a recession could be on the way. Others aren't as glooomy. But there's no question whatsoever that conditions are highly volatile.

We asked three Motley Fool contributors to identify relatively safe stocks to buy in an uncertain market. Here's why they picked AbbVie (ABBV -0.30%), AstraZeneca (AZN 5.38%), and Pfizer (PFE -3.85%).

A smiling person with hands behind head while sitting in front of a laptop.

Image source: Getty Images.

In it for the long haul

Prosper Junior Bakiny (AbbVie): Shares of pharma giant AbbVie have risen by nearly 30% since the beginning of the year, while the S&P 500 has dropped by 6%. AbbVie's performance amid marketwide troubles caused by geopolitical (and other) tensions is commendable. The drugmaker should continue to be a safe haven for many of the same reasons it has outperformed the market this year.

First, pharmaceutical companies benefit from the fact that lifesaving medicines are always in demand regardless of economic conditions. The need for top-of-the-line therapies will increase in the coming decades due to the world's aging population. Prescription drug use and spending on prescription drugs generally grows with age.

Last year, AbbVie's lineup had more than a dozen blockbuster products. The company is set to replace its current top-selling medicine, Humira, once it loses patent exclusivity in the U.S. next year. AbbVie expects immunosuppressants Skyrizi and Rinvoq, which have earned approvals across most of Humira's key indications, to generate more than $15 billion in risk-adjusted sales in 2025. These two medicines combined for about $4.6 billion in sales in 2021.

Second, AbbVie remains reasonably valued, even after its recent run. The company's forward price-to-earnings ratio currently stands at 12.3, below the industry's average of 12.7. 

Third, AbbVie is an excellent option for dividend-seeking investors. It is part of the exclusive group of Dividend Kings and currently offers an above-average yield of 3.25%. Dividend-paying companies have historically underperformed their non-dividend paying counterparts. In today's inflationary environment, dividends could be even more valuable.

Overall, AbbVie's business has the tools to provide some stability to anyone's portfolio in today's tricky and volatile market. The company is well positioned to provide excellent long-term returns to patient investors. 

Solid financials and an attractive dividend

David Jagielski (AstraZeneca): In times of uncertainty, investors can often find safety in companies that have solid financials and trade at modest multiples. Biopharmaceutical stocks, in general, can be volatile holdings, especially those that don't yet have approved drugs or that are burning through tons of cash. 

But one drugmaker that's safer than most is U.K.-based AstraZeneca. It has a broad business with drugs that cover multiple disease areas, including oncology. AstraZeneca's cancer drugs generated $13.7 billion in total revenue in 2021 (more than one-third of the company's top line).

All of its major segments reported positive year-over-year growth last year, even amid the pandemic and rising COVID-19 case numbers. That's a great show of the company's resiliency.

Furthermore, the company is also safe in that it generates tons of money. Last year, its free cash flow totaled $3.8 billion. In four of the past five years, AstraZeneca's free cash has been north of $1 billion.  The company also had more than $6.3 billion in cash and cash equivalents on hand as of the end of last year. That puts it in a great position to keep on funding its business without needing to rely heavily on share offerings.

Another reason this stock is a good option right now is that it pays a dividend yield of just over 2%. That's higher than the S&P 500 average of 1.3% and can help bolster returns for investors in case the stock itself isn't doing well.

But that isn't the case so far in 2022, with AstraZeneca's stock trading at 52-week highs and up 22%. With a forward price-to-earnings multiple of 17, AstraZeneca still isn't terribly expensive (in the past it has traded at multiples of more than 20).

Whether you want safety or just a good and reliable dividend, AstraZeneca's a great place to park your money amid the current market volatility.

Bringing it all to the table  

Keith Speights (Pfizer): Investors usually have to give up something in return when buying relatively safe stocks. However, Pfizer is a stock that offers nearly everything that any investor would want -- safety, income, growth, and an attractive valuation.

Let's start with safety. Pfizer's products will enjoy solid demand regardless of what happens with the economy or the stock market. Doctors won't quit prescribing the company's blood thinner Eliquis or prostate cancer drug Xtandi because a recession hits. 

Granted, there are some questions about the future prospects for Pfizer's COVID-19 products. However, it's looking increasingly like the pandemic will transition into an endemic where COVID-19 vaccine Comirnaty (and its successors) along with COVID-19 pill Paxlovid will be needed for years to come.

As for income, Pfizer's dividend yield tops 3%. The company has increased its dividend payout by 25% over the past five years. More dividend hikes seem likely considering Pfizer's exceptionally strong financial position.

Pfizer also anticipates double-digit earnings growth through 2025. And even though the company faces patent expirations for several key drugs in the second half of the decade, Pfizer fully expects to keep growing. The company's pipeline includes multiple promising candidates. Its acquisitions strategy already appears to be on the verge of paying off in a major way as well.

Last but not least, Pfizer appears to be a bargain. The stock trades at only 7.2 times expected earnings. Sure, the company's COVID-19 profits could diminish some after 2023. However, there's no getting around the fact that Pfizer's valuation is attractive by any metric you want to use.

It's usually true that you can't have it all. But Pfizer is a clear exception to the rule.