Investors looking for reliable stocks to buy are often drawn to companies like CVS Health (CVS -1.62%), and it's not hard to understand why. Healthcare expenses are one of the last budget items that families cut when economic conditions sour. 

Investors seeking reliable growth were more than a little disappointed by the headline numbers in CVS Health's third-quarter report. Instead of the strong profit that investors are used to, the company reported a $3.4 billion loss during the three-month period that ended Sep. 30, 2022.

Is CVS Health still a good stock to buy, or should investors be worried about the recent hit to earnings? Here's what you need to know.

One-off charges

There were two, enormous, non-recurring expenses that CVS Health dealt with in Q3. The company set aside $5.2 billion to settle all outstanding opioid litigation claims in the U.S. This is the first time a company has tried to settle opioid-related suits from multiple states in one fell swoop.

In 2015, the company spent $12.9 billion to acquire Omnicare, a company that provides pharmacy services to long-term care (LTC) facilities. CVS Health has a long history of well-executed acquisitions, but this isn't one of them. The company wrote down the value of its LTC assets by $2.5 billion in Q3.

To account for opioid litigation charges and asset write-downs, management had to lower its earnings-per-share guidance based on generally accepted accounting principles (GAAP). Instead of a range between $7.23 and $7.43 this year, the company expects GAAP earnings to land in a range between $3.12 and $3.22 per share.

Retail challenges

CVS Health's pharmacies are filling more prescriptions than ever, but profits from its retail segment are down this year. Q3 adjusted operating income from the company's retail segment fell 19% year over year.

Management blamed sinking demand for COVID-19 vaccinations and testing this year for the decline. This probably won't be a problem again next year. As of Oct. 28, only 23 million Americans had received updated COVID-19 booster shots.

Individual investor thinking deeply about which stocks to buy.

Image source: Getty Images.

The good news

One-time charges aside, this was a terrific quarter for CVS Health. That's because the mega-merger with major U.S. health insurance company Aetna, which began about four years ago, is working out well.

As expected, combining healthcare benefits management with businesses that provide those benefits is boosting profits. Adjusted operating income from the company's health-benefits segment rose 14% year over year during the first nine months of 2022.

As a result, the company actually raised profit expectations on an adjusted basis. Instead of a range between $8.40 and $8.60 per share, CVS now expects adjusted earnings to reach between $8.55 and $8.65 per share this year.

A buy now?

A market pleased with CVS Health's improved outlook pushed the stock about 3% higher on Wednesday, Nov. 2 after the company reported Q3 earnings. Now the shares offer a 2.3% dividend yield.

CVS Health froze its dividend payment in place for several years to help pay for its merger with Aetna. Despite the years-long freeze, the payout has grown a stunning 144% over the past decade.

Earlier this year, CVS Health made a deal to acquire primary care specialist, Signify Health. Becoming the main provider of primary care for Aetna members could push soaring profits even higher and allow for big dividend-payout bumps in the years ahead. Put it all together and this looks like a very smart stock to buy right now.