The healthcare sector hasn't exactly ignited investor enthusiasm lately. Stocks in the sector returned 13.3% on average in 2020, which isn't a bad result. But they underperformed the overall market as represented by the S&P 500 Index, which returned 18.4% last year.

Looking at averages doesn't tell the whole story, though. The healthcare sector in particular is incredibly diverse, from small companies on the cutting edge of science to giant "defensive" stocks that tend to outperform the market during downturns.

Following are three stocks I think will outperform the market over the long term. Two are early-stage companies with that are growing rapidly, and one is more established but is available at a bargain price. I own shares of the latter and I intend to buy the other stocks when Motley Fool disclosure rules allow me to do so.

Woman in lab coat holding stethoscope to a piggy bank.

Image source: Getty Images.

1. Progyny

Infertility is on the rise, partly because young couples are waiting longer to start families and partly because of factors that scientists don't completely understand. Despite a growing need, access to fertility treatment in the U.S. is limited because of high costs and lack of coverage by insurers. This is where Progyny (PGNY -0.12%) comes in, and its revenues are soaring.

Progyny is a benefits management company that specializes in fertility. Employers are finding that fertility benefits are important for "best places to work" recognition, especially in industries trying to attract young professionals. Employers such as Alphabet's Google, Amazon, Microsoft, and Under Armour turn to Progyny, which provides superior fertility service to conventional health insurance carriers.

Progyny says that conventional coverage is focused on controlling utilization and costs while Progyny is focused on outcomes and the patient experience. By utilizing the latest medical advances, delivering concierge-style member support during a process that can be emotionally wrenching, and tracking data in the most comprehensive fertility database in the industry, the company achieves above average success rates with fewer rounds of treatment and fewer high-risk pregnancies. The result is actually lower costs than conventional plans and higher member satisfaction.

It's working. In the latest quarter, revenue popped 62% from the previous year and the company swung from a loss of $1.10 per share to a profit of $0.05. The company has 130 clients representing 2.3 million covered lives, up 55% and 64% from a year ago, respectively. Client retention has been near 100% since 2016.

The company in the early days of a huge growth opportunity, with 8,000 self-insured companies and 69 million lives in its target market. Analysts expect Progyny revenue to jump 57% to $528 million in 2021 and shares sell for 8 times that estimate. That's a very reasonable price for a company growing this fast and just becoming profitable.

2. Invitae

The COVID-19 pandemic brought attention to clinical testing, but some of the best long-term growth stocks in this industry are in companies focused on genetic testing. Invitae (NVTA -27.78%) aims to bring genetic testing into the mainstream of medical care, making genetic and other molecular information the "new vital signs of personalized medicine."

The vision of genetic tests as routine as cholesterol tests is still years away from realization, but the trend toward personalized medicine is producing some large markets that Invitae is accessing today. Cancer treatment decisions are increasingly reliant on genetic analysis of solid tumors. Non-invasive prenatal testing, identification of rare inherited diseases, and identification of genetic cancer risks are becoming more common and helping fuel the company's rapid growth. Liquid biopsies, blood tests to detect cancer before it can be found by other means, may be on the near horizon.

The pandemic caused a dip in Invitae's test volume in the spring of 2020, but the business has been bouncing back in the second half. In the third quarter, revenue grew 22% year-over-year on a 27% increase in billable sample volume. The company recently released preliminary results for the fourth quarter, saying that revenues jumped 49% from the period a year earlier.

Looking ahead, Invitae says it expects 50% to 60% annual revenue growth over the next few years and analysts expect sales growth of 76% in 2021. Shares aren't cheap at 20 times revenue estimates for 2021 and with the company nowhere near profitability yet. But with this sort of growth and opportunity, I think risk-tolerant who are willing to hold the stock for the long term will be rewarded.

3. Vertex Pharmaceuticals

More conservative investors who want a healthcare stock with double-digit growth and established profitability won't find many opportunities better than Vertex Pharmaceuticals (VRTX -0.02%). The company has a dominant position in drugs to treat cystic fibrosis (CF) and drug candidates in its pipeline that could open new markets for the company in future years.

In the near term, growth will be coming from Vertex's CF franchise. Growth is coming from Vertex's latest generation drug, Trikafta, and from growth in the number of patients that can be treated. The company is winning approvals to treat patients with additional mutations that were previously unaddressed and to expand treatments to younger patients. The company says that out of 83,000 patients living with CF in the U.S., Europe, Canada, and Australia, there are 30,000 patients who could benefit from its medicines who are not treated today. The company projects 10% revenue growth in 2021, but analysts think the number could be closer to 12%.

Vertex has a closely watched candidate it its pipeline, CTX001, which is a gene therapy partnered with CRISPR Therapeutics, aimed at curing genetic disease sickle cell disease and beta thalassemia. The companies released encouraging clinical data about the treatment late last year. The pipeline also has candidates aimed at expanding CF treatments, a rare kidney disease, pain, and cancer.

Investors have cooled on the stock, which now is a bargain with a forward multiple of earnings below the 22 times multiple on the S&P 500.

Chart of Vertex forward P/E since January 2020.

Vertex forward price/earnings ratio. Data from YCharts.

The reason may be that profits from Vertex's non-CF pipeline are still far in the future. CTX001 is the nearest opportunity but it's not a sure thing, and commercialization won't be until 2022 or maybe later. The rest of the non-CF drug candidates are years away from contributing to the bottom line.

But the market is overlooking the positives of the CF franchise. Not only is the business producing double-digit growth, but it's generating piles of cash that the company intends to invest in research and development and in business deals to bolster its pipeline. The company ended 2020 with $6.7 billion in cash, up from $3.8 billion a year earlier, and no debt.

As Vertex puts its cash to work, the value of its business will grow. In the meantime, investors in the company's shares are buying profitable current growth at a very reasonable price.