To earn solid gains on the stock market, it is best to approach the exercise as a marathon instead of a sprint. Sure, investors can sometimes see shares of the companies they own skyrocket in a short period like six months. But more often than not, banking on short-term gains is an impossible strategy to pull off consistently.

On the other hand -- over let's say a decade -- great stocks tend to deliver outsized returns almost without fail. With that as a backdrop, let's look at two companies whose shares are worth holding onto through the next decade and beyond: Intuitive Surgical (ISRG 0.59%) and Teladoc Health (TDOC -2.40%). Let's dig in.

1. Intuitive Surgical

Intuitive Surgical is at the top of an industry that looks destined to continue growing. Thanks to its da Vinci system, the company is the robotic-assisted surgery (RAS) market leader, helping physicians perform minimally invasive surgeries that improve patient outcomes. How so? Instead of cutting open patients to access internal organs that need to be operated on, minimally invasive surgeries rely on small incisions and tiny, highly versatile instruments to get the job done.

Intuitive Surgical makes money by selling its expensive da Vinci devices -- they typically cost between $500,000 and $2.5 million -- and by selling accompanying instruments and accessories, the amount of which is tied to procedure volume. So the company's revenue will grow as robotic surgeries continue to gain traction. That's why other companies are looking to eat Intuitive Surgical's lunch.

Most notably, Medtronic and Johnson & Johnson, two of the most prominent healthcare players in the world, are joining the promising RAS market with their respective devices. But investors shouldn't worry too much about Intuitive Surgical as it boasts a strong most from multiple sources. For one, the price of the da Vinci system makes it hard for healthcare facilities to switch to a competitor, granting the company high switching costs.

ISRG Revenue (Quarterly) Chart

ISRG Revenue (Quarterly) data by YCharts.

This factor is compounded by the fact that training physicians to use the machine takes time and money. Also, the company's innovations are protected by patents, of which it owns more than 4,300 active and over 2,100 pending as of the end of 2022. Intuitive Surgical should succeed in growing its revenue and earnings at a good clip throughout the next decade, just as it has in the past.

All of this should help the company deliver excellent returns along the way.

2. Teladoc

Telemedicine rose in popularity amid the pandemic, but it isn't just a fad that will subside soon. The technology is almost certainly here to stay as it provides convenience and cost savings for patients by allowing them to get medical care from the comfort of their homes. Teladoc is one of the leading telehealth platforms. The company has made tremendous progress on nearly all fronts over the past three years; revenue has grown tremendously.

TDOC Revenue (Quarterly) Chart

TDOC Revenue (Quarterly) data by YCharts.

Teladoc's visits and memberships have also been trending up. For instance, it ended 2019 with 36.7 million U.S. paid memberships. It had 84.9 million of them as of the first quarter, and that's not including its BetterHelp therapy platform, which has gained incredible traction in the past couple of years.

However, one part of Teladoc's results that has worried investors is the bottom line. Last year, it reported massive net losses due to non-cash impairment charges linked to an acquisition. But Teladoc seems to have put that behind it. The company expects a full-year net loss per share between $1.70 and $1.25. Last year, it was $84.60, and two years ago, it was $2.73. That means Teladoc's bottom line should improve this year compared to its 2021 levels.

Even so, the company's share price is stuck well below its pre-pandemic (late 2019) levels. On the other hand, Teladoc shares looks reasonably valued by at least one somewhat popular metric: its price-to-sales ratio. Any number below 2 is generally considered good.

Teladoc also boasts high gross margins, but its marketing expenses are too high. This isn't surprising considering the stage Teladoc is at, but once it is a better-established corporation, its marketing expenses should drop, allowing it to become highly profitable.

TDOC PS Ratio (Forward) Chart

TDOC PS Ratio (Forward) data by YCharts. PS = price-to-sales.

In my view, Teladoc boasts tremendous upside at current levels. The company should make steady progress in telemedicine in the next 10 years, growing its revenue and turning a profit well before the end of this period. Patient investors will benefit from that over the long run.