That’s roughly 84% of the social network’s revenue during the quarter.

In its first quarterly earnings report since going public, Facebook Inc. reported today that it generated $1.18 billion in revenue in the second quarter, up 32% from $895 million during the same period in 2011. Advertising accounted for $992 million of that total.

The social network generated average revenue of $1.28 per user in the second quarter, up almost 2% from $1.26 a year ago. In the United States and Canada the average revenue per user was $3.20 per user, up 13% from $2.84 a year ago. Facebook calculates average revenue per user as its total revenue during a given period, divided by the average of the number of monthly active users at the beginning as well as the end of the period; that is why the average revenue per user doesn’t equal $1.18 billion (the Q2 revenue) divided by its 955 million active users.

The social network lost $157 million during the quarter, compared to a $240 million profit a year earlier. That’s due to the social network’s quarterly expenses rising to $1.18 billion from $895 million a year earlier thanks largely to $986 million in stock-based compensation. Facebook’s projections for future quarters show that the second quarter is the lone time that stock-based compensation will account for more than $35 million, the social network said today in a conference call with analysts. In the second quarter a year ago stock-based compensation was $6 million. Not counting share-based compensation, the social network’s expenses as a percentage of revenue rose 2 percentage points year over year from 23% a year ago to 25% this year. 

During the quarter the social network launched several advertising tools. That includes a button that gives marketers the ability to select whether the Sponsored Stories ads they buy appear in consumers’ news feeds on a mobile device, desktop or a combination of the two. Those tools are helping marketers generate results, said Sheryl Sandberg, Facebook’s chief operating officer. She said that Facebook has independent data from more than 60 advertising campaigns that utilized a variety of its ad formats that shows that 70% of ad campaigns on the social network had a return on ad spend of 3x or better, and 49% showed an ROI of 5x or greater.

The social network also reported that it had 955 million monthly active users as of June 30, a 29% jump from a year ago. It had an average of 552 million daily active users in June, up 32% year over year. And it had 543 million mobile active users as of June 30, a 32% jump compared to a year earlier.

advertisement

Facebook is heavily investing in mobile, said Mark Zuckerberg, Facebook’s founder and CEO. During the quarter the social network launched a Facebook Camera app for iPhone users and rolled out several updates to its Android app. It also made several mobile-focused acquisitions, including research and design firm Bolt Peters and photo-oriented social network Lightbox.

“Our goal is to help every person stay connected and every product they use be a great social experience,” says Zuckerberg. “That’s why we’re so focused on investing in our priorities of mobile, platform and social ads to help people have these experiences with their friends.”

Favorite