Google Inc's (GOOGL.O) shares closed up 16.3 percent at $699.62 on Friday, adding about $65 billion to its market value, as strong growth in YouTube viewership eased investor concerns about Facebook Inc's (FB.O) push into video.
Google's class A shares chalked up their largest single-day percentage change in more than seven years on Friday.
The surge, which comes a day after it reported better-than-expected profit for the first time in six quarters, sent the Nasdaq composite index to a record intraday high.
The rise in Google's market value was more than the total market capitalization of Caterpillar Inc (CAT.N), the world's biggest construction equipment maker.
Google's shares hit a record high of $703, valuing it at $471.50 billion and cementing its position as the world's second most valuable company after Apple Inc (AAPL.O).
At least 27 brokerages raised price targets on Google's stock, with analysts also welcoming new Chief Financial Officer Ruth Porat's emphasis on disciplined spending.
At the highest price target of $800, Google would be valued at $545 billion. Apple is valued at about $740 billion.
The energy brought to Google by Porat, who joined in May from investment bank Morgan Stanley (MS.N), is likely to drive the stock in the short and medium term, analysts say.
"She is known to be tough as nails when it comes to expense management ...," FBN Securities analyst Shebly Seyrafi said. "A lot of investors are comforted by the fact that her first quarter as CFO, reporting, she is delivering."
Google said on Thursday that watch time for YouTube rose 60 percent in the second quarter and the video service had more viewers aged 18-49 on mobile alone than any U.S. cable network.
Online video ads could be a $17 billion opportunity in the United States alone by 2017, Jefferies & Co analysts said, and YouTube looks best positioned to benefit.
Google and Facebook are trying to woo big companies to market products via online videos.
But YouTube has an edge over Facebook as it has a more mature monetization platform that seems to attract the best content, Piper Jaffray analyst Gene Munster said.
Google's ad revenue rose 11 percent to $16.02 billion in the second quarter. Paid clicks rose 18 percent.
"This growth has steadily held in the mid-to-high teens since at least Q1:13," RBC analyst Mark Mahaney said. "Such consistency is a rarity, especially for a behemoth business..."
Google said the gap was closing between mobile and desktop "cost per click" (CPC), or the average price of online ads. Mobile ads are usually cheaper because of smaller screen space.
Mobile CPCs are likely to exceed desktop CPCs in the long term, Munster said.
Google's CPCs fell 11 percent in the quarter, pressured by YouTube TrueView ads, which are priced lower and paid for by advertisers only when viewers don't skip them.
Of 48 analysts covering Google, 38 have "buy" or higher ratings, while 10 rate it "hold." Their median price target is $672.
Giri Cherukuri, portfolio manager at OakBrook Investments LLC, attributed Google's surge to management's comments during a post-earnings conference call. Lisle, Illinois-based OakBrook owns shares in Google.
"They (investors) liked the focus on expense control and openness towards possible dividends and share buybacks," Cherukuri said, adding that Google's comments on strength at Youtube and, in particular, mobile viewing, likely translated into positive sentiment for Facebook as well.
Facebook's shares rose as much as 5 percent to an all-time high of $95.39 on Friday.
Up to Friday's close, Google shares had risen about 32 percent this year. The stock trades at 19.7 times forward earnings, while Facebook trades at 38.1 times.
(Additional reporting by Saqib Iqbal Ahmed in New York and Eileen Soreng in Bengaluru; Editing by Kirti Pandey and Simon Jennings)