Over the past several years, Masimo Corporation (MASI -1.13%) and Zimmer Biomet Holdings Inc. (ZBH -0.63%) gained leading shares in their respective markets. Outmaneuvering competitors has driven revenues to record levels in recent quarters, and in response, the market lifted both stocks to all-time highs this year.

Recent success for both is exciting, but investors are wondering which often overlooked healthcare gem is the better stock to buy right now. To answer the burning question, we'll look at opportunities and challenges facing these companies to see which stock presents a more compelling value at recent prices.

A woman struggles with a two-way decision, with question marks above her head and arrows pointing in opposite directions.

Image source: Getty Images.

The case for Masimo Corporation

Although this stock pulled back recently, long-term shareholders have seen their investment grow about 295% over the past three years. This run-up has Masimo stock looking fairly expensive by most yardsticks. Shares of the oximetry device manufacturer have been trading at about 6.5 times this year's sales estimates, and 36.8 times this year's expected earnings. 

The optimism surrounding Masimo's future is well deserved. The company's noninvasive patient-monitoring devices are more popular than ever. In the first quarter, the company shipped enough oxygen meters to boost its presence 6.1% to a whopping 1.525 million devices installed worldwide. The successful quarter inspired management to raise its full-year revenue estimate by about one percentage point to $759 million, which would be about 9.2% higher than last year.

Direct sales of oxygen meters currently account for 87% of total product revenue, but I expect original equipment manufacturing (OEM) to be an important growth driver in the years ahead. For example, the world leader in the multi-parameter patient-monitoring space, Koninklijke Philips NV, will integrate Masimo technology into its IntelliVue displays. The Dutch giant manufactures more than half of the real-time monitors found in hospitals and other inpatient settings that display heart rates, blood pressure, and other vital signs.

Multi-parameter patient monitor in a hospital.

Image source: Getty Images.

While the Philips deal should lead to a direct OEM sales bump, the exposure could prove invaluable. Real-time monitoring of oxygen levels saves lives, and once a majority of healthcare providers get used to having the data at their fingertips with devices from Philips, I expect Masimo's phone to start ringing off the hook with orders for its proprietary technology.

The case for Zimmer Biomet Holdings Inc.

This stock's performance in recent years can't hold a candle to Masimo's, but it recently reached an all-time high after the company announced David Dvorak's abrupt resignation. Dvorak served as CEO for the past 10 years, and the past two have been somewhat frustrating for the world's leading manufacturer of hip and knee implants.

It looks as if the poor execution of the Biomet merger will continue to hinder top-line growth more than two years after Zimmer completed the deal. Management recently gave investors an early peek at second-quarter results to let investors know the company probably wouldn't hit the modest target range of 2.4% to 3.4% growth over the previous-year period.

Demand for hip, knee, and other orthopedic replacements aren't the issue. According to the company, ramping up production to meet existing demand for some products is the culprit. 

Stripping away revenue from LDR Holdings, a spinal surgery specialist acquired last year, the company expects to report a 0.3% slide in second-quarter revenue at constant exchange rates. Unlike Masimo, the market isn't exactly bubbling over with excitement for Zimmer Biomet, which may be creating an opportunity to pick up shares of a company with a strong long-term outlook at a bargain-bin price. Zimmer Biomet shares may be near their peak but have been trading at just 15.5 times this year's earnings estimates. 

Artificial knee and hip replacement joints

Image source: Getty Images.

I wouldn't be surprised if earnings surge at Zimmer Biomet over the next few years. Heading into the Biomet acquisition, the company's overall profit margin hovered around 17% for years. Revaluing acquired intangible assets hammered that figure down to just 6.4% over the past year. In theory, the acquisition of Biomet should have widened profit margins through increased economies of scale, and it isn't too late to make the merger work. If the company simply returns to its previous level of profitability over the next several years, earnings would soar, carrying the stock with it. 

The better buy

While both companies operate under the radar in the healthcare space, reasons to buy each couldn't be more different. If you're looking for a relatively safe investment with a shot at market-beating returns, Zimmer Biomet might be the best pick. Aging populations and rising obesity rates should keep demand for knee and hip replacements growing steadily for many years to come, and surgeons are extremely reluctant to switch device brands.

Zimmer shareholders even get to collect a dividend while they wait for margins to return to normal. The stock offers a modest 0.7% yield at recent prices, and a comfortable 38.7% payout ratio suggests big bumps in the years ahead are entirely possible.

Masimo Corporation shareholders won't enjoy a dividend for the foreseeable future, but I think years of double-digit growth in traditional healthcare markets is entirely possible. If the company can make the jump to consumer-driven markets, though, the stock could rocket from where it stands right now.

Masimo has successfully defended its intellectual property, but the emergence of any competing oximetry monitoring technology could lead to losses. If that's a risk you're willing to take, it looks like the better stock to buy right now.