Regeneron Pharmaceuticals (REGN 0.79%) has been a reliable, steadily growing stock over the years, with the top line and profits increasing. The company is coming off a fantastic 2021 as its COVID-19 treatment helped sales reach a record $16 billion -- nearly double the prior year's tally. Below, I'll look at just how well the stock has performed over the past five years and whether Regeneron is a good buy moving forward.

Five years ago, the stock was trading at less than $500

In early August 2017, shares of Regeneron were trading at around $470 per share. Investing $10,000 into the stock back then would have allowed you to buy approximately 21.28 shares in the business. Today, those shares would be worth over $12,400 as the stock has risen a relatively modest 24% during that time. That averages out to a compound annual growth rate of 4.4%.

Those are decent, modest gains but hardly what growth investors would be seeking. Over that five-year stretch, the S&P 500 has far outperformed Regeneron, rising 66% in value.

Why hasn't the stock performed better?

If you held shares of Regeneron until about mid-2020, your gains would have been on par with that of the S&P 500. However, over the past couple of years, the healthcare stock has underperformed the market.

And the company's reliance on its COVID-19 treatment to generate revenue last year is likely a big reason. Of the $12.1 billion in product sales Regeneron reported in 2021, $5.8 billion came from REGEN-COV, its monoclonal antibody therapy for COVID-19. That's also roughly how much its top-selling eye medication, Eylea, brought in. REGEN-COV is not a factor moving forward as the Food and Drug Administration restricted its use, noting that it's ineffective against the omicron variant. And that has led to a significant drop in the company's revenue.

Even though vaccines and treatments are still necessary, investors have been overly punitive of COVID stocks this year. There's no better proof than vaccine maker Moderna, whose shares are down more than 17% year to date. Even Pfizer, which also makes a COVID-19 vaccine but has a more robust and diversified business, has seen its shares fall by 12%. By comparison, Regeneron's 1% decline looks impressive -- it's also the only one of the three to outperform the S&P 500 this year.

Why Regeneron could do better here on out

Regeneron has been a relatively stable stock to own this year. But there are a few reasons I think it could be a bit of an underdog and outperform in the long term. The first is its high gross margin, which has remained incredibly strong and resilient in recent years.

REGN Gross Profit Margin (Quarterly) Chart

REGN Gross Profit Margin (Quarterly) data by YCharts.

High gross margins can make it easy for the company's bottom line to grow alongside revenue. Plus, it puts Regeneron in a great position to absorb the impact of inflation and ensure its profits remain strong this year.

Secondly, the stock isn't a terribly expensive buy -- it trades at a modest 13 times forward profits vs. a multiple of 18 for the S&P 500. The relatively low valuation can make it an attractive option for bargain hunters looking for growth stocks to load up on.

Lastly, Regeneron has a dozen phase 3 trials and even more in earlier stages that could lead to additional growth for the business. Its pipeline is also diverse, covers multiple therapeutic areas (e.g., oncology, immunology & inflammation, rare diseases), and was strengthened by the $250 million acquisition of Checkmate Pharmaceuticals this year, adding cancer drug vidutolimod to its portfolio in the process.

Some solid reasons for optimism

Although investors may be discouraged with the stock's performance of late, Regeneron's margins, quality financials, and promising pipeline put it in a strong position to succeed down the road. It may take a while before the pipeline pays off, but there's no shortage of reasons to be optimistic that the stock can be a market-beating investment over the next five years and beyond.