If you want to build a winning portfolio, the key ingredient is generally this one: quality companies that deliver steady share price gains over time. But, every once in a while, one particular stock that doubles, triples, or more can offer your portfolio a big boost.

How to find that player before it takes off? Well, it's tricky. Often, we can look to companies whose shares have suffered in recent times -- but only if these particular players have a clear reason to gain now or in the future. (Just because a stock fell doesn't mean it eventually will rebound.)

Today, I'm taking a look at two healthcare companies that merit a rebound: Doximity (DOCS 0.97%) and Walgreens Boots Alliance (WBA 0.57%) But can they climb by five, and if so, which one will do it first? Let's find out.

The case for Doximity

Doximity shares have disappointed -- in spite of solid growth from the company. First, a bit about Doximity. The company is a networking platform for doctors, but actually a lot more. Doximity is sort of an extension of a medical practice. Doctors can share patient files with peers, read about the latest research in their specialty and conduct telemedicine appointments from their phones.

How much does this cost? Well, for the doctors it's free. Today, more than 80% of them use Doximity. And in the most recent quarter, Doximity reached a record number of active users. So here's how the company generates revenue: through contracts with pharmaceutical companies and healthcare systems that aim to advertise to doctors. In fact, the top 20 hospitals and the top 20 pharmaceutical companies all are clients.

As mentioned above, Doximity's earnings have climbed. And the company is profitable. Revenue and adjusted EBITDA advanced in the double digits in the most recent quarter. And adjusted EBITDA margins widened to 44% from 42%.

Meanwhile, Doximity stock has dropped 38% since its initial public offering back in 2021. Long-term investors haven't yet benefited from owning the stock. But that doesn't mean things won't turn around. The company has continued to deliver growth. And considering its popularity among doctors and its list of pharma and healthcare clients, future prospects look bright.

The case for Walgreens

Like Doximity, Walgreens shares haven't delivered over the past few years. They've lost 50% over five years, and for good reason. Over that time period, net income has dropped, and revenue has stagnated. The most recent quarter continued to show sluggishness. Earnings per share fell 20%, and revenue rose about 3%.

And U.S. retail pharmacy, Walgreens biggest business, didn't offer much reason to be optimistic either. Here, sales slipped 0.3%. Litigation linked to the prescriptions of opioids also has weighed on earnings in recent times.

But there is a reason to be more optimistic about Walgreens these days. The company is aiming to grow in the $1 trillion primary care market. Walgreens back in 2021 made an investment of more than $5 billion in VillageMD.

The idea is to open up primary care locations across the U.S. -- especially in underserved locations. Walgreens could win here for one big reason. Location. More than 75% of Americans live just a few miles from a Walgreens. So opening up primary care in these locations could be successful. In the most recent quarter, VillageMD -- including its recent acquisition of a rival -- grew pro forma sales 30%.

So, right now, Walgreens has a growth problem. But its investment in primary care may help the company solve this problem -- and win over the long term.

Gains times 5?

Now let's consider the idea of increasing by five. I'll start with Walgreens. Today, the stock trades for only 7 times forward earnings estimates. That's cheap -- if Walgreens is able to deliver growth through its investment in primary care. It will take time for this to happen, so investors will have to be patient.

I think it's unlikely that Walgreens will multiply by five though. It's biggest business, U.S. retail, hasn't proven to be a major growth driver in recent years. And I don't see that turning around. So potential gains may be limited.

Doximity has a better chance of increasing by five -- but it probably won't happen in the near term. The company's earnings per share in the last fiscal year came in at 58 cents. Analysts estimate that could increase to 82 cents in the current fiscal year. That's a 41% gain -- which is positive, but not enough to merit a fivefold stock price gain.

Still, Doximity does have a solid growth track record. And if that continues, it eventually may deliver a fivefold increase to long-term investors.