Image source: The Motley Fool.

Facebook (META -1.97%) reported earnings for the second quarter of 2016 on Wednesday, July 27, after the market close. Both revenue and earnings came in ahead of expectations, and the stock was rising by 5.6%, trading at new historical highs, in after-hours trading after the news hit the wires. 

Facebook has lots of friends

As of June 30, Facebook had 1.71 billion monthly users, a 15% year-over-year increase. Daily active users stand at 1.13 billion, growing by 17% annually. The fact that daily users are growing at a faster rate than monthly ones indicates that engagement is on the rise, a major positive when evaluating the company's ability to sustain growth going forward.

Mobile is a remarkably important segment in the online advertising industry, and Facebook is rapidly growing in this area. Mobile monthly users came in at 1.57 billion last quarter, representing a 20% increase versus the same period last year. Mobile daily users stand at 1.03 billion, growing 22% year over year.

Facebook's user metrics look even more impressive when compared against rival Twitter (TWTR). The short-message social network ended the second quarter with 313 million monthly users, growing by a disappointing 3% versus the second quarter of 2015. When considering both the size of the platform and growth rates, Twitter is just no match to industry leader Facebook.

Transforming users into revenue and profits

Not only is Facebook delivering vigorous user growth, the company is also making more money per user. Average revenue per user was $3.32 during the second quarter of 2016 -- a 33% increase versus $2.50 per user in the second quarter of 2015. 

On the back of a growing user base and increasing monetization levels, Facebook produced $6.24 billion in revenue last quarter, a 59% increase over $4.04 billion in the same period last year. Mobile advertising revenue accounted for 84% of advertising sales during the quarter, rising steeply versus 76% during the second quarter of 2015.

The company is aggressively investing for growth, and total expenses grew 33% year over year. But revenue still outgrew expenses, so operating profit margin increased from 31% of sales to 34% of revenue. Non-GAAP operating margin, which excludes expenses such as stock-based compensation and amortization, increased from 52% to 55% of sales.

Growing revenue and expanding profit margins provided a double boost to earnings, and earnings per share grew by an explosive 184%, from $0.25 to $0.71. 

Facebook is increasingly betting on video as its main growth driver, and CEO Mark Zuckerberg sounds quite optimistic about the company's prospects in this area. In Zuckerberg's own words: "Our community and business had another good quarter. We're particularly pleased with our progress in video as we move toward a world where video is at the heart of all our services."

Facebook has delivered an impressive financial performance over the past several quarters, so expectations were already quite high leading to the recent earnings report. Still, the social network managed to deliver impressive performance in key areas such as users, revenue, and profits, so the latest status update from Facebook is getting tons of thumbs up from investors.