Outperforming the benchmark S&P 500 index over a long period is a formidable challenge. This task becomes even more daunting when choosing stocks from the healthcare sector, where the competitive landscape is constantly evolving due to patent expirations, technological breakthroughs, and political headwinds. Unicorns do indeed exist in the dynamic healthcare sector, however. The rare disease specialist Vertex Pharmaceuticals (VRTX -0.06%) and the molecular cancer diagnostic stalwart Exact Sciences (EXAS 0.10%) are two of the best examples.

Over the past 10 years, both of these cutting-edge healthcare companies have delivered significant excess returns for their shareholders, relative to the total returns of the S&P 500. That's no easy task, given that less than 3% of all stocks have consistently outperformed this bellwether index since 1926.

What's the secret to their success? Vertex has built a dominant position in the area of therapeutics for cystic fibrosis (CF), a genetically based condition with few treatment competitors, and has strong pricing power and robust demand. Exact, for its part, is a pioneer in the field of next-generation cancer diagnostics, spearheaded by its home-based colon cancer screening test, Cologuard. Thanks to their focus on innovation, each company has generated double-digit revenue growth in recent years, which has been the foundation for their market-beating performances.

A researcher working with a Petri dish in a lab.

Image source: Getty Images.

Which of these top-performing healthcare stocks is the better buy now? Let's dig deeper to find out.

The case for Vertex

Vertex is a leading developer of rare disease drugs, which are known for their strong pricing power and commercial longevity. The company has launched four major cystic fibrosis drugs through its efforts, and its newest product in this setting, Trikafta, makes up almost 90% of its total sales at the moment. Even so, this exceptionally high revenue concentration is not a particularly big risk factor for Vertex, because it has no serious rivals in this area. In addition, Wall Street analysts expect the company to maintain its dominance in this rare disease drug market for a long time.

Vertex has been wisely using its unusual competitive position to expand beyond CF. Vertex and partner CRISPR Therapeutics (CRSP 0.34%) recently landed the first regulatory approvals for a gene-edited product, and it has ongoing clinical studies in the areas of diabetes, pain, as well as a progressive type of kidney disease. To fund these trials, the biotech has been spending almost a third of its total sales on research and development in 2023. That's among the highest R&D spends as a percent of total sales in the entire industry.

Additionally, Vertex is already cash-flow-positive, despite its heavy investments in next-generation pipeline candidates. And its only major risk factor is its pipeline, which hasn't delivered a recent blockbuster outside of CF. Vertex and CRISPR aim to change this situation with their recently approved rare blood disease therapy Casgevy, but a quick ramp for this gene-edited medicine is highly unlikely for a variety of reasons.

The case for Exact

Since its commercial launch in the U.S. in 2014, Cologuard has established a new market for home-based colon cancer testing. Over this period, Exact has also acquired several advanced platforms to develop a diverse portfolio of next-generation cancer diagnostics, completed a successful trial of an improved version of Cologuard, and accumulated a large cash position of more than $734 million as of the last quarter.

Digging deeper, Exact's income statement reflects its focus on innovation and its key operating goal of creating a viable economic moat in the long run. The company invests about 16% of its annual revenue in research and development, which is modestly higher than the average among its immediate peer group. Through this hefty investment, Exact is attempting to build a portfolio capable of dominating the home-based cancer screening market for years to come, which represents a multibillion-dollar-a-year commercial opportunity.

All that being said, Exact is still far from profitable, and most analysts believe that its next major growth driver -- a multicancer early detection test -- will take several years to reach the market. Additionally, some analysts have raised concerns that competitors may soon start to cut into Cologuard's market share. That's far from a surefire outcome, given Cologuard's first-mover advantage. But this is a risk factor prospective investors should consider before buying shares.

Verdict

If you have funds to buy both stocks, that's probably the smart move. Both of these biotechs are investing heavily in future products that could dominate their markets for long periods. However, Vertex is arguably the modestly better buy in this head-to-head matchup. The company is a growth powerhouse, it already generates healthy levels of free cash flow, and its pipeline might be woefully underappreciated by this market. That's a winning combination, to put it mildly.