Remember When Facebook Went Public and It Was a Disaster? That Was Three Years Ago.

What were you doing three years ago?

If you are Mark Zuckerberg, Sheryl Sandberg or other members of Facebook's inner circle, you spent the morning at your Menlo Park headquarters, high-fiving over your IPO. Then you spent the rest of the day in a funk, as everything went wrong and Facebook stock barely cleared your $38 offering price.

And things didn't get better for more than a year: Anyone who bought Facebook stock on the day it went public was underwater until the summer of 2013, when the stock suddenly started shooting up again.

Read more from Re/code:
DC startups seeding the next American revolution?
YouTube may show 'Innocence of Muslims' film: Court
Better with time: A second look at Android Wear

An image of Mark Zuckerberg, chief executive officer of Facebook Inc., left, with Robert Greifeld, chief executive officer of Nasdaq OMX Group, right, is projected at the Nasdaq MarketSite in New York, May 18, 2012.
Peter Foley | Bloomberg | Getty Images
An image of Mark Zuckerberg, chief executive officer of Facebook Inc., left, with Robert Greifeld, chief executive officer of Nasdaq OMX Group, right, is projected at the Nasdaq MarketSite in New York, May 18, 2012.

The reason: Facebook was able to argue, convincingly, that it had figured out how to make money from its mobile users. By the middle of 2013, mobile ads, which had been a goose egg when Facebook IPOed, made up 41 percent of the company's ad revenue (it's at more than 70 percent now).

Things have been very, very good for Facebook investors since then. If you held the stock you bought on IPO day, you're now up more than 100 percent:

If you'd like to draw a moral here, I'd be wary, since it's always possible that Facebook's stock chart doesn't continue its ascent. Perhaps, for instance, the market for app install ads, which have been a big driver for Facebook's mobile business, ends up retreating. What happens to Facebook's story then?

Read MoreFacebook now hosts news content on its app

Then again, it's worth noting that Facebook's stock price and ad revenues aren't the only things that have shot up in the last three years. The company's user base, which everyone assumed would be plateauing in 2012, has added 500 million users since then, and now sits at 1.44 billion. That seems as astonishing as any other part of Facebook's recent history.

By Peter Kafka, Re/code.net.

CNBC's parent NBC Universal is an investor in Re/code's parent Revere Digital, and the companies have a content-sharing arrangement.