Artificial intelligence (AI) could be important in many sectors, but in healthcare, it might be particularly revolutionary. That's because it could lead to better drugs and medical devices -- and bring these innovations to patients faster. As a result, it might save lives.

All of this equals an enormous market opportunity. The global AI-in-healthcare market is set to grow in the double digits to top $100 billion later this decade, a Research and Markets report shows. It's no surprise that some healthcare companies are going all-in on this exciting technology. As investors, we can get in on the action, too, by investing in the right companies. Let's check out two top stocks to buy now.

1. Johnson & Johnson

Johnson & Johnson (JNJ -0.46%) isn't new to the world of AI. Back in 2021, the big pharma company already had put the focus on this technology.

In the last quarter of that year, it filed more patents -- a total of 48 -- linked to AI than any other healthcare company, according to GlobalData. And in the first quarter of this year, J&J remains among the top five companies filing AI healthcare-related patents, GlobalData figures show.

A quick example of J&J's work in AI: The company's Janssen Pharmaceuticals has been using AI from the earliest stages of drug discovery through later-stage processes such as manufacturing. The technology might help researchers select the best molecules for a potential treatment -- and it also can streamline the production of products. Today, Janssen is studying an AI technique that might predict toxicity before even starting a clinical trial, Drug Discovery & Development reported.

J&J has the resources to commit to AI. The company has grown revenue and profit into the billions of dollars over the years. And J&J says research and development investment remains its top priority. In the first quarter of this year, the pharma giant invested $3.6 billion in R&D.

All of this makes me confident that J&J could be one of the winners in the AI-in-healthcare race. So it's a great idea to buy this stock today -- especially since it trades at a very reasonable 15 times forward earnings estimates.

2. Medtronic

Medtronic (MDT 0.62%) says it sees AI as the key to personalized healthcare, and it's already delivering this through some of its medical devices. A great example is its UNID Adaptive Spine Intelligence platform. This system uses data from thousands of procedures and applies machine learning to predict outcomes for each patient -- and integrate data from each procedure back into the system. So with each procedure, the platform gets even better.

The company also is using AI in its GI Genius tool for endoscopy. It helps doctors identify precancerous tissue earlier. And thanks to a new partnership with Nvidia, third-party developers now can design and test potential AI applications that might eventually run on the GI Genius.

These technologies helped Medtronic's surgical and neuroscience revenue to climb in the most recent quarter. And like J&J, Medtronic is putting the focus on investing in R&D. The company said it aims for R&D investment growth at the same level as or higher than revenue growth.

And AI might be able to help Medtronic solve its biggest problem: slowing growth. The company already is streamlining processes, divesting certain businesses, and making acquisitions to turn things around. This, together with its focus on AI, could serve as a catalyst for better share-price performance down the road.

The shares already are gaining momentum, climbing 14% so far this year. But, trading for only 17 times earnings, Medtronic still is reasonably priced -- and a great way to get in on the AI healthcare revolution.