Facebook (NASDAQ:FB) has come a long way in the 13 years since Mark Zuckerberg started hacking away at what would become the world's largest social network. It's no longer just a place to post status updates and invite friends to parties; Facebook encompasses Facebook, Instagram, Messenger, WhatsApp, Oculus, and many more smaller products.

Investors who got in at the IPO are currently sitting pretty. If you had invested $10,000 at Facebook's IPO in 2012, at $38, you'd currently own about $36,000 worth of Facebook stock less than five years later. That's good for a 29% annual return.

Of course, it hasn't been all roses. And patient investors may have scored an even bigger return.

Mark Zuckerberg answering questions.

Image source: Facebook.

A botched IPO

Facebook's IPO in May of 2012 was a complete mess. Nasdaq experienced technical difficulties fulfilling orders. Some orders were filled at lower or higher prices than anticipated, and some investors received their confirmations hours after their trade went through, leaving them unsure of how many shares they actually owned.

The stock price touched its $38 IPO price several times that Friday. The share price went as high as $45 per share.

Following the IPO, Facebook shares trended lower as investors expressed concerns over its valuation and ability to monetize users as they shift to mobile devices. The stock bottomed out in September at $17.55 per share. The stock traded around $20 per share until its third-quarter earnings results showed investors that it was ready to monetize mobile.

Still, Facebook didn't get back to its IPO price until the end of July in 2013 -- over a year later. Investors could have bought into Facebook at any time during that first year of trading and seen an even better return on investment than those who got in at the IPO. Since August 2013, shares have gone nearly straight up.

Building the monolith

Facebook has quickly grown into one of the largest digital advertising platforms in the world. The only company attracting more ad spend is Google. Since its IPO, Facebook has gone from four million businesses with Pages on its platform to 60 million. Four million of them are now active advertisers.

Facebook also started monetizing Instagram in late 2013, opening up its ads API to small businesses in 2015. Within a year, Instagram reached 500,000 active advertisers.

Facebook also own Messenger, WhatsApp, and Oculus. While Messenger and WhatsApp are still in the very early stages of monetization, they each have over 1 billion users. That's a lot of potential. Oculus is still in the very early stages, but it has made some inroads by partnering with Samsung for the Gear VR.

Facebook is already one of the largest companies in the world, but given the growth of digital advertising, its ability to attract more advertisers to its various products, and the potential of its yet-to-be-monetized products, it could get bigger still.

While investors who bought Facebook at its IPO have made a solid return (and investors who waited a few months made even better returns), it's not too late to invest in Facebook. It still has room to run.

Adam Levy has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Facebook. The Motley Fool has a disclosure policy.