It's impossible to predict the future with precise accuracy, but we can make educated guesses about general trends. For example, equity markets will likely be up from their current levels by 2030. That's a safe bet, given historical patterns. It also offers investors the opportunity to grow their capital through the end of the decade. But just buying any old stock won't do the trick.

Let's consider two companies with what it takes to deliver excellent returns through 2030: Exact Sciences (EXAS 0.10%) and Novo Nordisk (NVO 0.84%). Both healthcare stocks could register compound annual growth rates of more than 12% through the next six years, allowing them to double before Jan. 1, 2030 hits. Here's why. 

1. Exact Sciences

Cancer is one of the leading causes of death in the U.S. Although many people have never had the disease, chances are they know someone -- a family member, friend, or neighbor -- who has. Finding better ways to fight cancer is important, and that's precisely what Exact Sciences does. The company's flagship product is called Cologuard. It is a non-invasive test for colorectal cancer that was first launched in 2014.

Since then, it has helped test millions of patients, likely preventing many severe cases of colorectal cancer and saving lives in the process. Colorectal cancer is among the deadliest in the U.S.; it currently holds the No. 2 spot. That's despite Exact Sciences' effort in marketing Cologuard. As the company highlights, tens of millions of eligible Americans -- those above 45 with an average risk of contracting the disease -- remain unscreened.

Exact Sciences' diagnostic tests expand beyond Cologuard. For instance, it developed Oncotype DX to help identify the probability of recurrence among breast cancer patients. Financial results have been solid for Exact Sciences, especially on the top line. In the second quarter, revenue of $622 million grew by 19% year over year. In fact, Exact Sciences' top line has been on an upward trend for a while.

EXAS Revenue (Quarterly) Chart

EXAS Revenue (Quarterly) data by YCharts

The company still has plenty of growth fuel left in the colorectal cancer market alone, with 60 million people who aren't up to date with the recommended screening schedule, not to mention its other diagnostic tests. Exact Sciences has improved on the bottom line, though it remains unprofitable. In the second quarter, it reported a net loss per share of $0.45, more than twice what it reported in the prior-year quarter.

Exact Sciences is working on a second-generation version of Cologuard which, in addition to decreasing the test's false positive rate by 30%, will reduce the cost per test by 5% compared to the current version, according to management. This will translate to a higher bottom line for Exact Sciences.

EXAS Gross Profit Margin Chart

EXAS Gross Profit Margin data by YCharts

It is also seeking to reduce costs by optimizing its laboratories, and it expects $200 million in cumulative cost savings on that front by 2030. Exact Sciences' gross margin is generally around or above 70%, which is excellent.

Given the company's long runway for growth and cost-cutting initiatives, it could have what it takes to double investors' money by 2030. 

2. Novo Nordisk 

Novo Nordisk is a leader in diabetes care, with a portfolio of medicines in this area that is second to none. It held a 32.7% share of the diabetes care market as of May, an improvement of 1.7% year over year. Novo Nordisk's lineup features diabetes and obesity medicines such as Rybelsus, Wegovy, Saxenda, and Ozempic -- which are currently the biggest drivers behind the company's impressive revenue growth. In the first half of the year, Novo Nordisk's top line jumped 29% year over year to 107.7 billion Danish kroner ($15.8 billion).

Revenue growth rates of that level are somewhat unusual for pharmaceutical giants of this size. Novo Nordisk's net profit jumped by nearly 43% year over year to 39.2 billion DKK ($5.8 billion). The good news is that Novo Nordisk's core products, especially Wegovy, Ozempic, and Rybelsus, won't run into patent cliffs in most countries (other than China) by the end of the decade. Saxenda's patents are expiring soon, but Novo Nordisk's vast pipeline should produce newer medicines to replace it.

The company is currently working on a highly promising once-weekly diabetes medicine that could completely reverse the downward trend its current insulin portfolio has been in. Patients typically take insulin daily, so a weekly option would be more convenient for those eligible. Novo Nordisk has many more pipeline candidates in obesity and other fields that should yield new products before 2030.

And by then, the company's innovative capabilities and solid revenue and earnings growth could translate into excellent returns for investors who buy its shares today.