Many people think the smartest investors are those who generate the best returns in a given year. They might be surprised to learn that isn't the case. It turns out long-term outperformance has little to do with returns in any single 12-month period. It's about balancing risk and reward over the long term. The natural next question is, "which stocks offer that?"

That's what we wanted to know when we asked three Fool contributors to what they thought were the smartest healthcare stocks to buy right now. Here's why they picked ResMed (RMD -0.24%), Vertex Pharmaceuticals (VRTX -1.02%), and Idexx Laboratories (IDXX 0.09%).

Two people study a computer screen in an open office.

Image source: Getty Images.

Letting shareholders breathe easy

Jason Hawthorne (ResMed): ResMed is best known as the leading maker of machines that provide continuous positive airway pressure, commonly known as CPAPs. They help people with sleep apnea and chronic obstructive pulmonary disease, or COPD, breathe easier. It is No. 1 in market share and sells its devices in 140 countries. It's also one of the largest makers of ventilators -- an important weapon in the fight against COVID-19. The stock has sailed to 55% gains in the past 12 months and management is projecting strong demand for its products in the year ahead.

Although ventilator sales are waning -- the company sold less than $20 million worth in its latest quarter compared to more than $125 million in the same period last year -- its other devices are more than making up the difference. In fact, the company can't keep up with demand.

Its CPAP sales were initially negatively impacted by the COVID-19 pandemic as sleep clinics and doctor's offices were closed. That headwind has abated as things get back to normal. In the most recent quarter, total device sales were up 30% in the U.S., Canada, and Latin America. It's partly because of the reopening. But ResMed also got a big boost from a competitor's troubles.

Koninklijke Philips (PHG -0.19%) has had to recall about 3.5 million devices over concerns about the toxicity of a material used in its CPAP machines. ResMed believes that will result in between $300 million and $350 million in additional sales of its units over the next year. More importantly, it will increase its market share. That should provide recurring annual revenue from its online platform and suite of digital health solutions. It will also add to the company's 15 million cloud-connected devices. Longer term, demand for CPAP devices should continue to grow. It's estimated that more than 80% of cases in the U.S. remain undiagnosed. 

That's a lot of tailwinds at the company's back. And the stock rightly reflects a lot of that optimism, but it is likely to be one of the smartest -- and safest -- places to invest in healthcare over the long term.

A premium healthcare stock trading at a serious bargain

Rachel Warren (Vertex Pharmaceuticals): If you're looking for a top healthcare stock to buy with oodles of room to grow and a strong competitive advantage, Vertex Pharmaceuticals is a solid choice to consider. The company is the indisputable leader in the cystic fibrosis therapeutics market, and its top-selling drug Trikafta is approved by the Food and Drug Administration to treat more than 90% of individuals diagnosed with the rare disease.

Vertex has three other approved drugs on the market at present also approved to treat cystic fibrosis. The development of cystic fibrosis transmembrane conductance regulator (CFTR) modulator therapies has been a game changer in the fight against the disease because these drugs deal with the genetic components that result in someone developing CF in the first place. Not only are all of Vertex's approved medicines CFTR modulator therapies, but they are the only ones of this type of drug that as of yet have been approved by the FDA.

Vertex Pharmaceuticals is developing other vital therapies for the treatment of cystic fibrosis. One such candidate in its pipeline is a triple-combination regimen that the company announced at the end of July would soon be entering phase 3 development and which is intended to build upon Trikafta's vast success in treating a broad swath of the CF patient population. Chief medical officer Carmen Bozic said in a July press release, "With this once-daily, next-in-class, triple combination regimen, our goal is to develop a more effective treatment regimen with the potential to restore CFTR function in people with CF to even higher levels than currently achievable."

The company also has a range of other drug candidates in development that have nothing to do with CF, such as for the rare genetic disorders sickle cell disease and beta thalassemia, as well as type 1 diabetes.

In 2020, Vertex Pharmaceuticals reported that product revenue shot up nearly 50% from the prior year, and its net income grew 130%. And in the first and second quarters of 2021, the company reported respective product revenue increases of 14% and 18% from the year-ago periods.

So, you might be wondering, what's the catch? If you've been paying attention to Vertex Pharmaceuticals' share price movements in recent months, you may have noticed that the stock is trading down by nearly 17% from January and 30% from one year ago. These downward share price movements can largely be attributed to two key clinical setbacks that occurred last October and this past June, when Vertex opted to discontinue development of drug candidates for the rare disease alpha-1 antitrypsin deficiency.

However, I think it's important to remember that share price alone is never a definitive indicator of a good or bad company. As Vertex continues to beef up its clinical development programs and makes further progress with its current lineup of promising candidates both within and outside the CF treatment space, it's just as likely that broader investor sentiment could change and send shares upward again.

In the meantime, from a long-term investing standpoint, the pharmaceutical stock retains a solid competitive advantage with a small but powerful lineup of top-selling drugs that dominate its respective market space. Patient investors could see serious benefit to their portfolios by scooping up shares at a bargain now and waiting for the company to deliver on its potential.

People really love their pets

Steve Ditto (Idexx Laboratories): Hate math but love making money? Then follow Warren Buffet's advice and look for companies that deliver "compounding returns" -- those that grow and become more valuable every year. 

Over the last 10 years, Idexx has returned 1,630% compared to 351% for the S&P 500. That's a textbook example of a company delivering compounding returns. Although Idexx may not be a familiar name, the company is a leading global provider of healthcare services to veterinarians. Idexx provides the diagnostic testing equipment, supplies, and services vets need to help keep pets happy and healthy.

People are spending more than ever on their pets. Diagnostic tests, like bloodwork, are becoming a part of most pet visits. Vets are moving toward providing more diagnostic services in-house, particularly as the equipment has become smaller, faster, and more affordable. COVID-19 may have accelerated these trends, but they show no sign of slowing down.

Idexx's companion animal group, or CAG, accounts for 90% of its revenue. Idexx has customers in more than 175 countries and expects further international expansion to help fuel the company's growth. Idexx management sees the global diagnostic market growing at 9% annually.

On the Q2 earnings call, Idexx management reported good results and provided strong guidance. Revenue increased 30%, operating profit increased 30%, and earnings per share increased 33% compared to the previous year. Management raised its full-year revenue outlook by $55 million, to a range of $3.17 billion to $3.205 billion.

It looks like Idexx is set to deliver continued revenue growth. CEO Jonathan J. Mazelsky commented on the results in the earnings release, saying, "The Idexx team delivered another quarter of outstanding performance, reflected in continued high growth in CAG Diagnostics recurring revenues and accelerated gains in instrument placements, as the global animal healthcare sector sustained strong growth momentum globally."

Companies delivering compounding returns are rarely cheap and Idexx is no exception. With a price-to-earnings ratio over 80 and a price-to-sales ratio over 21, there's a lot of future growth already reflected in the stock price. But don't let that stop you from buying -- Idexx has a long-term opportunity to grow its highly profitable recurring revenue and keep delivering compounding returns for your portfolio.