Johnson & Johnson (JNJ -0.69%) and AbbVie (ABBV -1.03%) are two of the bigger names in healthcare stocks. The companies are favored by income-oriented investors because each has raised its dividend for 50 years or more.

This is a pivotal year for both. Johnson & Johnson is expected to complete the spinoff of its consumer health segment later this year, perhaps the biggest shake-up in the company's history. AbbVie's Humira, for years the world's top-selling drug, will begin to face generic competition in the U.S. for the first time this year.

Johnson & Johnson is a little more diversified than AbbVie, even after the expected spinoff, because it is also a pharmaceutical company and a medtech company. AbbVie, while it is strictly a pharmaceutical company, offers more growth and a better dividend. Which is the better buy right now? Let's take a look.

The case for Johnson & Johnson

The company is a great stock to own during a recession because of its consistency, regardless of economic conditions. While 2022 was a dreary year for some healthcare companies, Johnson & Johnson's shares are down around just 3% over the past year. Over the past decade, the company delivered a total return of slightly more than 180.7%.

More importantly, when a real recession hits, Johnson & Johnson stock is seen as a safe harbor by investors. During the Great Recession of 2007 to 2009, its shares dropped 21%, but that's less than half of the S&P 500's 54% decline during that period. 

Part of the reason for that is the company's steady quarterly dividend, which it raised 6.6% last year to $1.13 per share, the 60th consecutive year the company has increased its dividend. Its current yield is around 2.78%.

As a mature company, its growth is slow but steady. In 2022, the company reported revenue of $94.9 billion, up 1.3% over 2021, though earnings per share (EPS) dropped 13.8% to $6.73, due in great part to the effect of a stronger dollar making the company's products overseas more expensive.

Johnson & Johnson should show greater margins once it completes its spinoff of consumer health, the only segment that saw declining sales in 2022 ($15 billion, down 0.5% over 2021). The new company, called Kenvue, filed for its initial public offering on Jan. 4, so it will likely go public this year. The talcum powder lawsuits Johnson & Johnson is facing will now fall on Kenvue, though Johnson & Johnson will retain, for now, 80.1% ownership of the new company.

The company's other divisions are thriving. Pharmaceutical reported revenue of $52.6 billion, up 1.7% year over year, and medtech saw revenue of $27.4 billion, up 1.4% over 2021. The company's acquisition of Abiomed, known for its Impella heart pump, gives medtech 12 products with more than $1 billion in annual sales. 

The company forecasted 2023 revenue of between $96.9 billion and $97.9 billion, up 5% at the midpoint, over 2022. Those numbers count, for now, the consumer health segment.

JNJ Total Return Level Chart

JNJ Total Return Level data by YCharts

The case for AbbVie

As strong as Johnson & Johnson's total returns were over the past decade, AbbVie's were far better at 516.9%. Despite overhanging concerns about how the company will fare now that blockbuster immuno-oncology drug Humira is beginning to face generic competition in the U.S., AbbVie's shares are up more than 7% over the past year.

Investors realize the company may face a couple of down years of revenue, but also know the company's up-and-coming immuno-oncology drugs, Skyrizi and Rinvoq, could easily make up for that deficit as they continue to add applications. In 2022, AbbVie reported revenue of $58.1 billion, up 3.3% over 2021 and EPS of $6.63, up 2.8% year over year. While the company acknowledges it probably won't top 2022's revenue number the next two years, it says it expects to return to revenue growth by 2025. Also, Humira's sales won't plummet right away as it will take awhile for biosimilars to take market share.

AbbVie has an even better dividend than Johnson & Johnson. It raised its quarterly dividend by 5% this year to $1.48, the 52nd consecutive year it has increased its dividend, counting its time as part of Abbott Laboratories. If you just look at what AbbVie has done since it became an independent company in 2013, it has raised its dividend by 270% in that period. The current yield on the dividend is 3.89%.

No bad choices here

Of the two, Johnson & Johnson is certainly the safer pick, even with the talcum powder lawsuits and the complications around its consumer health spinoff. However, safer isn't necessarily better. 

AbbVie has a better dividend, more dividend growth, and a slightly lower valuation (23 times earnings versus 24 times earnings). In the short term, it will likely take a hit to its share price this year once its quarterly reports show revenue slipping year over year. However, considering the company's potential in immuno-oncology therapies, it appears to be the better long-term buy right now.