It's no secret that with today's aging Baby Boomer population, the future looks bright for investors in the healthcare industry. But not every healthcare company is created equal. Today's two competing stocks -- Intuitive Surgical (ISRG 2.19%) and Accuray (ARAY 2.30%) -- are a textbook example.

Intuitive Surgical gained its fame via its da Vinci robotic surgical system. The system has been widely adapted for gynecological and prostate operations worldwide. Accuray, on the other hand, has also developed a robotic surgical system, though it focuses on treating cancer patients. So, which company is the better buy today?

Three doctors performing surgery.

Image source: Getty Images

Sustainable competitive advantages

Here's one tip I wish I would have known eight years ago when I started investing: Spend 75% of your time and effort researching a company's sustainable competitive advantages. Often referred to as a "moat" in investing circles, this variable has been the biggest factor driving my personal investing returns.

In its simplest form, a moat is the "something special" that keeps customers coming back, year after year, and decade after decade. A moat can take many different forms. For Intuitive Surgical, there's an enormous installed base of almost 4,000 da Vinci  machines worldwide. Hospitals that pay over $1 million per machine aren't going to let them sit idle.

Additionally, the millions of hours that doctors have logged using da Vinci -- and the hundreds of experiments they have performed by using the machine for different procedures -- cannot be overlooked. It would take a competitor a long time to match the moat that Intuitive has built around its business.

Accuray, on the other hand, is known best for its CyberKnife system for delivering radiosurgery treatments to cancer patients. While the company's growing backlog appears to show that there's demand for what the company is offering, the company has nowhere near the same mind-share, installed base, or doctor hours to match Intuitive Surgical.

Winner = Intuitive Surgical

Financial Fortitude

Having cash sitting in the bank might sound boring, but it is extremely important. That's because every company -- at one point or another -- will face difficult economic times. Companies that survive the most extreme of recessions are the ones with cash on hand.

Companies that have cash in such circumstances can outspend rivals to capture market share, buy back shares on the cheap, or even make strategic acquisitions. Companies that are debt-heavy are in the opposite boat, and often can't survive such trying times.

Here's how Intuitive and Accuray stack up in terms of financial fortitude.

Company

Cash

Debt

Net Income

Free Cash Flow

Intuitive Surgical 

$4.8 billion

$0

$736 million

$989 million

Accuray 

$108 million

$167 million

($26 million)

($5 million)

Data source: Yahoo! Finance, SEC filings. Cash includes cash, short, and long-term investments.

It's pretty easy to see the winner here. With absolutely no long-term debt, and prodigious free cash flow, Intuitive is in much better shape financially. Even after the company spends $2 billion to immediately buy back shares this month, it will be in excellent shape.

Winner = Intuitive Surgical

Valuation

Finally, there is valuation. While this isn't an exact science, there are some straightforward metrics we can consult to give us an idea of how expensive each stock is.

Company

P/E 

P/FCF

PEG Ratio 

Intuitive Surgical

37

27

2.5

Accuray

N/A

N/A

0.1

Data source: Yahoo! Finance, E*Trade. P/E represents figures from non-GAAP earnings.

This is a much more difficult thing to measure, particularly because Accuray hasn't been profitable or pulling in free cash flow. The company recently introduced its Radixact product, which could spur further growth. And as I already mentioned, demand seems healthy.

As a shareholder of Intuitive Surgical, I will admit that the company looks expensive. Combining those two factors leads to call this one a tie.

Winner = Tie

The winner is... Intuitive Surgical

While Accuray might be a better valuation deal right now, Intuitive Surgical has a wider moat and a much healthier balance sheet, making it the better buy. That helps explain why Intuitive makes up 3% of my real-life holdings. I think investors could do themselves a favor by researching the company and -- if it meets their investing style -- buying a small starter position for the long term.