Google Inc. reported a 27 percent increase in third-quarter profit, surpassing analysts’ estimates, following a boost in online ads and e-commerce.

Net income rose to $1.64 billion, or $5.13 a share, from $1.29 billion, or $4.06, a year earlier, the company said today in a statement.

Excluding revenue passed on to partner sites, sales were $4.38 billion, compared with an estimate of $4.25 billion in a Bloomberg survey of analysts.

“While there is a lot of uncertainty about the pace of economic recovery, we believe the worst of the recession is behind us and now feel confident about investing heavily in our future,” Eric Schmidt, the search giant’s chief executive, said in a statement.

Google’s main source of revenue - search advertising - this division rebounded last quarter as marketers sought a cost-effective way to promote themselves. Advertising spending on U.S. search ads rose 5 percent from the previous period, according to Efficient Frontier, a search marketing firm in Sunnyvale, California. The number had dropped 3 percent in the second quarter.

“Advertisers want to stay in front of people who are spending,” said Sameet Sinha, an analyst with JMP Securities LLC in San Francisco, who rates the stock a buy and doesn’t own it. “They are willing to pay up for it.”

Cost per click, or the amount that Google makes from ads that users click on, was still down 6 percent over a year ago. The rate, however, was up 5 percent from the second quarter.