Johnson & Johnson (JNJ -0.47%) is one of the top healthcare companies in the world. But the company's legal problems, particularly with its talc products, weighed down its financials over the past year or two and led to some volatility with the stock. The stock price is down about 9% over the past year.

Given the long-term potential of the business and its strong fundamentals, could investors be discounting the stock too much?

Legal overhang continues to impact the business

Johnson & Johnson's business is generally stable in that the company's core business centers around pharmaceuticals and medical devices (its consumer health business will be spun off later this year). Those are areas that should provide stable, long-term growth. Late last year, the company completed a $16.6 billion acquisition of heart pump maker Abiomed that it said would help accelerate its MedTech business.

And even though the company anticipates losses in exclusivity from some prescription medications, including Stelara, Johnson & Johnson projects growth in its pharma business, with sales hitting $60 billion by 2025 due to its strong pipeline. Last year pharmaceutical sales totaled $52.6 billion.

The big cloud over the company today relates to its talcum powder lawsuits. In January an appeals court dismissed the company's attempt to resolve tens of thousands of lawsuits by putting a subsidiary into bankruptcy protection. Since then, Johnson & Johnson made a second attempt to address the lawsuits, this time by allocating more money to settle the claims -- $12 billion spread over 25 years, versus just a $2 billion fund.

As a result of the payout increase, the company needed to allocate an additional $6.9 billion in litigation expenses to its balance sheet (instead of the $2 billion it set aside). The new total, $8.9 billion, is the present value of the total proposed settlement (since it is spread over a 25-year period). And that $6.9 billion charge the company incurred this past period was why Johnson & Johnson's first-quarter earnings (for the first three months of 2023) showed a net loss of $68 million. On an adjusted basis, the company has actually raised its guidance for the full year and now expects adjusted earnings per share to come in between $10.60 and $10.70. Previously it was forecasting a range between $10.45 and $10.65.

Is the valuation too low?

If not for the $6.9 billion charge, Johnson & Johnson would easily have a profit. Because that's not the case, the stock looks expensive, trading at over 33 times its trailing earnings. When looking at a forward earnings multiple, which is based on analyst expectations, Johnson & Johnson is trading at 15 times its future profits. That's well below the healthcare average of 18.

For a business of Johnson & Johnson's size and the long-term stability it offers investors, it arguably should trade at a premium rather than a discount to the average. The legal risk is why investors are hesitant on the stock. But with Johnson & Johnson saying the "vast majority of claimants" support its latest proposal to settle talc claims, there's reason to be optimistic that the business is near a resolution that can finally address the risk once and for all. And even if has to bump up the settlement by a few billion dollars more, that wouldn't drastically change the outlook for the company in the long run.

Is Johnson & Johnson stock a buy?

While Johnson & Johnson stock no longer trades near its 52-week low, the stock still looks cheap, and it also pays an attractive dividend yield of 2.9%. For income investors, this could be a good stock to buy and hold. Although Johnson & Johnson has faced adversity and legal challenges in the past, the company's strong financials put it in excellent shape to be able to handle them -- so the risk isn't as significant as it might otherwise be for a less diversified and established healthcare business.