Johnson & Johnson (JNJ -0.69%) is one of the biggest names in healthcare. It's known for brands such as Tylenol, Benylin, and Aveeno. It has made a wide range of drugs in multiple therapeutic areas, including oncology, immunology, infectious diseases, neuroscience, and others. It also makes medical devices, including orthopedics. 

This diversification has given the business some resiliency to the market's recent turmoil. J&J's shares have fallen a modest 3% year to date, outperforming the S&P 500, which is down by 23%. It's been a safe stock to own over the years, but does the healthcare company offer enough value to make for a good investment today?

Johnson & Johnson's financials have been solid

A big reason why Johnson & Johnson has been a solid buy is because of its strong financials. In the trailing 12 months, the company netted a profit of $18.4 billion on revenue of $95.6 billion, for a profit margin of 19%. During that time frame, it also generated free cash flow of just under $20 billion.

In its latest earnings report for the second quarter (ended July 3), its sales showed resiliency, with revenue rising 3% year over year to $24 billion. Although that was modest growth, it was despite headwinds in the economy (e.g. inflation, supply chain issues) that have caused problems for many businesses.

Looking ahead, results should improve further as Johnson & Johnson spins off its consumer-health segment, a slow-growing part of its business.

The spin-off is a good move for the company

Next year, Johnson & Johnson plans to spin off its consumer-health business into a separate entity. This creates an opportunity for the company to focus more on its faster-growing segments, medical devices and pharmaceuticals.

Last year, consumer-health sales totaled $14.6 billion, up 4.1% from the previous year. By comparison, medical-device sales of $27.1 billion grew 17.9% and pharmaceutical revenue totaling $52.1 billion increased by 14.3%.

By shedding its consumer-health business, the company can focus more on areas of its operations that have greater potential growth opportunities and are less of a headache for the company. J&J is facing tens of thousands of lawsuits related to its talc baby powder products, which are in its consumer-health segment.

How does J&J's valuation compare to its peers?

Investors are currently paying 24 times earnings for shares of Johnson & Johnson. Here's how that compares to some other top healthcare stocks:

JNJ PE Ratio Chart

JNJ PE Ratio data by YCharts.

It isn't trading at a dirt cheap price, but also isn't at an egregious premium over other stocks, given the long-term stability that it offers. The average stock in the Health Care Select Sector SPDR Fund trades at a price-to-earnings multiple of just under 20. Johnson & Johnson, one of the top names in healthcare, would warrant a higher multiple than an average stock, so its valuation doesn't appear to be too high right now.

Should you buy the stock today?

The main reasons you would want to buy J&J's stock are for its stability and dividend, which currently yields 2.7% -- better than the S&P 500 average of 1.8%. The stock is also a Dividend King, having raised its payout for 60 consecutive years, so long-term investors can expect to earn more dividend income over the years. It's not a guarantee, but as long as the business remains as profitable as it is today, it's a safe bet that the dividend will continue rising.

If you're a growth investor, however, you may want to consider looking elsewhere, as Johnson & Johnson hasn't been a great investment, underperforming the markets over the past five years. Moving away from consumer health and focusing on better-performing segments could improve the company's growth prospects, but the success of that transition won't be evident until at least next year. For now, growth-oriented investors should pass on the stock.