Investing in healthcare is one of the safer long-term strategies you can deploy. Although it's an evolving industry, broadly speaking, demand for healthcare services and products is only likely to rise as the population grows, and in particular as the number of elderly Americans surges.

The COVID-19 pandemic has thrown an added spotlight on the sector, with many companies experiencing major growth. For others, though, the coronavirus has been more of a headwind.

Today, we'll compare a pair of healthcare companies that focus on different niches within the industry: Teladoc Health (TDOC 0.26%), the leader in telemedicine, and CVS Health (CVS -0.20%), which operates the largest U.S. pharmacy chain and also owns health insurance giant Aetna. Let's see which of these two stocks is the better buy right now. 

Does Teladoc's upcoming merger make it a no-brainer investment?

New York-based Teladoc has made a name for itself this year as a top virtual healthcare company. In the second quarter, it facilitated 2.8 million virtual visits -- more than triple the 908,000 visits it reported in the same period last year. The company's business model is flexible, as people with or without insurance can access its services. However, paid memberships make up the bulk of the company's sales: The $319.2 million it reported in subscription access fee revenues in the first two quarters of 2020 accounted for more than three-quarters of its top line.

Doctor reviewing test results with a patient.

Image source: Getty Images.

Total revenue from visits was $102.6 million, and of that, $32.1 million came from visit-fee-only revenue from people who don't subscribe to its service. Teladoc offers people without insurance the option to pay as little as $75 for its Everyday Care. During the first two quarters of 2020, it provided 533,000 visit-fee-only visits -- up 358% year over year. In total, Teladoc reported 4.8 million visits over the six-month period, which was up 144% year over year.

Teladoc already has a strong business on its own, and its $18.5 billion merger with Livongo, which is set to close later this year, only makes the company an even more attractive investment option. Livongo focuses on helping patients manage chronic conditions, particularly diabetes. Its cloud-connected glucose meters help people with diabetes stay on top of their blood sugar readings, and can communicate their information to family members and doctors. The company also provides real-time feedback and coaching in response to readings that are out of the target range.

Once they combine, expect Teladoc and Livongo to further expand their joint reach, as their services look to dovetail nicely.

Through the first six months of 2020, Teladoc has generated $421.8 million in revenue while Livongo has brought in $160.8 million. Although neither is profitable yet, there's significant potential ahead for these two businesses.

Is CVS a safer investment?

The argument against a Teladoc-Livongo investment would be that there's still a lot of uncertainty surrounding just how popular telehealth and virtual health services will prove to be, especially if and when COVID-19 is brought largely under control and life goes back to something resembling normal.

From that point of view, CVS stock may provide investors a bit more stability. The pharmacy chain offers more than just in-store and online shopping. With its 2018 acquisition of Aetna, it now provides medical coverage, and it is adding to the services available in its stores to provide customers with a broader healthcare experience.

The Rhode Island-based company is in the midst of opening HealthHubs in 1,500 of its locations, where customers will be able to meet with dietitians and other healthcare professionals who can help them manage chronic conditions such as high cholesterol and sleep apnea. The company says it's on track to complete that rollout by the end of next year, despite the pandemic.

But CVS is also evolving digitally. While customers can use its website to book in-person visits with medical professionals, they can also schedule telehealth visits. That service is available year-round, 24 hours a day, at a cost of $59 per visit. The company also says that it "accepts insurance from limited providers."

The one area where CVS is somewhat lacking is in its top-line growth. For the second quarter, its sales rose just 3% year over year to $65.3 billion. Its profit, though, rose 54% from the prior-year period to $3 billion -- largely because its benefits costs declined as hospitals and outpatient facilities deferred elective medical procedures during the period due to the pandemic.

Why CVS is the more attractive buy today

One of the reasons CVS is an attractive buy is that it looks undervalued. Meanwhile, Teladoc, which has trounced the S&P 500 thus far this year, may have gotten a bit too expensive.

CVS Chart

CVS data by YCharts

CVS also looks like a dirt-cheap bargain next to Teladoc in terms of their price-to-sales ratios:

CVS PS Ratio Chart

CVS PS Ratio data by YCharts

Teladoc is dominating the telehealth niche right now, and that's unlikely to change anytime soon. But CVS is offering some similar services, and as more competitors enter the field, Teladoc may struggle to keep generating the rapid growth it has been producing.

CVS is more diversified, it's cheaper, and unlike Teladoc, it pays a dividend. At current prices, that payout yields 3.5% -- better than the average S&P 500 dividend stock, which pays about 2% per year.

While Teladoc isn't a bad investment, CVS ticks off more boxes for value and dividend-oriented investors. That's why it's the better overall buy today.