With global macroeconomic and geopolitical worries in abundance these days, it's no wonder that financial markets have fared poorly in 2022. The S&P 500 index has plunged 21% lower so far this year. 

Some stocks have done even worse, but some have done better. Many stocks in the healthcare sector have logged gains so far this year. This is because the essential goods and services offered by healthcare companies have generally been proven to be more recession-resistant than other sectors of the economy.

Here are two dividend-paying healthcare stocks that have outperformed this year and could do well for shareholders for many years to come.

A person analyzes a stock.

Image source: Getty Images.

1. Johnson & Johnson

Johnson & Johnson (JNJ 0.23%) hardly needs an introduction. Its consumer health segment, which it plans to spin off into an independent company next year, boasts brands that consumers around the world know well. These include Band-Aid adhesive bandages, Listerine mouth wash, and Zyrtec over-the-counter allergy medicine.

Yet it's the lesser-known pharmaceutical and medtech segments where the real opportunities lie. J&J has 13 medicines and a COVID-19 vaccine on track to post at least $1 billion in sales in 2022. Readers may have seen some of these products advertised on television or online, including immunology drugs Stelara and Tremfya.

Plus, with more than 100 indications under clinical development in its pipeline, there's reason to believe that J&J will continue to release more blockbuster medicines down the road. This is why analysts are anticipating 3.9% annual non-GAAP (adjusted) diluted earnings per share (EPS) growth from the company over the next five years. And since J&J typically outperforms analysts' expectations, this could be a somewhat conservative growth estimate. 

With 60 years of dividend hikes to its credit, J&J is also a Dividend King. The safe dividend stock offers investors a 2.6% dividend yield, which is significantly more than the S&P 500 index's 1.7%. And shares of the company can be scooped up at a forward price-to-earnings (P/E) ratio of 17.2. This is despite the fact that shares of J&J are up 1% year to date. This is just a slight premium to the healthcare sector's average multiple of 16.4. 

2. Humana

With a market capitalization of $70 billion, Humana (HUM 0.28%) is the fifth-largest managed care company in the world. For context, Humana's combined medical, dental, and vision membership base was just over 22.3 million as of the third quarter of 2022. 

With healthcare costs rising and more individuals developing chronic medical conditions, it's reasonable to expect that demand for health insurance will grow further in the years ahead. That's why the market research firm Global Market Insights is projecting that the global health insurance industry will compound at 4.6% annually from $2.8 trillion in 2020 to $3.9 trillion by 2027. 

And given that Humana's net margin was 4% through the first nine months of this year, the company has demonstrated that it is profitable. This shows that the health insurer is well-equipped to successfully underwrite insurance policies for its influx of new customers as individuals rely on Humana to hedge against the rising healthcare costs. That is why analysts are forecasting that Humana will generate 14.7% annual earnings growth for the next five years. 

The stock's 0.6% dividend yield won't impress income investors. But with a dividend payout ratio not that far above 10%, Humana won't have any trouble handing out double-digit percentage dividend increases in the years ahead . 

With the stock up 19% year to date, its forward P/E ratio of 19.8 may seem high against the healthcare plan industry's average multiple of 17.1. But factoring in that Humana's 14.7% annual earnings growth is higher than the healthcare plans industry average of 12.7%, this is a justifiable valuation to pay for the stock.