AbbVie (ABBV 0.86%) and GlaxoSmithKline (GSK 0.73%) have much in common. They are huge pharmaceutical companies that have a long record of success, consistent revenue growth, and regular dividends, and yet they are underpriced.

AbbVie's shares have been sluggish for the past couple of years because of concerns about the pending patent cliff in the U.S. for its blockbuster immunology drug Humira, while GlaxoSmithKline's shares have suffered recently because of concerns about lawsuits regarding its recalled indigestion drug, Zantac.

While both issues are worth noting, to me they're overblown and have already been baked into each stock's price, presenting investors with an opportunity to purchase these solid dividend earners at reasonable prices.

AbbVie has prepared for the future

AbbVie's shares are up a little more than 5% so far this year, but it's still a bargain, considering its earnings. Its trailing price-to-earnings (P/E) ratio is 20, while its forward P/E is only 12. The company is coming off a solid second quarter. Revenue was reported as $14.6 billion, up 4.5% year over year, while earnings per share (EPS) was listed at $0.51, up 21.4% over the same period in 2021.

Humira is projected to be the No. 2 selling drug in the world this year, behind only Comirnaty, the COVID-19 vaccine from Pfizer, according to Statista research. The immunology blockbuster is already facing biosimilar competition overseas and will lose its patent exclusivity in the United States in 2023. That doesn't mean that Humira sales will vanish, however. In many cases, doctors will continue to prescribe it over biosimilars, and the company will get Humira-connected royalties and licensing agreements from its biosimilar competitors. However, over time, as they have internationally, Humira's U.S. sales will diminish.

Fortunately, AbbVie has expanded its portfolio. In particular, its two other immunology drugs, Skyrizi and Rinvoq, are on the rise. Skyrizi's second-quarter revenue of $1.3 billion was 85.9% higher year over year, while Rinvoq's second-quarter revenue of $592 million was up 56.3% over the same period in 2021.

AbbVie is much less dependent on Humira than it once was. In 2017, Humira was responsible for 65% of the company's revenue. This past quarter, Humira was only responsible for 36.7%.

AbbVie is a Dividend King, because, counting its time as a division of Abbott Labs, it has raised its dividend for 50 consecutive years. Since it became an independent company in 2013, it has boosted its dividend more than 250%. The company's last dividend increase, in October 2021, was an 8.5% rise to $1.41 per quarterly share. At its most recent price, that represents a yield of around 4%. There's plenty of room for continued growth as the company's cash dividend payout ratio is around 43%.

GlaxoSmithKline primed to bounce back

GlaxoSmithKline's shares are down more than 30% this year, thanks to worries about Zantac lawsuits regarding its connection to cancer. While the lawsuits are expected to drag on, analysts at Credit Suisse say the expected likely $5 billion costs for the lawsuits to GlaxoSmithKline are dwarfed by the $12 million in market cap the stock has lost in recent weeks when news of the lawsuits began.

Thanks to the stock's share price decline, it has become attractively priced compared to earnings. The company's trailing P/E is about 12 and its forward P/E is around 10.

In the second quarter, GSK reported revenue of $8.7 billion, up 13% year over year, once the revenue from its July spinoff of its consumer division, now a separate company called Haleon, is taken into account. GSK's adjusted operating profit also grew 22%. The company's EPS did drop 53%, though, to $0.24 per share, thanks in great part to expenses regarding its spinoff. The company said it expects yearly revenue to rise 6% to 8% over 2021, driven by improved sales from specialty medicines.

The company dropped its dividend to be in line with its spinoff. But starting the last quarter, it is on the rise again, up by 14% to $0.3908 per share, giving it a yield of around 6.43% at current share price. While that sounds high, the company has a safe cash dividend payout ratio of 53%.

In the lab, GSK has had a strong year. On July 24, the company announced that the U.S. Food and Drug Administration (FDA) had approved Benlysta (belimumab) to treat lupus nephritis in children ages five to 17. That showed a label expansion for the first new drug approved to treat lupus in more than 50 years. This month, the company reported positive news from its phase 3 trial for ovarian cancer drug Zejula (niraparib). GlaxoSmithKline also gained pre-qualification status from the World Health Organization for its malaria vaccine, Mosquirix, a big step that is needed for the drug to be used by various international aid agencies.

Buying at the right time

Both pharmaceutical stocks have been hurt by what I see as over-corrections. Though AbbVie is up so far this year, its recession-resistant business should have yielded stronger share growth, were it not for Humira worries. The same holds true, only more so, for GlaxoSmithKline and its Zantac headaches. Both companies have huge portfolios and consistent revenue growth. Meanwhile, their dividends reward long-term investors until the stocks bounce back.