SAN FRANCISCO — Yahoo’s revenue in the second quarter rose 15 percent, the company said on Tuesday. But it spent heavily to achieve the gains, wiping out all of its profits and then some. Executives also warned that expenses would continue to be high through the rest of the year.
Yahoo shareholders were unimpressed, sending the company’s stock down more than 1 percent in after-hours trading.
“The core fundamentals are not executing according to plan,” said Robert Peck, an Internet analyst with SunTrust Robinson Humphrey. “And the profitability they are guiding is going to get worse.”
Not that Yahoo’s core business — selling advertising — matters much to investors right now.
Wall Street is far more interested in the fate of the company’s 15 percent stake in Alibaba, China’s biggest e-commerce company. Yahoo plans to spin off the holdings, worth more than $30 billion, into a separate company called Aabaco Holdings in the fourth quarter. The deal is designed to avoid incurring a capital-gains tax bill, but Wall Street analysts are concerned that the Internal Revenue Service will reject Yahoo’s argument that the spinoff should be tax-free.
Ms. Mayer and her chief financial officer, Kenneth Goldman, both declined to discuss the Alibaba plans beyond what Yahoo has previously said in securities filings.
For the quarter, Yahoo reported revenue of $1.24 billion, up 15 percent from the $1.08 billion it reported in the same quarter last year. But after deducting the share paid to partners, revenue was flat.
The company posted a net loss of $22 million, or 2 cents a share, compared with the profit of $270 million, or 26 cents a share, it reported a year ago.
However, after stripping out one-time items and stock-based compensation expenses, profits were 16 cents a share, down from 37 cents a share a year ago. Wall Street analysts had expected the company to post profits of 19 cents a share, according to S&P Capital IQ.
Ms. Mayer, who has been running Yahoo for more than three years, has been struggling to rebuild the company’s advertising business.
Revenue from the so-called Mavens businesses of mobile, video, native ads and social rose by 60 percent year over year. And the company’s older display ad business also improved, posting its best performance since 2010.
But Yahoo continues to lose market share in key areas such as mobile advertising because competitors are growing faster, said Martin Utreras, a senior forecasting analyst at eMarketer, a research firm.
“They were a little bit late to the game in mobile,” he said. “In the U.S., advertising is growing at the market rate, and internationally, it’s growing at less than the market rate.”
Ms. Mayer said the company would continue to invest in areas such as mobile search, where it sees an opportunity to build a product that would challenge competitors like Google and Microsoft’s Bing.
“Search is a core part of Yahoo,” she said.
Yahoo is also sharing some profits with third parties, such as mobile app developers and the Mozilla web browser, under deals in which they show Yahoo advertising.
“Historically, whenever I saw businesses buying traffic, I would always think of it as lower-quality revenue,” said Ben Schachter, an analyst with Macquarie Securities. “I think investors are going to discount the traffic pretty meaningfully.”
The company recently announced several new digital magazines and video projects, and it has also begun offering a legal form of sports betting in which players create fantasy rosters of real-world athletes and place wagers on how those athletes will actually perform that day on the field. Yahoo said 1.3 million people have tried the daily games and nearly half have bet money.
Yahoo bid aggressively to win the right to host the first live webcast of an N.F.L. game this fall. Ms. Mayer also suggested the company was pursuing other sports deals.
Mr. Goldman offered investors a range of projections for the company’s financial performance in the third quarter. He said revenue would be $1.23 billion to $1.27 billion, before deducting partner payments of $230 million to $270 million.
He also projected that the company would earn profits, excluding stock compensation expenses, of $50 million to $90 million.
An earlier version of this article misstated the rise in Yahoo’s display ad business. Its quarterly revenue rose 15 percent, not its display ad business.