This was a great year for Facebook (META -0.47%) stock. During 2015, shares soared 35% as the S&P 500 failed to make any progress.

FB Chart

FB data by YCharts

Trading at $105 at the time of this writing, shares are only about $5 off an all-time high set late in 2015.

Facebook's rise during the year is particularly impressive when put in context with previous years. The stock's gain in 2015 adds to a huge rise throughout 2013 and 2014. Overall, shares are now up an impressive 230% since the company went public in 2012.

What drove the stock's impressive gain in 2015? Here are three factors likely behind the big year.

1. Continued user growth
Going into 2015, Facebook's user base was already huge. But -- whether investors knew it or not -- it was about to get much, much bigger. By the end of 2014, Facebook had 1.39 billion monthly active users. As of the social network's most recent quarter, Q3, Facebook boasted 1.55 billion monthly active users -- or about 21% of the world's population.

And the growth achieved more recently remains robust. Facebook added about 60 and 50 million monthly and daily active users, respectively, between Q2 and Q3 alone.

User growth keeps investors happy, as it is a good indicator of the strength of the platform and the platform's ability to continue to appeal to larger audiences. Presumably, larger audiences will eventually lead to greater revenue.

For a comparison in contrast, Twitter (TWTR) has added just 28 million monthly active users between the fourth quarter of 2014 and the third quarter of 2015. Even more, Twitter's year-over-year growth in monthly active users of 11% in its most recent quarter is below Facebook's year-over-year growth of 14%, despite the fact that Twitter is a much smaller social platform. This paltry user growth is arguably the number one reason for the stock's 37% decline year to date.

2. Growing profits
Rapid revenue growth of 42.3% during the trailing 12 months paired with the social network's lucrative business model has driven net income higher.

During the company's most recent quarter, for instance, Facebook's non-GAAP net income reached $1.6 billion -- up from $1.1 billion in the year-ago quarter.

Analysts expect Facebook's profitability to continue to rise. The consensus analyst estimate for the social network's compound average annual growth rate for EPS during the next five years is 29%. 

3. Success beyond the Facebook app
The tech company is morphing into a successful holding company, home to some of the world's most substantial social platforms beyond its native Facebook platform.

WhatsApp. Image source: WhatsApp.

WhatsApp and Instagram -- two brands Facebook acquired -- now boast 900 million and 400 million monthly active users, respectively. Both of these platforms are even bigger than Twitter's user base of 320 million monthly active users.

And Facebook is even building out Groups and Messenger into their own platforms. Indeed, Messenger and Groups are now two of the company's most prominent platforms, with 700 million and 925 million monthly active users, respectively.

Importantly, Facebook CEO Mark Zuckerberg appears to be building trust from investors in regard to his ability to turn these other platforms into businesses. The CEO is proving how adept the social network is at monetizing platforms as he rolls out the first stages of the business-to-consumer interactions that will eventually turn Messenger into a business in its own right. And the company's deployment of ad products on Instagram continues to look like a success.

Of course, a soaring stock price often means a pricier valuation. And in Facebook's case this does appear to be so. So, investors interested in buying the stock may want to think twice. But on the other hand, the company's excellent execution doesn't make the stock look like a sell either.