A Google sign is pictured outside the Google office in Berlin, Germany, August 31, 2021.
A Google sign is pictured outside the Google office in Berlin, Germany, August 31, 2021. Reuters / Annegret Hilse

Google parent Alphabet Inc on Tuesday posted quarterly sales close to Wall Street targets, sending shares up on relief that the world's biggest seller of online advertising had avoided the deep disappointment of rivals including Snap.

Sales from Google's search ad business actually topped expectations, while revenue from YouTube ads, cloud computing and Alphabet's "other bets" unit all came in lower than anticipated, according to data from FactSet and Refinitiv.

Shares of Alphabet were up 3% in after-hours trade after rising as much as 4.3% following the results.

"Despite the underwhelming quarter, expectations were so low that investors blew a sigh of relief," said Jesse Cohen, senior analyst at Investing.com.

Alphabet reported second-quarter revenue of $69.69 billion, 13% higher than the year-ago period, and nearly in line with the average expectation of $69.88 billion among investment researchers tracked by Refinitiv.

The company also barely missed sales expectations in the first quarter. It last missed estimates in consecutive quarters in 2015.

Rising wages as well as rising prices of fuel and other items have forced some ad buyers this year to pare marketing, including even ads on internet services such as Google that served as an essential link to consumers during pandemic lockdowns.

Last week, Snap Inc and Twitter Inc posted disappointing quarterly results, heightening concerns about the slowdown in ad spending. Snap shares plunged 25% following its results.

Big U.S. multinationals including Alphabet also are increasingly bringing in less cash when converting foreign revenue because of the strong dollar.

Alphabet said the currency affected sales growth by 3.7%, and that sales would have been close to $72 billion if not for currency swings. About 55% of the company's sales come from outside the United States.

The currency impact will be even greater in the third quarter, Alphabet Chief Financial Officer Ruth Porat told reporters, according to CNBC.

Google's ad business accounted for 81% of the quarterly revenue, with search ads generating $40.69 billion in sales, beating FactSet estimates of $40.15 billion.

"Google is relatively well positioned to weather the rough waters that lie ahead," Insider Intelligence analyst Evelyn Mitchell said.

In recent years, ad spending cuts have hurt social media companies more than Google. It brings in revenue through a greater variety of functions in the ad market, and search ads can be easier for customers to generate since they often include just text.

Clients sometimes prioritize search ads given that they can drive better returns because the marketing is typically directed at people actively searching for related items.

Sales from Google Cloud of $6.3 billion missed analysts' target of $6.4 billion and YouTube ads also fell short, coming in at $7.3 billion against estimates of $7.5 billion, according to FactSet data.

Overall profit was $16 billion, or $1.21 per share, compared with the average estimate of $1.29 per share. Alphabet's profit tends to be unpredictable due to sporadic gains or losses - at least on paper - in the stakes it holds in many startups.

Investors look more closely at ratios of costs to sales.

With investors accustomed to gross profit margins as high as 60%, Google, like many of its peers, recently began slowing hiring in some units to better manage expenses.

But at the same time, Alphabet is moving forward with expanding its cloud computing footprint, building out new offices and bringing its Google Fiber internet service to new communities.

Other factors are motivating concerns about a potential sales slowdown. Amid scrutiny from antitrust regulators on five continents, Google is taking a smaller cut from sales of apps developed by outside software makers.

Google suspended sales in Russia due to the war in Ukraine, and YouTube's ad revenue has fluctuated as its options for advertisers grow and wane in popularity.

Still, within the $602 billion global online ad industry, Google is expected to maintain market share of 29%, or the biggest share for the 12th straight year, according to Insider Intelligence.

Earlier this month, Google lost out on a major new sales partner when Netflix Inc said it had chosen Microsoft Corp's ad technology to help with its first foray into placing ads on its streaming video service.

Alphabet shares have fallen over 27% so far this year, more than the overall S&P 500 index. Alphabet split its stock 20-for-1 on July 15, briefly helping boost shares before the results from Snap and Twitter sent them falling.

Meta Platforms Inc, which through Facebook and Instagram owns the second-biggest online advertising service, reports earnings on Wednesday. Its shares rose 1.6% on Tuesday after Alphabet's results.