(AP) -- Google Inc. is doing its part to stimulate the economy and hurting its stock in the process.
With its payroll swelling at the fastest rate in four years, some of Google's expenses are climbing faster than its revenue.
That's creating a drag on its earnings, which is pulling down the Internet search leader's stock price.
Consider Google's second-quarter results released late Thursday. Both net income and revenue rose 24 percent from the previous year, but that didn't impress investors because the earnings missed the target set by analysts.
Google shares dropped $19.52, or nearly 4 percent, in extended trading after the results came out. The stock had closed Thursday at $494.02.
Here's the main reason for the earnings letdown: Google is spending more to maintain its commanding lead in Internet search while it also tries to diversify by developing products in other promising niches such as online video, mobile devices and computer operating systems. To help achieve its goals, the company added nearly 1,200 employees in the second quarter to end June with more than 21,800 workers.
Google, based in Mountain View, has hired nearly 2,000 workers through the first half of the year, putting it on pace to add the most people to its payroll since 2006 when it ushered in 6,100 new employees in 12 months.
The European debt crisis also worked against Google in the April-June period.
Investors are worried the euro will crumble if governments in Greece, Spain, Portugal and Italy default on their perilously high debts.
Those fears hurt Google because about one-third of the company's revenue comes from Europe, and customer payments made with the euro translated into fewer dollars than a year ago. Even so, the currency squeeze wasn't as severe as some analysts anticipated.
The dollar seems more likely to weaken than Google's commitment to bring in more engineers and sales representatives to peddle the online ads that generate most of the company's income.
Without making specific projections, Google's management left little doubt substantially more people will be joining the company in the months ahead as it pursues long-term opportunities.
"Google is building a business not for this quarter or the next quarter, but an infrastructure for the next half-decade to decade," Patrick Pichette, Google's chief financial officer, said in an interview late Thursday. "What a great moment for us to invest to create these fantastic products that everybody is going to live on."
Even as Google sacrifices earnings growth, it is accumulating more cash. Google had $30 billion at the end of June, up from $26.5 billion. And it might not even use that money to invest in new technology or buy more companies. That's because the company revealed Thursday that it may borrow up to $3 billion on the premise that its money managers can realize investment returns that outstrip its borrowing costs.
Although Google remains the Internet's most profitable company, investors have been fretting about signs of decelerating growth amid stiffer competition from Apple Inc., Facebook and Microsoft Corp. On top of those challenges, a showdown over online censorship in China that has muddied Google's future prospects in the world's most populous country.
Those factors have contributed to a 23 percent decline in Google's stock price that has erased about $45 billion in shareholder wealth so far this year.
Google earned $1.84 billion, or $5.71 per share, in the second quarter, up 24 percent from $1.48 billion, or $4.66 per share, a year ago.
If not for expenses covering employee stock compensation, Google said it would have made $6.45 per share. That figure was below the average estimate of $6.52 per share among analysts polled by Thomson Reuters.
Revenue climbed 24 percent to $6.82 billion, from $5.52 billion a year earlier. After subtracting commissions paid to its ad partners, Google's revenue stood at $5.09 billion - about $10 million above analyst projections.
In another key figure watched closely by investors, the number of revenue-generating clicks on Google's ads in the second quarter increased 15 percent from the same time last year. The gain is in the same range as the increases in the past year.
The average price per ad click in the second quarter edged up 4 percent from last year, but it's slower than the growth seen during the previous two quarters.
Explore further: Why the Sony hack isn't big news in Japan