It's nearly impossible to come up with a "best stock to invest in" list that everyone will agree on. That's partly because the stock market brings together people with different goals, investing styles, and income levels. However, beating the market is a pretty good goal.

Let's look at two stocks worth investing $5,000 in right now for investors who want to score market-beating returns in the long run: AbbVie (ABBV -1.03%) and Intuitive Surgical (ISRG -0.55%)

ABBV Chart

ABBV data by YCharts

1. AbbVie

Shares of AbbVie have easily outperformed the market this year, but the company remains reasonably valued. The drugmaker's forward price-to-earnings (P/E) ratio currently stands at 10.9, which compares favorably to the average of 13.5 for the pharmaceutical industry. At these levels, AbbVie is an outstanding stock to buy considering the strength of its underlying business. The company boasts a lineup of blockbuster medicines, including immunology drugs Humira, Rinvoq, and Skyrizi, and cancer treatments Venclexta and Imbruvica.

True, sales of Humira are still dropping abroad due to biosimilar competition, and generics for this medicine will likely enter the U.S. market next year. But even so, Humira will continue to contribute to AbbVie's top line for at least a couple of years, and the company's other immunology drugs, Rinvoq and Skyrizi, will pick up the slack. Other products in AbbVie's arsenal include its Botox franchise.

All of these can help drive top-line growth for AbbVie even after Humira loses patent protection in the U.S. That's not to mention the dozens of ongoing clinical trials AbbVie is running, at least some of which should lead to brand-new approvals or label expansions.

The company's revenue increased by 4.1% year over year in the first quarter to $13.5 billion. And adjusted net earnings for the quarter increased by 9.3% year over year to $3.16 per share. 

One more reason to consider investing in AbbVie's stock is the dividend. AbbVie is part of the exclusive group of Dividend Kings -- having raised its payouts for 50 years when including its time under the wing of medical devices giant Abbott Laboratories. AbbVie's current dividend yield of 4.08% is nearly three times as high as the average S&P 500's yield of 1.37%.

There are likely many more years of dividend increases ahead for this drugmaker and its shareholders. While it's hard to know how the rest of the year will unfold -- AbbVie's shares could drop for various reasons -- those playing the long game don't have to worry too much about the next six months.

AbbVie is a solid pharma stock to buy and hold for a while. 

2. Intuitive Surgical

Intuitive Surgical hasn't performed nearly as well as AbbVie this year. Shares of the medical devices company have been southbound for the better part of the past six months. The marketwide issues, including economic and geopolitical tensions, are likely weighing on the company.

Intuitive's rich valuation metrics aren't helping either. Even after the recent slump, its forward P/E is 42.3. That's much higher than the healthcare sector's average of 15.9. Even so, Intuitive Surgical is now about as cheap as it has been in the past three years.

ISRG PE Ratio (Forward) Chart

ISRG PE Ratio (Forward) data by YCharts

That's good news for patient investors since the company will likely justify its valuation in the long run. Intuitive Surgical remains a leader in the robotic-assisted surgery (RAS) market thanks to its Da Vinci surgical system. The company held an impressive 80% share of this space in 2020. But traditional open surgeries remain more popular than the minimally invasive procedures that RAS devices allow physicians to perform.

That means there is still a massive runway of growth for Intuitive Surgical, especially considering minimally invasive surgeries come with such perks as less bleeding, fewer incisions, and faster recovery times for patients. The bears might point to the mounting competition in the RAS field from such companies as Medtronic, Johnson & Johnson, and Stryker.

Although Intuitive Surgical's peers will almost certainly make headway in the industry in the coming years, in my view there is more than enough room for these companies to coexist. That's especially true given certain demographic trends, such as the world's aging population. According to the World Health Organization, people 60 and older will make up 22% of the world's population by 2050, compared to just 12% in 2015.

This will increase the need for various medical services since seniors tend to consume these services at a higher rate than the rest of the population. Intuitive Surgical is a great stock to buy to ride this long-term trend.