AbbVie (NYSE:ABBV) and Johnson & Johnson (NYSE:JNJ) are two of the largest pharmaceutical companies in the world. However, big doesn't mean buy, and both of these juggernauts currently face headwinds that may scare many investors away. AbbVie is dealing with Humira's declining international sales caused by competition from biosimilars in Europe.

Johnson & Johnson is facing thousands of different product liability lawsuits. New Mexico just filed a lawsuit against Johnson & Johnson alleging that the company's claims about the safety of its baby powder were misleading. In October, Johnson & Johnson settled a lawsuit for $10 million with two Ohio counties that removed the company from the first federal lawsuit against opioid manufacturers. In addition to mounting legal troubles, Johnson & Johnson's competitive advantage is under pressure.

With that said, these pharma giants are hardly dead in the water, and there are several good reasons to consider purchasing shares of each. But which of the two should you buy today? Let's dig in a little deeper and find out. 

The case for AbbVie

Despite Humira's declining prospects in Europe, the drug is still racking up strong -- and growing -- sales in the U.S. During the third quarter, U.S. sales of Humira were $3.9 billion, a 9.6% increase year over year. In other words, Humira is still contributing significantly to AbbVie's top line, and according to the research firm EvaluatePharma, Humira will remain the top-selling drug in the world until 2024. In the meantime, AbbVie can look for other products to replace its crown jewel.

Scientist wearing a lab coat surrounded by question marks

Image source: Getty Images.

The company boasts several drugs with fast-growing sales. Most notably, cancer drugs Imbruvica and Venclexta have combined sales for the third quarter of $1.5 billion, a 38% increase compared to the prior-year quarter. Further, Humira made a big move last year when it acquired Allergan (NYSE:AGN) in a cash-and-stock deal valued at $63 billion.

This acquisition will help AbbVie become a leader in the medical aesthetic market and further diversify its product line. Finally, AbbVie is a great dividend stock: The company offers a dividend yield of 5.3%, and its quarterly dividend payout has increased by 141% over the past five years. For all those reasons, AbbVie still looks like an attractive stock.

The case for Johnson & Johnson

One of the most attractive features Johnson & Johnson offers investors is its diversification across several business lines within the healthcare sector. There's the company's pharmaceutical business, which boasts several products with blistering sales growth. For instance, Johnson & Johnson's plaque psoriasis drug Stelara recorded sales of $1.7 billion during the third quarter, 30% higher than the same quarter the prior year. Also, sales of Tremfya, a treatment for moderate to severe psoriasis, were $290 million, representing a 69% year-over-year increase. 

While sales of many of the company's drugs are declining -- such as Remicade, which saw its sales for the third quarter decline by 17.6% year over year to $1.1 billion -- Johnson & Johnson has enough products to pick up the slack. Revenue from Johnson & Johnson's pharmaceuticals segment during the third quarter was $10.9 billion, a 5.1% year-over-year increase. Johnson & Johnson's pharmaceutical segment generates the bulk of its revenue (about 52% during the third quarter), but the company also has its consumer and medical devices segments to fall back on.

During the third quarter, revenue from Johnson & Johnson's consumer business (which offers over-the-counter medical products) was $3.5 billion and increased by 1.6%, while its medical devices segment recorded a revenue figure of $6.4 billion, a 3.1% year-over-year decrease.

Johnson & Johnson is also a dream come true for income-seeking investors. The company offers a 2.6% dividend yield and has raised its dividends every year for 57 years in a row. Johnson & Johnson will likely remain a top player in the healthcare sector for many years to come. Given its diversified business and its secure dividends, the company is worth serious consideration. 

Profitability and valuation 

During the third quarter, AbbVie posted net earnings of $1.9 billion, a 31.4% decrease year over year; the company also recorded an earnings per share (EPS) of $1.26, down from $1.81 compared to the year-ago period. By comparison, Johnson & Johnson's net earnings were $1.8 billion, a 55.4% decrease compared to the prior-year quarter, and its EPS was $0.66, down by 54% year over year. 

With both companies posting less than stellar bottom lines, let's turn to their respective price-to-earnings (PE) and price-to-earnings growth (PEG) ratios. In this department, AbbVie's 9.27 forward P/E, and its 2.72 PEG compares favorably to Johnson & Johnson's 16.41 forward P/E and 2.91 PEG. 

The verdict 

Johnson & Johnson's shares rose by 13% last year, which isn't outstanding considering the S&P 500 gained almost 30% during 2019, but it is still better than AbbVie's stock, which slid by 3.96%. 

I think Johnson & Johnson is a better buy today, and here's why: Johnson & Johnson isn't likely to produce double digits top-line growth routinely, but the company's diversified business is a major strength that can help keep the company afloat even in times of economic downturns. Also, Johnson & Johnson's dividend is one of the most secure out there.

While the company is facing some legal issues, this is nothing new for Johnson & Johson which has faced scores of lawsuits before, and the company has always managed to come out of them in one piece. In other words, Johnson & Johnson's current wave of lawsuits is unlikely to make a serious dent in the company's long-term thesis, if past history is any indication. 

By contrast, AbbVie's acquisition of Allergan has yet to close, and there's still some uncertainty as to how this move will affect the company's financial performance in the future. With its top-selling product gradually losing more and more steam over the next few years, AbbVie has yet to show that other products will fill Humira's shoes definitively. With its future still being a bit murky, I think AbbVie loses this matchup.