You've no doubt thought to yourself, "If only I'd have done [fill in the blank] back then." It's easy to see in retrospect what would have been a great move to make.

Buying Moderna (MRNA -0.58%) at its initial public offering (IPO) is a great example. While the overall stock market is still down year to date even after a solid rebound, shares of Moderna have skyrocketed close to 250% higher this so far year. Investors have flocked to the biotech stock because of the company's promising COVID-19 vaccine candidate.

But just how much money would you have now if you'd invested $10,000 in Moderna's IPO? A lot.

Flask with a dollar sign at the bottom

Image source: Getty Images.

The biggest biotech IPO ever

Moderna filed for its shares to trade publicly in August 2018. A little over three months later, the biotech conducted what was then -- and still is -- the biggest biotech IPO ever.

The company wasn't a newbie. Moderna was founded in 2010 by Flagship Pioneering, a venture capital firm that focuses on life sciences. Since 2007, Flagship has helped launch 28 healthcare companies. But none of them have achieved the level of success that Moderna has.

Analysts expected Moderna to price its IPO between $22 and $24 per share. The biotech ultimately went with the midpoint of that range, with an IPO price of $23 per share on Dec. 7, 2018. If you had invested $10,000 in Moderna's IPO, you would have been able to buy 454 shares (buying fractional shares wasn't an alternative then).

Fast-forward to today. That initial investment, assuming you held onto all of your shares of Moderna, would now be worth more than $31,300. In less than 18 months, your investment would have more than tripled. And if you had perfect timing, buying Moderna's IPO and selling at its all-time high earlier this month, your initial investment could have turned into almost $39,500.

Behind the Moderna marvel

How did Moderna begin its journey as a publicly traded company with a market cap of more than $600 million? And how has the stock more than tripled since its IPO? The story begins with the science behind Moderna's product development.

Moderna focuses on developing medicines that rely on messenger RNA (mRNA). While DNA contains genetic instructions for making proteins, mRNA carries those instructions to ribosomes that actually make the proteins. Moderna has developed a way of creating mRNA that directs cells to make proteins that prevent or fight disease.

The biotech targeted viral diseases by developing experimental mRNA vaccines for cytomegalovirus (CMV), H7N9 influenza, Zika, and other viruses. It worked on cancer vaccines based on its mRNA technology. It researched mRNA therapies to treat autoimmune disorders and other diseases.

Moderna's mRNA platform attracted the attention of some big and influential players in the industry. AstraZeneca, Merck, and Vertex Pharmaceuticals formed partnerships with the small biotech. So did the Biomedical Advanced Research and Development Authority (BARDA) and Defense Advanced Research Projects Agency (DARPA). 

But by mid-August of last year, Moderna's shares had dropped close to 30% from its IPO. By the end of 2019, the stock was up by only 5% overall. Then the novel coronavirus began to spread.

Gloved hand holding a syringe with Covid-19 vaccination printed on it

Image source: Getty Images.

When Moderna announced on Jan. 23, 2020, that it had received funding from the Coalition for Epidemic Preparedness Innovations (CEPI) to develop an mRNA vaccine targeting the novel coronavirus, it marked a pivotal turning point. Moderna is now viewed as one of the leaders in the race to develop a COVID-19 vaccine. And it's this perception that has caused the massive gains for the stock.

What's next

Results announced a little over a week ago from a phase 1 study led by the National Institute of Allergy and Infectious Diseases (NIAID) evaluating Moderna's mRNA-1273 COVID-19 vaccine candidate were encouraging. However, it's still early. Moderna expects to soon begin its own phase 2 study of the vaccine and hopes to advance to late-stage testing in July. 

The biotech's near-term fortunes rest on positive results from these clinical trials. But if Moderna's COVID-19 vaccine is successful, it could bode well for the rest of the company's pipeline candidates. The company believes that if mRNA works for one disease, it should work for many other diseases.

Could buying shares of Moderna now enable investors to achieve as impressive of a return over the next few years as the stock has delivered over the last 18 months? Probably not, but it's quite possible that the Moderna marvel is far from over.