Shares of Alphabet (NASDAQ:GOOGL) (NASDAQ:GOOG) jumped in after-hours trading Thursday, as the search giant reported second-quarter results that surpassed expectations on a variety of key metrics. Investors breathed a sigh of relief, sending shares up as much as 10% in after-hours trading in the wake of its report.

Let's take a look at the results to see what gave shareholders a boost of confidence.

A plexiglass wall with the Google logo, near an office entrance.

Image source: Google.

Solid top- and bottom-line beats

For the second quarter, Alphabet's revenue grew to $38.94 billion, up 19% year over year, or 22% in constant currency, just missing the 23% increase from the prior-year quarter. This easily topped analysts' consensus estimates that were calling for revenue of $38.15 billion. It was also an acceleration from Q1, when revenue increased 17% year over year. 

The bottom-line growth was also notable. Alphabet produced net income of $9.95 billion, more than triple the results from last year -- though the prior-year results were hampered by a record $5 billion fine levied by the European Union. Excluding the impact of that fine, net income still grew by a healthy 20% year over year. Adjusted earnings per share (EPS) were also impressive, growing to $14.21, up 21% year over year and crushing expectations of $11.30. 

Across-the-board strength

Excluding other revenue, sales of advertising on Google's platform grew to $32.6 billion, up 16% year over year. While this was lower than the 24% it produced this time last year, it marked an acceleration from the 15% growth in Q1. Prior to Q2, ad sales had decelerated in each of the previous four quarters. This appeared to help allay investor fears that other digital platforms, including, were stealing digital ad market share from Google search.

Another positive development was the improving rate of traffic acquisition costs (TAC), the payments Google makes to partners for directing users to its Web search. While TAC has been increasing in recent quarters, it actually declined to 22% of Google's advertising revenue, down from 23% in the prior-year quarter.

Paid clicks on Google properties rose 28% year over year, while cost-per-click for the quarter declined 19%.

Alphabet's operating margins improved to 24% this quarter, up from 18% in the year-ago quarter, while also topping expectations of 22.6%.

Potential for future growth

Growth in other areas of the business were similarly robust. Google's "other revenue" segment -- which includes the company's high-growth initiatives including cloud computing, Pixel phones, Nest cameras, Google Play Store, and other hardware -- shined. Revenue grew to $6.18 billion, up a whopping 40% year over year, accelerating from the 36% growth it produced in the prior-year quarter and sequentially from the 25% growth in the first quarter.

While Alphabet typically doesn't break out the results of the components in its high-growth segment, on the conference call, CEO Sundar Pichai said that Google Cloud had achieved a run rate of over $8 billion. Pichai also said the company plans to triple the sales force for its cloud business over the next few years. 

Revenue from Alphabet's "other bets" -- which includes its self-driving-car segment Waymo, Google Fiber, life-sciences division Verily, drone unit Wing, and balloon segment Loon -- continued to edge higher, with revenue of $162 million, up 12% year over year. While these businesses represent the potential for massive revenue growth at some point in the future, they're still not ready for prime time.

Then there's this...

If the combination of improving metrics wasn't enough, Alphabet announced that its board of directors authorized a massive new stock repurchase plan in the amount of $25 billion (yes, with a "b").

After several quarters that gave investors pause, Google has once again shown the strength of its position in digital advertising.