For most of its young life, Google Inc., with its golden touch on the Web, could do little wrong, beating Wall Street revenue estimates in five of the last seven quarters and profit estimates in each of the last seven.

Now, with no sign of success in any business other than search advertising, some investors are questioning whether Google is on the right track.

The Internet giant’s shares, which have underperformed the Nasdaq stock market this year as the Mountain View, Calif., company weathered one of its toughest quarters, struggled in extended trading Thursday after the company reported second-quarter earnings that missed expectations on Wall Street.

The quarter sagged under a burst of higher spending and a currency squeeze from the European debt crisis. About one-third of Google’s revenue comes from Europe.

Google shares fell $19.82, or 4%, to $474.01 in extended trading. The company ended the regular session up $2.68 to $494.02.

The company powers the world’s most popular search engine and its largest advertising network. But even as it spends millions on new initiatives, adding 1,200 employees in the second quarter alone, Google has yet to show it can make money any other way. And that has unnerved investors who fear that Google has hit the end of its growth spurt.

The company had a 22% year-over-year increase in total costs during the quarter, including marketing, research and development, and general expenses.

In a conference call with analysts, Google Chief Financial Officer Patrick Pichette defended the spending spree.

“We’re really pleased with how we’re performing in this kind of economy and that’s why we feel confident about the future and why we feel confident about investing now,” Pichette said. “It’s the right thing at this time in the history of the company.”

Google added employees to its four areas of focus: search, mobile, applications and display advertising, Pichette said. It’s not only aggressively hiring employees but also buying small companies to challenge social networking sites such as Facebook Inc. and mobile software and advertising rival Apple Inc. The increased spending — which has brought the total number of workers at Google to 21,800 — prompted some analysts to question when investors would see a return on those ventures.

“Google is setting up for second act, but that second act could be 18 months away,” said Colin Gillis, an analyst at BGC Partners in New York.

But the company can’t sit back and do nothing, even in uncertain times, Edward Jones analyst Andy Miedler said.

“Investors are hoping that Google is not getting back to its free-spending, prerecession ways,” he said. “But to maintain the high level of growth they are generating, I do think they need to make those investments even if it does depress near-term profitability.”

Revenue in the three months ended June 30 was $6.82 billion, up from $5.52 billion a year earlier. Profit was $1.84 billion, or $5.71 a share, up from $1.48 billion, or $4.66, a year earlier. That was below the average analyst estimate of $6.52 a share.

Fueled by the torrid growth of its search advertising business — the small text ads that appear next to search results — Google has been a prolific spender, with vast research and development budgets that fostered thousands of projects and generous perks for employees. It ratcheted back in 2008 as the economy plunged and the company paced itself for slower growth. Pichette was credited with helping the company curb spending.

Google did deliver optimistic news Thursday about the resurgence of online advertising. Web surfers clicked on its ads more frequently and marketers paid more for them. Yet, while the number of clicks increased 15% from a year ago, the growth rate slowed. And the average cost that advertisers paid for clicks on their ads increased 4%, less than the 7% it increased last quarter.

Meanwhile, the company is also dealing with a high-profile spat with China that threatened its presence in the Internet’s fastest-growing market. It also has to wrestle with growing regulatory scrutiny in Europe and the United States, and escalating competition from Facebook and other social networking upstarts that are reshaping the Internet landscape.

Another Silicon Valley company to announce earnings Thursday was Advanced Micro Devices Inc., which slashed costs to post a narrower second-quarter loss as sales of computers that use its chips increased after one the industry’s worst slumps.

AMD lost $43 million, or 6 cents a share, in the quarter ended June 26. This surpassed Wall Street expectations. Revenue was $1.65 billion, up 40% from a year earlier.

jessica.guynn@latimes.com