Surging demand for mobile advertising helped profit and revenue top analysts’ estimates in the second quarter Wednesday. The earnings may quell concerns, voiced by analysts and investors since Facebook’s initial public offering last year, that the rising popularity of smartphones and tablets is outpacing its ability to make money selling promotions to mobile users.

“Very few people saw the pace at which the entire activity of the planet’s Internet connectivity was going to move toward mobile,” said David Kirkpatrick, author of “The Facebook Effect,” a history of the company, in a telephone interview. “It’s clearly under way now.”

Revenue rose 53 percent to $1.81 billion in the latest quarter, the company said in a statement Wednesday. Profit excluding certain items was 19 cents a share. Analysts had projected profit of 14 cents on sales of $1.62 billion on average, according to data compiled by Bloomberg.

Boosted Projections

Facebook closed at $34.36 in New York yesterday. The Menlo Park, California-based company traded at 149 times earnings as of today’s close, more expensive than 99 percent of the companies in the Standard & Poor’s 500 Index, according to data compiled by Bloomberg.

Analysts at Goldman Sachs Group Inc. increased their target price to $46 from $40, and at least 10 others also boosted projections, according to data compiled by Bloomberg.

“They’ve really done a 180-degree shift toward mobile, even if it was somewhat belatedly,” said Kirkpatrick.

In December, Zuckerberg donated almost $500 million in Facebook stock to the Silicon Valley Community Foundation. The gift to the nonprofit group, which had $2 billion in assets in 2011, is to “lay a foundation for new projects,” Zuckerberg said in a statement posted on his Facebook page.

The billionaire and his wife, Priscilla, have committed the majority of their wealth to charity.

Gates, Slim

Microsoft Corp. co-founder Bill Gates, 57, remains the richest person in the world with a net worth of $72.2 billion.

Mexico’s Carlos Slim, 73, is $5.5 billion behind Gates. The telecommunications tycoon’s fortune has plunged $8.5 billion this year as his main holding, a 44 percent stake in America Movil SAB, the largest mobile-phone operator in the Americas, has fallen 11 percent.

No. 3 on the Bloomberg ranking is Berkshire Hathaway Inc. chairman Warren Buffett. Shares of the Omaha, Nebraska-based company are up 31 percent this year, elevating the 82-year-old’s fortune to $59.8 billion.