Moderna (MRNA 0.59%) announced its second-quarter results before the market opened on Wednesday. And it easily beat Wall Street's expectations.

The vaccine maker reported Q2 revenue of $4.7 billion, up nearly 7% year over year and higher than the consensus estimate of $4.07 billion. Moderna posted earnings per share of $5.24, well above the average analysts' estimate of $4.55. 

With these positive numbers, the vaccine stock unsurprisingly jumped around 16% in early trading on Wednesday. But Moderna also just gave investors 499 million reasons to worry.

Past the expiration date

It's no secret that Moderna's COVID-19 vaccine has a limited shelf life. The messenger RNA (mRNA) vaccine must be stored in a refrigerator at a temperature between 36 degrees and 46 degrees Fahrenheit. However, doses expire after 30 days and have to be discarded. 

Moderna revealed in its Q2 update that it's having to throw away a lot of doses. The company recorded a $499 million charge for inventory write-downs. These write-downs were entirely due to Moderna's COVID-19 vaccine doses that either already exceeded or are expected to exceed their expiration dates without being used.

How significant is this for Moderna? The Q2 write-down of $499 million is much larger than the $189 million write-down in the first quarter of 2022. It also represents 10.5% of total revenue in the second quarter. 

A demand problem

Moderna said that the inventory write-downs were "driven by a substantial reduction of our expected deliveries to COVAX and deferral of deliveries to other customers, particularly to the European Union." In other words, the company's supply of vaccines was higher than the demand. 

That's obviously not good for Moderna. And the problem is actually worse than it first appears. In addition to the sizable inventory write-downs, Moderna recorded a $184 million loss on firm purchase commitments in Q2. It also took a $131 million hit related to unutilized external manufacturing capacity.

The issue also manifested itself with the company's full-year outlook. Moderna still projects around $21 billion in advance purchase agreements for delivery in 2022 even though it recently won a new supply deal with the U.S. government for up to $1.74 billion. Why didn't the company increase its forecast? One big reason is the lack of demand resulting in unallocated doses for COVAX.

This problem isn't limited to Moderna, though. Pfizer CFO Dave Denton stated in the company's Q2 conference call last week that the big drugmaker had a $450 million inventory write-off related to its COVID-19 products that had expired or were expected to soon expire.

Next year will provide more clarity

Investors are understandably celebrating Moderna's better-than-expected Q2 results. However, the huge inventory write-downs in the quarter underscore the uncertainty about the future demand for the company's COVID-19 vaccines.

The company is already seeing a significant drop-off in the demand for COVID-19 boosters. Nearly 77.5 million Americans received the initial two-dose series of Moderna's vaccine. Almost 45.6 million selected Moderna for their first booster dose. However, barely over 10 million have chosen Moderna as a second booster so far.

It's possible that boosters targeting the coronavirus omicron variant could spur higher vaccination rates. The prospects of another severe COVID-19 wave in the fall and winter could also make a difference.

The real test for Moderna will likely come in 2023. If the demand for its COVID-19 vaccines increases or even remains close to current levels, the stock is likely to move even higher. But if not, shares could decline significantly. Moderna's big inventory write-downs in Q2 provide a legitimate reason for investors to worry at least a little about what the future holds.