SAN FRANCISCO — The Facebook spring is over. The dog days of August have taken hold.

In May, when investors tripped over themselves to buy a piece of Facebook, not even the skeptics predicted what has happened. Three months after the offering, shares have lost more than 40 percent of their value, closing at just under $21.81 on Friday, from $38 on May 18.

The stock began to dip immediately after its debut on the public markets, and at first technical errors with the offering were blamed. But these problems did not account for the stock’s subsequent plunge, analysts and shareholders say. That decline, they say, can be traced to several factors, among them the sheer size and price of the initial offering, early exits by major investors and slowing growth.

Not least, the stock seems to have been jinxed by Facebook’s own fairy tale.

“The underwriters (and the media) did a great job of hyping Facebook leading up to the I.P.O., and the sell-side (including me) did a great job of hyping it after,” Michael Pachter with Wedbush Securities, an equity research firm, wrote in an e-mail.

Still, some investors remain bullish. Facebook is profitable, it keeps its nearly one billion users glued to their screens longer than any other Internet site, and it is aggressively experimenting with new ways to drum up advertising — its main source of revenue. Just this month, for instance, it began offering application developers a way to focus ads, and sought to diversify revenue by opening its site in Britain to online gambling.