The company had reported a loss of USD 157 million in the year-ago period.
Revenue totalled USD 1.81 billion in the second quarter, an increase of 53 per cent from USD 1.18 billion a year earlier, the social networking giant said in a statement.
Buoyed by the better-than-expected performance, Facebook shares opened above USD 33 apiece on the Nasdaq, the highest opening price since last May, when the company went public at USD 38 a share.
Mobile advertising revenue accounted for 41 per cent of the total. In the first quarter, mobile advertising revenue was about 30 per cent of the total of USD 1.25 billion.
More From This Section
"We've made good progress growing our community, deepening engagement and delivering strong financial results, especially on mobile," Facebook CEO and founder Mark Zuckerberg said in the statement. "The work we have done to make mobile the best Facebook experience is showing good results and provides us with a solid foundation."
The social network had 1.15 billion monthly active users as of June 30, a 21 per cent increase year-over-year. Its mobile monthly active users surged 51 per cent to 819 million.
Facebook's active advertisers surpassed the 1 million mark. The Facebook for Every Phone app has over 100 million monthly active users.