The company, nonetheless, posted a significant decline in its revenue growth rate and warned that growth will remain muted going forward amid continued economic fallout from the pandemic, an advertiser boycott and reduced efficacy of ad targeting.
Facebook brought in $18.7 billion in revenue in the quarter, up from $16.9 billion a year earlier and beating analyst expectations of $17.34 billion, according to data from FactSet. The 11 percent growth is a deceleration from the average gains of nearly 25 percent annual growth that the company had posted over the last four quarters.
Earnings rose to $5.18 billion, or $1.80 a share, compared with the $3.96 billion, or $1.39 a share, expected by analysts. Facebook shares gained more than 7 percent in after-hours trading.
The results once again show the resilience of Facebook's business even as it is buffeted by one controversy after another. Facebook chief Mark Zuckerberg was one of four major tech executives to testify before Congress on Wednesday in a hearing about whether their companies have accumulated too much power.
The recent quarter was the first to reflect the full weight of the coronavirus pandemic in the U.S. that upended normal economic activity but contributed to rising usage of Facebook's products. Average monthly users of the Facebook platform rose to 2.7 billion, from 2.6 billion in the first quarter. More than three billion people now use at least one of Facebook's products on a monthly basis.
The numbers "reflect increased engagement as people around the world sheltered in place," the company said in announcing the results. The company said it expected the intensity of the usage to ease as such restrictions decline in coming quarters.
Facebook had joined other social media companies in predicting that pandemic fallout would damp its near-term prospects. It said that in the first weeks of the third quarter revenue has grown at a 10 percent clip year over year, a rate it predicted it would hold through September. The forecast reflected uncertainty about the economy, the current boycott and limitations on Facebook's ad targeting business imposed by California's data privacy law, which became enforceable at the beginning of this month. Facebook has not traditionally offered such guidance.
The ad boycott, which was rooted in frustrations from civil rights groups about how Facebook handles hate speech, began in July and thus was not reflected in the second-quarter results. The monthlong boycott is scheduled to end Friday though some advertisers may continue to pause or reduce spending on Facebook's platforms.
Facebook's nonadvertising business, which includes its virtual-reality division, Oculus, as well as Portal, its home video calling device, was an exception to the reduced growth, with sales up 40% year over year. Advertising still accounts for 98% of Facebook's revenue.
The company's gross margin, 32 percent, rose 1 percent from the first quarter and was up from 27 percent a year ago. Zuckerberg had predicted that the margin would drop throughout 2020 as the company used its financial strength to invest in new products and employees.
Over the last few months, the company has rushed to release new products in major markets, including a customizable shopping feature aimed at small business, a video chat product called Rooms and Instagram Reels, which copies many of the features popularized by rival social media platform TikTok.
Zuckerberg has said that he expects the pandemic will ultimately shift consumer behavior as they spend more of their lives online in ways that will likely benefit Facebook in the long-run.